Page MenuHomePhabricator

CSS not being parsed properly for spacing or for complex decimal values
Open, Needs TriagePublic

Description

  1. Spacing in CSS for human readability breaks the syntax highlighting:
<syntaxhighlight lang="CSS" inline>margin-top: 0; margin-bottom: -0.5em;</syntaxhighlight>

shows up almost entirely green.

  1. If you run all the code together into a blob, it starts working, but it doesn't work properly for a value like -0.5em:
<syntaxhighlight lang="CSS" inline>margin-top:0;margin-bottom:-0.5em;</syntaxhighlight>

That is mis-parsing the -0.5em value as a separate -0 (no such thing) and turning it purple, followed by a .5em, in blue. This effect is even partially visible if you render the first example above: the entire code block is green except .5em.

Conditions: Just using <syntaxhighlight> at en.wikipedia.org. For a quick look at these examples in rendered form, see them in the table after the first block of discussion at https://en.wikipedia.org/w/index.php?title=User_talk:N%C3%B8kkenbuer&oldid=847447251#Misuse_of_syntax_highlighting

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 25 2018, 1:04 PM
Vvjjkkii renamed this task from CSS not being parsed properly for spacing or for complex decimal values to ocaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from ocaaaaaaaa to CSS not being parsed properly for spacing or for complex decimal values.Jul 2 2018, 10:12 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
TheDJ moved this task from Backlog to To upstream/missing upstream link on the Upstream board.