Page MenuHomePhabricator

Highlight definition lists
Open, LowPublic

Description

Currently, in

:foo
;bar

only the colon is highlighted, not the semicolon. They should both be highlighted.

Event Timeline

Schnark created this task.Jul 8 2017, 8:33 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 8 2017, 8:33 AM

+1.

For colors, I'd suggest either duplicating the existing -indenting scheme:
.cm-mw-indenting { color: #08f; font-weight: bold; background-color: #ddd; }

or perhaps making a new class, with the background 2 shades darker:
.cm-mw-definition { color: #08f; font-weight: bold; background-color: #bbb; }

DannyH added a subscriber: DannyH.Jul 17 2017, 10:49 PM

Schnark, good catch on the semicolon -- that should be the same blue as the colon.

But why is there a gray background behind the colon? I'm looking at it with Niharika, and we think that's a bug. I don't think there's supposed to be a background like that...

Schnark, good catch on the semicolon -- that should be the same blue as the colon.
But why is there a gray background behind the colon? I'm looking at it with Niharika, and we think that's a bug. I don't think there's supposed to be a background like that...

The semi-colon has a specific use to create HTML <dt> tags (Description list - Term).
The usage is semantically meant to be followed by a :colon (which makes a <dd> HTML tag - (Description list - Description).
Articles follow this practice, which should be encouraged. But allowances do also need to be made for the historical/universal misuse of the colon on discussion pages, merely to create an "indent".

All of which to say:

  • It would be great if we could bold the string that follows the semi-colon, but it must end at the first colon. (which sometimes are on the same line as the semi-colon)

That will make it a LOT easier to read/write articles, where they have definition lists.
E.g.
https://en.wikipedia.org/wiki/Glossary_of_musical_terminology
https://en.wikipedia.org/wiki/Glossary_of_elementary_quantum_mechanics
https://en.wikipedia.org/wiki/Glossary_of_equestrian_terms


I.e. it should match both of these:

; Term : Definition

; Term
: Definition

Niharika triaged this task as Low priority.Nov 7 2017, 11:51 PM