hummingbird-project / swift-mustache

Mustache templating engine
Apache License 2.0
21 stars 2 forks source link

Dashes in included file names fail the scan #17

Closed drekka closed 2 years ago

drekka commented 2 years ago

I have the following template:

{{> stored-credit-card-4321}} 

However that causes the scanning of the mustache files to fail with an error.

(HummingbirdMustache.HBMustacheLibrary.ParserError error 1.)
Printing description of error:
▿ ParserError
  - filename : "tokens.json"
  ▿ context : Context
    - line : "      {{> stored-credit-card-4321}},"
    - lineNumber : 13
    - columnNumber : 17
  - error : HummingbirdMustache.HBMustacheTemplate.Error.unfinishedName

I've been using dashes in a number of templates up until now and they scan just fine. If I change the name of the file to storedCreditCard4321.mustache the scanning is fine so it appear that using a dash in the name of the file trips things up.

adam-fowler commented 2 years ago

Ah that's probably just an over sight. I'll check it out

adam-fowler commented 2 years ago

Should be fixed in v1.0.2