Page MenuHomePhabricator

CodeMirror not recognizing Tableheaders on single text row
Closed, ResolvedPublic5 Estimate Story Points


In this screenshot, the !! should be in pink, too. They are not currently being wrapped in the cm-mw-table-delimiter class.

Code for pasting/testing:

{| class="wikitable"
! Header text !! Header text !! foo 
| Example || Example || foo

Live diff with that example, and a more complex example, at


Related Gerrit Patches:
mediawiki/extensions/CodeMirror : masterFix highlighting of table headers on single text row

Event Timeline

Quiddity created this task.Nov 1 2017, 8:58 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptNov 1 2017, 8:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika triaged this task as Low priority.Nov 7 2017, 11:09 PM
MusikAnimal added a subscriber: MusikAnimal.EditedNov 7 2017, 11:19 PM

Unrelated but interesting issue, when I follow the example link in NWE, I get the current content of the page, not that as of that revision. It needs veaction=editsource

Created a bug at T179994 !

Niharika updated the task description. (Show Details)Mar 7 2018, 12:16 AM
TBolliger set the point value for this task to 5.
TBolliger added a subscriber: TBolliger.

Unit tests will help minimize side-effect bugs caused by this. Blocked by T169592: Create unit tests for CodeMirror

MusikAnimal edited projects, added Community-Tech-Sprint; removed Community-Tech.

Change 419323 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/extensions/CodeMirror@master] Fix highlighting of table headers on single text row

I'm having a really hard time with unit tests (T169592), but the fix for this issue was really easy and seemingly low-risk. The code was already there:

isHead && stream.match( '!!' )

we just forgot to specify ! as one of the characters that should be parsed in tables (when it is not the first character on the line).

Change 419323 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Fix highlighting of table headers on single text row

Niharika closed this task as Resolved.Mar 13 2018, 10:41 PM
Niharika moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.
Niharika added a subscriber: Niharika.