mirror of
https://tildegit.org/sbgodin/HtmGem.git
synced 2023-08-25 13:53:12 +02:00
Improves processing of ^^^ and ^
This commit is contained in:
parent
6a37ecebcf
commit
ac0de467ab
12
htmgem.php
12
htmgem.php
@ -103,14 +103,16 @@ foreach ($fileLines as $line) {
|
||||
if (empty($line)) {
|
||||
echo "<p> </p>\n";
|
||||
} elseif ('^^^' == $line3) {
|
||||
$mode_textAttributes = !$mode_textAttributes;
|
||||
} elseif ('^' == $line1) {
|
||||
if (preg_match("/^\^\s*(.*)$/", $line, $parts)) {
|
||||
$line = $parts[1];
|
||||
$mode_textAttributes_temp = true;
|
||||
if (preg_match("/^\^\^\^\s+(.*)$/", $line)) {
|
||||
$mode_textAttributes = !$mode_textAttributes;
|
||||
} else {
|
||||
$mode = "raw";
|
||||
continue;
|
||||
}
|
||||
} elseif ('^' == $line1 and !$mode_textAttributes_temp) {
|
||||
preg_match("/^\^\s*(.*)$/", $line, $parts);
|
||||
$line = $parts[1];
|
||||
$mode_textAttributes_temp = true;
|
||||
continue;
|
||||
} elseif ("#" == $line1) {
|
||||
preg_match("/^(#{1,3})\s*(.*)/", $line, $sharps);
|
||||
|
Loading…
Reference in New Issue
Block a user