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

Lua block comment totally broken #32

Closed
hartman opened this issue Nov 13, 2014 · 7 comments
Closed

Lua block comment totally broken #32

hartman opened this issue Nov 13, 2014 · 7 comments

Comments

@hartman
Copy link
Contributor

hartman commented Nov 13, 2014

We updated MediaWiki to the latest version of Geshi last week, but now all Multiline comment blocks in the Lua language no longer close.

Examples:

@hartman
Copy link
Contributor Author

hartman commented Nov 13, 2014

Suspects are:
d55d075#diff-c1c00cfdab2a2a0fafc18e0edd552d99
f532384#diff-c1c00cfdab2a2a0fafc18e0edd552d99

@reedy i think we need to ping Marius :)

@anomiex
Copy link

anomiex commented Nov 13, 2014

More specifically, long-form comments are being matched greedily rather than non-greedily. The patch shown in f532384 seems to be the culprit in changing a .*? to .*.

@anomiex
Copy link

anomiex commented Nov 13, 2014

That same commit seems to have broken the highlighting of multi-line strings, which appears to have been abusing COMMENT_REGEXP in the absence of STRING_REGEXP.

@hartman
Copy link
Contributor Author

hartman commented Nov 13, 2014

I have a tested fix, will open pull request in a bit.

@Streusel
Copy link
Contributor

Streusel commented Dec 4, 2014

@hartman Alignment issue and nothing points to the first index, only 2 and 3, intended?

edit: nvm, you fixed the alignment in a followup commit, but the first index isn't used.

@hartman
Copy link
Contributor Author

hartman commented Dec 5, 2014

@Streusel well, I mirrored how this was done for PHP. So 'COMMENT_SINGLE' => array(1 => "--") would be index 1.

I admit i didn't check if that is actually the correct or proper way to do it, but it seems to work for the php file.

hartman added a commit to hartman/geshi-1.0 that referenced this issue Feb 2, 2016
- Match comments non-greedily instead of greedily
- Re-add support for block strings (similar to heredoc)

Wikipedia issue: https://bugzilla.wikimedia.org/show_bug.cgi?id=73281
Wikipedia review: https://gerrit.wikimedia.org/r/173104

This fixues issue GeSHi#32
@splitbrain
Copy link
Contributor

This should be fixed with the merge of #63 and can be closed I believe.

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

5 participants