We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[x]
Hello, as per title: In blame view, if you comment some line after the first line of a chain, the syntax highlighting is broken to the end of file. Tried with php and java files. here are examples: https://try.gitea.io/TbHG1AUy7x7vkj10/test-blame-bug/blame/branch/master/HelloWorld.java https://try.gitea.io/TbHG1AUy7x7vkj10/test-blame-bug/blame/branch/master/index.php
https://i.imgur.com/XcvSXpS.png https://i.imgur.com/ISWfM76.png
The text was updated successfully, but these errors were encountered:
Your languages are detected correctly in those examples, which means this is a highlight.js bug, report it there instead.
Sorry, something went wrong.
Thanks for pointing me in the right direction.
TLDR: there needs to be new lines in the html after every line of code for highlight.js to work correctly
After some fiddling with highlight.js and looking at the source and the comment regexes, and comparing the html source generated for the "normal" and "blame" views in gitea, there was a little difference: https://github.com/go-gitea/gitea/blob/master/routers/repo/blame.go#L239 https://github.com/go-gitea/gitea/blob/master/routers/repo/view.go#L313 so a simple change fixed the issue eldiaboloz@bf39e6f
@eldiaboloz please send a PR
fix syntax highlight in blame view go-gitea#6895
7094ea4
PR sent 6909
fix syntax highlight in blame view #6895 (#6909)
13583a6
No branches or pull requests
[x]
):Description
Hello,
as per title: In blame view, if you comment some line after the first line of a chain, the syntax highlighting is broken to the end of file. Tried with php and java files.
here are examples:
https://try.gitea.io/TbHG1AUy7x7vkj10/test-blame-bug/blame/branch/master/HelloWorld.java
https://try.gitea.io/TbHG1AUy7x7vkj10/test-blame-bug/blame/branch/master/index.php
Screenshots
https://i.imgur.com/XcvSXpS.png
https://i.imgur.com/ISWfM76.png
The text was updated successfully, but these errors were encountered: