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
Rewritten PHP lexer makes kramdown and jekyll tests fail #1603
Comments
@dleidert I've only looked at this quickly but aren't the differences here just the class names? It looks to me like the Rouge classes are more accurate. |
If rouge is working correctly then these tests need to be adjusted and I have to report it to the jekyll and kramdown projects. So the question is: is rouge working correctly? |
Rouge might well have a bug but errors in Jekyll's tests are a matter for Jekyll. If you have a bug with the way Rouge is highlighting something, please provide a sample of the code being highlighted incorrectly (especially helpful if you can link to it in the Dingus). |
The tests expect a behavior and rouge changed it (tests work stable up to rouge 3.21). And the question is if this is intentional. If yes then the tests need adjusting to pick up the new behavior. But still the rouge project also has responsible to provide a stable behavior. |
@dleidert Rouge lexers are sometimes updated to more accurately lex input code. That will necessarily result in different output. We don't view this as a breaking change but do mark these as new feature-level changes (and update the version accordingly). The PHP lexer was updated in v3.22.0 to improve its output (#1489). If there's input that it's lexing incorrectly, please let us know the specific input and we can look at correcting this behaviour. |
When I run the jekyll and ruby-kramdown tests with the latest rouge release some tests fail and it points to the PHP lexer. Here is the output:
In jekyll:
Note the
class="nx"
vsclass="n"
outout.In kramdown:
Note the
class="nx"
vsclass="nc"
output.Name of the lexer
It points to the php lexer, but I'm not sure.
Code sample
Test cases as provided by jekyll and kramdown.
The text was updated successfully, but these errors were encountered: