Merge pull request #36 from dangerdan/parse-fix

Regex change to support combo of tab & space in md
This commit is contained in:
Will Rossiter 2014-07-05 19:43:47 +12:00
commit 17527f63d3

View File

@ -96,7 +96,7 @@ class DocumentationParser {
$inner = true;
}
}
elseif(preg_match('/^\t(.*)/', $line, $matches)) {
elseif(preg_match('/^[\ ]{0,3}?[\t](.*)/', $line, $matches)) {
// inner line of block, or first line of standard markdown code block
// regex removes first tab (any following tabs are part of the code).
$output[$i] = ($started) ? '' : '<pre>' . "\n";