Page MenuHomePhabricator

Syntax highlighting for viewing ShExC code (EntitySchema pages)
Open, Needs TriagePublic

Description

As a Wikidata editor, I would like to be able to read ShEx more easily.

Problem:
We do not have syntax highlighting when viewing EntitySchema pages – just a dull, grey <pre>.

Note that this is distinct from syntax highlighting when editing the pages (T224962).

Example:
https://www.wikidata.org/wiki/EntitySchema:E10

Screenshots/mockups:
Current:


With Pygments:

Tech notes:
Pygments support for ShEx was merged recently-ish (pull request), but has not made it into any release yet. And once it’s released, we’ll presumably have to wait for Extension:SyntaxHighlight to pull in the new Pygments version.

BDD
GIVEN
AND
WHEN
AND
THEN
AND

Acceptance criteria:

Open questions:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 21 2019, 2:57 PM

Color is nice but imho decoding the P and Q numbers is critical. See this comment for details https://phabricator.wikimedia.org/T224962#5789394