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)) {
|
if (empty($line)) {
|
||||||
echo "<p> </p>\n";
|
echo "<p> </p>\n";
|
||||||
} elseif ('^^^' == $line3) {
|
} elseif ('^^^' == $line3) {
|
||||||
$mode_textAttributes = !$mode_textAttributes;
|
if (preg_match("/^\^\^\^\s+(.*)$/", $line)) {
|
||||||
} elseif ('^' == $line1) {
|
$mode_textAttributes = !$mode_textAttributes;
|
||||||
if (preg_match("/^\^\s*(.*)$/", $line, $parts)) {
|
|
||||||
$line = $parts[1];
|
|
||||||
$mode_textAttributes_temp = true;
|
|
||||||
} else {
|
} else {
|
||||||
$mode = "raw";
|
$mode = "raw";
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
} elseif ('^' == $line1 and !$mode_textAttributes_temp) {
|
||||||
|
preg_match("/^\^\s*(.*)$/", $line, $parts);
|
||||||
|
$line = $parts[1];
|
||||||
|
$mode_textAttributes_temp = true;
|
||||||
continue;
|
continue;
|
||||||
} elseif ("#" == $line1) {
|
} elseif ("#" == $line1) {
|
||||||
preg_match("/^(#{1,3})\s*(.*)/", $line, $sharps);
|
preg_match("/^(#{1,3})\s*(.*)/", $line, $sharps);
|
||||||
|
Loading…
Reference in New Issue
Block a user