Syntx highlighting not working properly for PERL #4800

Closed
opened 2025-11-02 06:03:13 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Aranad on GitHub (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

Originally created by @Aranad on GitHub (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](https://user-images.githubusercontent.com/1755922/73888859-6bada080-483c-11ea-9138-38df64b5ff7c.png)
GiteaMirror added the issue/confirmed label 2025-11-02 06:03:13 -06:00
Author
Owner

@jolheiser commented on GitHub (Feb 5, 2020):

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

Related: #7729

@jolheiser commented on GitHub (Feb 5, 2020): This is likely due to our use of [highlight.js](https://highlightjs.org/) It may (or may not) be mitigated by switching to another highlighter. Related: #7729
Author
Owner

@silverwind commented on GitHub (Feb 5, 2020):

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

@silverwind commented on GitHub (Feb 5, 2020): Please show an example on https://try.gitea.io/.
Author
Owner

@Aranad commented on GitHub (Feb 5, 2020):

Ok thanks I added a couple of examples here.

@Aranad commented on GitHub (Feb 5, 2020): Ok thanks I added a couple of examples [here](https://try.gitea.io/Aranad/Test).
Author
Owner

@silverwind commented on GitHub (Feb 5, 2020):

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

@silverwind commented on GitHub (Feb 5, 2020): It is detected properly as perl source (seen in HTML `<code class="perl hljs">`), so it is very likely a bug in [highlight.js](https://github.com/highlightjs/highlight.js).
Author
Owner

@stale[bot] commented on GitHub (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[bot] commented on GitHub (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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4800