forked from isaacs/sax-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes sax-js bug 233 (processing instruction ending with "?")
This is the fix for isaacs#233 , but fixed in our fork of the https://github.com/isaacs/sax-js repo since that repo doesn't seem to be getting any attention. The equivalent PR in that repo is isaacs#234 - I've just copied the code here.
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require(__dirname).test({ | ||
xml: '<r><?Is this legal XML??><?Is this legal XML? ?></r>', | ||
expect: [ | ||
['opentagstart', {'name': 'R', 'attributes': {}}], | ||
['opentag', {'name': 'R', 'attributes': {}, 'isSelfClosing': false}], | ||
[ 'processinginstruction', { name: 'Is', body: 'this legal XML?' } ], | ||
[ 'processinginstruction', { name: 'Is', body: 'this legal XML? ' } ], | ||
['closetag', 'R'] | ||
] | ||
}) |