Nested {'s #54

Closed
Shados opened this Issue Jan 3, 2012 · 2 comments

2 participants

@Shados

Let's imagine for a moment you're using sparkup to write some html, but you're doing it for a templating language that uses something like ${variable} for variable replacements. Naturally enough, you try something along the lines of:

html>head>title{${title}}

But instead of getting the expected

<html>
  <head>
    <title>${title}</title>
  </head>
</html>

You get

<html>
  <head>
    <title>${title</title>
  </head>
</html>

Thusly missing the closing }. In short, please don't simply scan for the next } after a {, match the { to the correct }, or alternatively give us an escape character (forgive me if there is one already, couldn't find one).

@faceleg
Collaborator

I'd love this behaviour as well, if you still use this plugin, could you make a pull request?

@nixon nixon added a commit to nixon/sparkup that referenced this issue Dec 20, 2013
@nixon nixon testcase for issue #54
Add testcase for issue #54, which appears to have been fixed by commit
2fa779e.
a5a27dd
@ghost

It seems like the fix for this was merged into the project, and testing it myself worked, so I'm closing the issue.

@ghost ghost closed this Dec 5, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment