-
Notifications
You must be signed in to change notification settings - Fork 2
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
Module for replacing empty nodes by containing tags #4
Module for replacing empty nodes by containing tags #4
Conversation
dc337f6
to
6cb093b
Compare
@@ -0,0 +1,289 @@ | |||
var tidy = require('../'); | |||
|
|||
describe('Replacing empty dom nodes with containing tags', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add tests for common cases
<p>{{#tag}}</p>
<p>Hello world</p>
<p>{{/tag}}</p>
should become {{#tag}}<p>Hello world</p>{{/tag}}
and
<p>{{#tag}}</p>
<p>Hello world</p>
<p>{{/tag}} {{^tag}}</p>
<p>Good night</p>
<p>{{/tag}}</p>
should become {{#tag}}<p>Hello world</p>{{/tag}} {{^tag}}<p>Good night</p>{{/tag}}
scripts/utils.js
Outdated
ProcessExternalResources: false | ||
}; | ||
|
||
var Node = require('../node_modules/jsdom/lib/jsdom/living/generated/Node.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use require('jsdom/lib/jsdom/living/generated/Node.js')
?
eea6520
to
2dc790c
Compare
To correctly handle
This is related to current algo - while handling current tags section, it does not look for sibling tags (for better performance), and just consideres them as some data. |
@Minstel You should treat If a |
No description provided.