Difference between revisions of "User talk:Paxed/MixedSyntaxHighlight"
Jump to navigation
Jump to search
(Bug: regexp eats leading spaces) |
(→Bug: regexp eats leading spaces) |
||
Line 2: | Line 2: | ||
The regexp <code>/^ <span id=\"line([0-9]{1,4})">[0-9]{1,4}\. *(.*)<\/span>$/</code> causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]]. Presumably, removing the first "*" (or replacing it with "?") would fix the problem. --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC) | The regexp <code>/^ <span id=\"line([0-9]{1,4})">[0-9]{1,4}\. *(.*)<\/span>$/</code> causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]]. Presumably, removing the first "*" (or replacing it with "?") would fix the problem. --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC) | ||
+ | :The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC) |
Revision as of 08:15, 19 December 2010
Bug: regexp eats leading spaces
The regexp /^ <span id=\"line([0-9]{1,4})">[0-9]{1,4}\. *(.*)<\/span>$/
causes indentation using spaces to disappear; see e.g. Source:Pray.c#dosacrifice. Presumably, removing the first "*" (or replacing it with "?") would fix the problem. --Ilmari Karonen 07:10, 19 December 2010 (UTC)
- The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --paxed 08:15, 19 December 2010 (UTC)