Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the a way to specify text with spaces #4

Closed
rkosafo opened this issue May 27, 2017 · 2 comments
Closed

Is the a way to specify text with spaces #4

rkosafo opened this issue May 27, 2017 · 2 comments

Comments

@rkosafo
Copy link

rkosafo commented May 27, 2017

Given

 let x = parseTemplateValue """ {{{ now() |> fmtDate "MMMM/yyyy"}}} """
 let y = parseTemplateValue """ {{{ now() |> fmtDate "MMMM yyyy"}}} """   

where the data is defined as

init
|> add "now" (fun () -> DateTime.Now)
|> add "fmtDate" (fun (fmt:string) (x:DateTime) -> x.ToString (fmt))

x is treated as a function (fmtDate) call with two parameters (the string MMMM/yyyy and the now function call)

y however is treated as a function with three parameters. The MMMM yyyy appears as two different parameters instead of just one. This then causes the templating to fail.

Is this a bug?
How does one specify text with spaces to get y to return something valid?

@Dzoukr
Copy link
Owner

Dzoukr commented May 27, 2017

Hi @rkosafo, thanks for report. Yes, this is bug, I got it in pipeline already . I`ll let you know once fixed.

Dzoukr added a commit that referenced this issue May 29, 2017
Supports using numbers in templates (Issue #5)
Improved parsing logic
@Dzoukr
Copy link
Owner

Dzoukr commented May 29, 2017

Fixed in v1.3.0

@Dzoukr Dzoukr closed this as completed May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants