-
Notifications
You must be signed in to change notification settings - Fork 69
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
Multiple clauses does not render correctly #93
Comments
Worth noting that removing either of these two clauses does one of the two expected operations, but both will not work together. |
I don't think this is related to multiple clauses. The bug seems to be that when there is an explicit replacement it is used in all attributes: https://github.com/flatiron/plates/blob/master/lib/plates.js#L324 A possible solution could be: replace with if (shouldSetAttribute && mapping.replace !== key || remove || ('replacePartial1' in mapping && mapping.attribute !== key)) { Sorry that I don't know enough about the code to make a proper patch. |
I've been using
plates
this weekend and I ran into a very strange rendering issue. Using the following HTML snippet:rendering it:
Produces the following output:
The expected output is:
Basically I'm just trying to render
http://github.com/github
tohttp://github.com/indexzero
and replace the innerHTML. It seems like the two clauses:should do this. What am I doing wrong? Or is this a bug?
cc/ @hij1nx @3rd-Eden
The text was updated successfully, but these errors were encountered: