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

Syntx highlighting not working properly for PERL #10157

Closed
Aranad opened this issue Feb 5, 2020 · 5 comments · Fixed by #12047
Closed

Syntx highlighting not working properly for PERL #10157

Aranad opened this issue Feb 5, 2020 · 5 comments · Fixed by #12047
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented
Milestone

Comments

@Aranad
Copy link

Aranad commented Feb 5, 2020

I notice that many of my scripts in PERL have problems with the syntax highlighting, usually where there's regex involved, e.g.

Screenshot-20200205172429-744x441

@jolheiser
Copy link
Member

This is likely due to our use of highlight.js
It may (or may not) be mitigated by switching to another highlighter.

Related: #7729

@silverwind
Copy link
Member

Please show an example on https://try.gitea.io/.

@Aranad
Copy link
Author

Aranad commented Feb 5, 2020

Ok thanks I added a couple of examples here.

@silverwind
Copy link
Member

It is detected properly as perl source (seen in HTML <code class="perl hljs">), so it is very likely a bug in highlight.js.

@stale
Copy link

stale bot commented Apr 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 6, 2020
@zeripath zeripath added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 8, 2020
@stale stale bot removed the issue/stale label Apr 8, 2020
mrsdizzie added a commit to mrsdizzie/gitea that referenced this issue Jun 24, 2020
This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes go-gitea#7729
Fixes go-gitea#10157
Fixes go-gitea#11825
Fixes go-gitea#7728
Fixes go-gitea#3872
Fixes go-gitea#3682

And perhaps gets closer to go-gitea#9553
@lafriks lafriks added this to the 1.13.0 milestone Jun 30, 2020
lafriks added a commit that referenced this issue Jun 30, 2020
* Server-side syntax hilighting for all code

This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes #7729
Fixes #10157
Fixes #11825
Fixes #7728
Fixes #3872
Fixes #3682

And perhaps gets closer to #9553

* fix line marker

* fix repo search

* Fix single line select

* properly load settings

* npm uninstall highlight.js

* review suggestion

* code review

* forgot to call function

* fix test

* Apply suggestions from code review

suggestions from @silverwind thanks

Co-authored-by: silverwind <[email protected]>

* code review

* copy/paste error

* Use const for highlight size limit

* Update web_src/less/_repository.less

Co-authored-by: Lauris BH <[email protected]>

* update size limit to 1MB and other styling tweaks

* fix highlighting for certain diff sections

* fix test

* add worker back as suggested

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
* Server-side syntax hilighting for all code

This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes go-gitea#7729
Fixes go-gitea#10157
Fixes go-gitea#11825
Fixes go-gitea#7728
Fixes go-gitea#3872
Fixes go-gitea#3682

And perhaps gets closer to go-gitea#9553

* fix line marker

* fix repo search

* Fix single line select

* properly load settings

* npm uninstall highlight.js

* review suggestion

* code review

* forgot to call function

* fix test

* Apply suggestions from code review

suggestions from @silverwind thanks

Co-authored-by: silverwind <[email protected]>

* code review

* copy/paste error

* Use const for highlight size limit

* Update web_src/less/_repository.less

Co-authored-by: Lauris BH <[email protected]>

* update size limit to 1MB and other styling tweaks

* fix highlighting for certain diff sections

* fix test

* add worker back as suggested

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants