https://bugs.kde.org/show_bug.cgi?id=471501

            Bug ID: 471501
           Summary: Add SyntaxHighlight extension.
    Classification: Websites
           Product: KDE MediaWiki
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: schwanc...@protonmail.com
          Reporter: ash...@linuxcomp.ru
  Target Milestone: ---

For the wiki pages, it would be good to show syntax highlighting. See for
example this page:
https://community.kde.org/Get_Involved/development/More#Build_Qt6_using_kdesrc-build
Long file content with lots of comments is hard to read when the comments and
actual code are the same color.

I currently manually colored the text there (opened in vim with kdesrc-buildrc
syntax installed, choosed a good theme (I used "shine", but made comments color
a bit more bright), saved with TOhtml command, replaced span attributes
class="" with syntax="...").

With that approach, it is hard to edit the wiki. The SyntaxHighlight
https://www.mediawiki.org/wiki/Extension:SyntaxHighlight extension will allow
to make it automatically.

It uses Pygments (https://pygments.org), and it is said there that it is very
easy to create your own languages (for our case it is kdesrc-buildrc). But even
if not do this, we can just at least highlight it as bash, and this will
significantly easify reading (comments will be different color from the code). 

ADDITIONAL INFORMATION
Discussed in Matrix

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to