Plugin Directory

Changeset 595405


Ignore:
Timestamp:
09/06/2012 02:31:41 PM (14 years ago)
Author:
x3ro
Message:

Fix bug that caused language tag sequences to work anywhere in the text

E.g. :ruby: would not only work on the first line, but on any line in a
given code block, which caused errors when the text contained something
like ":10:" for example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codecolorer-markdown/trunk/class.codecolorer_markdownextra_parser.php

    r541623 r595405  
    2323
    2424        // Extract the first line from the code-block if it is enclosed in colons
    25         $matched = preg_match('/:([a-z0-9]*):(.*)/ims', $codeblock, $out);
     25        $matched = preg_match('/^[ \t]*:([a-z0-9]*):(.*)/ims', $codeblock, $out);
    2626        $language = $out[1];
    2727        $code = $out[2];
Note: See TracChangeset for help on using the changeset viewer.