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

Class mapping fails for unquoted class attribute #72

Open
haraldrudell opened this issue Jul 7, 2012 · 3 comments
Open

Class mapping fails for unquoted class attribute #72

haraldrudell opened this issue Jul 7, 2012 · 3 comments

Comments

@haraldrudell
Copy link

It seems to me class mapping fails for unquoted class attributes.

html5 does not require quoted attributes. We're in html5 now.

Here's a printout demonstrating the issue:

function testPlates() {
    console.log(arguments.callee.toString())
    map.class('appName').to('title')
    var o = { title: 'Boss' }
    console.log('1', plates.bind('<div class=appName></div>', o, map))
    console.log('2', plates.bind('<div class="appName"></div>', o, map))
}
1 <div class=appName></div>
2 <div class="appName">Boss</div>

case 2 works as expected
BUG: case 1 was expected to have Boss inserted into the tags body

1 <div class=appName>Boss</div>
@haraldrudell
Copy link
Author

node.js, plates 0.4.6

@heapwolf
Copy link
Contributor

could this be a simple regexp fix?

@3rd-Eden
Copy link
Member

Yes it would be a simple regexp change, the fix can probably be combined with #63 as that probably also caused by a to-strict regexp.

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

3 participants