Page MenuHomePhabricator

GeSHI highlighting is broken for bashwhen an apostrophe/single quote is encountered inside a comment
Closed, ResolvedPublic

Description

Author: facadeofwalls

Description:
When an apostrophe or single quote is inside a quote, it is highlighted as if it's part of a command, i.e. it turns red until another single quote is found. Here's a simple example:

<source lang="bash">

  1. This is some text
  2. This is some more text
  3. It's a wonderful life
  4. This is more text that shouldn't be red

echo this is a command
</source>

An example of when this occurs in practice is [http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Using_vim_or_another_console_editor here]. It is fixed upstream as evidenced by the demonstration box on [http://qbnz.com/highlighter/ the front GeSHI page].


Version: unspecified
Severity: enhancement

Details

Reference
bz18553

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:36 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz18553.
bzimport added a subscriber: Unknown Object (MLST).

herd wrote:

Similar for javascript, most probably due to crappy regex.
<source lang="javascript">var foo = /\'/;var bar = "wat";</source>

This isn't really the fault of the MediaWiki extension but the GeSHI backend. Suggest dupe to bug 10967 (same as bug 15175 was) if the bug is fixed in newer versions.

Confirmed that these are fixed in new versions. Duping.

  • This bug has been marked as a duplicate of bug 10967 ***