Add more highlighting for nested languages in markdown.

Authored by vandenoever on Feb 23 2019, 6:45 PM.

Diff Detail

R216 Syntax Highlighting
nested (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 8766
Build 8784: arc lint + arc unit
vandenoever created this revision.Feb 23 2019, 6:45 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptFeb 23 2019, 6:45 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
vandenoever requested review of this revision.Feb 23 2019, 6:45 PM
vandenoever retitled this revision from yAdd more highlighting for nested languages in markdown. to Add more highlighting for nested languages in markdown..

Could you extend autotests/input/test.markdown ?
Then call ./autotests/ in the build folder to copy the changes into the src folder, and update this patch.

PS: And increase the "version" in the langauge xml element at the beginning of the file :-)

  • added more languages,
  • updated language version
  • updated test files

Even folding works inside fenced blocks.

After running ./autotests/ autotests/folding/example.rmd.fold changed. I did not commit that change.

The language version is now updated and I added a few more languages.

Looks good to me, thanks.

Before committing, could you increase the kateversion="5.0" in the language xml element as well? Otherwise KDE 4 users could get this via the download dialog as well, without getting the depending files due to 5.0 requirements in the other xml files. Then, the local xml files are inconsistent and broken.

dhaumann accepted this revision.Feb 24 2019, 7:38 AM
This revision is now accepted and ready to land.Feb 24 2019, 7:38 AM

Increased kateversion to 5.0.

This revision was automatically updated to reflect the committed changes.

I see that one test fails after committing this patch. The example output was modified by /autotests/ but I did not submit it. I thought it was not related to the markdown change.

Well, if it's fixed by adding the missing reference update then please do so.

Hi Jos, could you please check again the output of the highlighting indexer?

ContextChecker::check: "/home/dh/kde/kf5/src/frameworks/syntax-highlighting/data/syntax/markdown.xml" Unused contexts: QSet("kconfig-code")

The checker says that this context is unused... I think this is a bug.

Jos fixed it in commit


I made that check now required.

All current files pass, people can comment out contexts during development.


Good idea, thanks.