Closed l4u closed 11 years ago
Hi l4u,
From https://github.com/mustache/spec/blob/master/specs/interpolation.yml :
The tag's content MUST be a non-whitespace character sequence NOT containing the current closing delimiter.
So, no, I won't update GRMustache for that.
I would instead open an issue in the pystache repo, so that no more people get bitten by this inconsistency.
Sorry. I hope you don't have too many keys to update.
Thanks, I've posted it at https://github.com/defunkt/pystache/issues/156
@groue may I know which file/lines I should look into? I know this isn't following the specs but I will have to parse those malformed data.
@l4u I did not understand your last question. How may I help you?
I am trying to allow tags with white spaces. seems that it works if I remove the line at https://github.com/groue/GRMustache/commit/dcaa98a891918f7b1054dc92f56976bb1f589201#diff-203bc92a75f3e65b4230515df363c513R208 I am not saying this should be merged :smile: it's just for my special use case
I guess it would work, yes. So go ahead if you prefer this option.
Of course the best option is to stop using white spaces in your keys, and this is what I advise you to do.
Yeah, but unfortunately the mustache templates are out of my control. They are from 3rd parties. :cry:
Well, in that case... You can send them the links to the pystache issue, and to the spec (https://github.com/mustache/spec/blob/master/specs/interpolation.yml). So that they stop producing invalid templates. Eventually. Maybe :smile:
Not sure if this is in the spec, but the python implementation pystache can render
{{ variable name}}
.Is there any way we can render this in GRMustache without throwing an error for compatibility? Because I got data in this format. Thanks!