Skip to content

Conversation

@bhsd-harry
Copy link

The new class MwnWikitextAST provides async parsing based on wikiparser-node@1.22.0.

@bhsd-harry
Copy link
Author

Will close #93


it('unbinds and rebinds text', function () {
let u = new bot.WikitextAST('Hello world <!-- world --> world');
u.unbind('<!--', '-->');

Check failure

Code scanning / CodeQL

Bad HTML filtering regexp High test

This regular expression only parses --> and not --!> as a HTML comment end tag.

// with multiple unbinds:
u = new bot.WikitextAST('Hello <nowiki>world</nowiki> <!-- world --> world');
u.unbind('<!--', '-->');

Check failure

Code scanning / CodeQL

Bad HTML filtering regexp High test

This regular expression only parses --> and not --!> as a HTML comment end tag.
@bhsd-harry
Copy link
Author

wikiparser-node requires node>=18.17.0

@bhsd-harry
Copy link
Author

@siddharthvp Hi! May I know if you will have time to take a look at this PR?

The CodeQL failure is false positive, and the Node.js CI failure is due to the incompatible requirement (wikiparser-node requires node>=18.17.0). I do not have access to the snyk failure.

@siddharthvp
Copy link
Owner

Sorry for ignoring this PR. While this is very interesting, from a documentation standpoint it makes things murky to have essentially two ways to do the same thing (parsing wikitext). So, I need to think more about how to cleanly integrate this, which would probably involve removing the current non-AST class altogether.

@bhsd-harry
Copy link
Author

While this is very interesting, from a documentation standpoint it makes things murky to have essentially two ways to do the same thing (parsing wikitext). So, I need to think more about how to cleanly integrate this, which would probably involve removing the current non-AST class altogether.

Please take your time! Just FYI, this was your previous comment.

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

Successfully merging this pull request may close these issues.

2 participants