[Experimental] Add code highlighting in help panel
Needs ReviewPublic

Authored by sirgienko on Nov 10 2018, 3:11 PM.

Details

Summary

Supports Maxima, Octave, Sage.
Python technically support, but python help message don't contains any code, so for user nothing changes
R not support, because all R help open in ScriptEditor (it's should be fixed).

Also contains some changes (including API), needed by this feature. Maybe, this changes should moved into separated commits.

Examples:
Maxima


Octave:

Sage:

Diff Detail

Repository
R55 Cantor
Branch
add-highlighting-for-help
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4802
Build 4820: arc lint + arc unit
sirgienko created this revision.Nov 10 2018, 3:11 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptNov 10 2018, 3:11 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
sirgienko requested review of this revision.Nov 10 2018, 3:11 PM
apol added a subscriber: apol.Nov 12 2018, 12:35 AM

Maybe it would make sense to use the SyntaxHighlighting framework?

https://api.kde.org/frameworks/syntax-highlighting/html/index.html

(could be out of scope for this patch)

In D16806#358163, @apol wrote:

Maybe it would make sense to use the SyntaxHighlighting framework?

Actually, we already use KSyntaxHighlighting, but still only Repository class. We plan rewrite our highlighting code on KSyntaxHighlighting, but we support adding new variables and functions in runtime for different sessions and backends, and as I know KSyntaxHighlighting don't have features for adding new variables and functions, so it is not very easy and we are planning start work on this after 18.12