View Issue Details

IDProjectCategoryView StatusLast Update
0034124mantisbtmarkdownpublic2024-04-06 11:15
Reporterhotzeplotz Assigned Tocommunity  
PrioritylowSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Product Version2.26.1 
Target Version2.27.0 
Summary0034124: Add syntax highlighting to markdown codeblocks
Description

Having nice syntax highlighting in codeblocks.

As an additional to 0034040

TagsNo tags attached.

Relationships

related to 0034040 resolvedcommunity Markdown processing code cleanup (part 2) 
has duplicate 0034383 closeddregad Add a switch to control the usage of syntax hightlighting. 

Activities

dregad

dregad

2024-03-18 03:59

developer   ~0068668

PR https://github.com/mantisbt/mantisbt/pull/1976

hotzeplotz

hotzeplotz

2024-04-01 12:51

reporter   ~0068764

As stated by @atrol in this comment, prismjs needs to be tracked to avoid using a third party that is not maintained.

dregad

dregad

2024-04-01 16:10

developer   ~0068770

Also take in consideration my remark in PR 1976:

I also think it would be a good idea to allow use of a CDN when MantisBT is configured with $g_cdn_enabled = ON;, possibly with https://prismjs.com/plugins/autoloader, but this can be done as a separate work item.

Some ideas for future improvement (not needed as part of this PR unless you're feeling fancy and got time on your hands �)

hotzeplotz

hotzeplotz

2024-04-04 12:31

reporter   ~0068789

Have created a PR to show how it could work.

$g_cdn_enabled

is currently not respected, not yet.

allow the admin to pick additional languages

Autoloading works very fine so far. Allowing to pick defaults, means "packaging" of a default file. Will do it later if it seems good in general.

hotzeplotz

hotzeplotz

2024-04-06 11:14

reporter   ~0068793

Last edited: 2024-04-06 11:15

g_cdn_enabled

Added, works fine. The themes are reduced to the basic ones, because only the base themes are delivered by "https://cdnjs.com/libraries/prism/1.29.0"