mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Merge pull request #36 from dangerdan/parse-fix
Regex change to support combo of tab & space in md
This commit is contained in:
commit
17527f63d3
@ -96,7 +96,7 @@ class DocumentationParser {
|
|||||||
$inner = true;
|
$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
|
// inner line of block, or first line of standard markdown code block
|
||||||
// regex removes first tab (any following tabs are part of the code).
|
// regex removes first tab (any following tabs are part of the code).
|
||||||
$output[$i] = ($started) ? '' : '<pre>' . "\n";
|
$output[$i] = ($started) ? '' : '<pre>' . "\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user