-
Notifications
You must be signed in to change notification settings - Fork 152
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
Run parser plugins for top-level unknown elements #627
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -354,7 +354,7 @@ test('editor parses HTML post using parser plugins', (assert) => { | |
editor = new Editor({html, parserPlugins: [parserPlugin]}); | ||
assert.ok(!!editor.post, 'editor loads post'); | ||
|
||
assert.deepEqual(seenTagNames, ['TEXTAREA', 'IMG']); | ||
assert.deepEqual(seenTagNames, ['P', 'TEXTAREA', 'IMG']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this characterized as a bugfix or as a breaking change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would characterise it as a bugfix because the old behaviour meant elements that were expected to go through parser plugins were never seen. I suppose it may be a breaking change if a consumer has built parser plugins to work around the buggy behaviour, I haven't been able to think up an example of that yet 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We talked about this and considered some examples. It seems like it wouldn't break any code we looked at in our quick review, so I'm going to call this a bugfix 👍 |
||
}); | ||
|
||
test('#activeMarkups returns the markups at cursor when range is collapsed', (assert) => { | ||
|
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.
Given an
element
here that is a text node, wouldn't the add call here mean that text node will be passed tothis.runPlugins
twice? Once here and once inpardeNode
.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.
Good catch 😄 Pushed a fix