mirror of https://tildegit.org/sbgodin/HtmGem.git
WIP
This commit is contained in:
parent
859b0aad81
commit
d280ceff94
|
@ -83,8 +83,9 @@ $fileContents</pre>
|
||||||
</html>
|
</html>
|
||||||
EOL;
|
EOL;
|
||||||
exit();
|
exit();
|
||||||
} else {
|
}
|
||||||
$t = new \htmgem\GemTextTranslate_html($fileContents);
|
|
||||||
|
$t = new \htmgem\GemTextTranslate_html($fileContents, $textDecoration);
|
||||||
if ("none" == $style) {
|
if ("none" == $style) {
|
||||||
$t->addCss("");
|
$t->addCss("");
|
||||||
} elseif ("/" == @$style[0]) {
|
} elseif ("/" == @$style[0]) {
|
||||||
|
@ -101,7 +102,6 @@ EOL;
|
||||||
} else { #TODO: regex check for $style
|
} else { #TODO: regex check for $style
|
||||||
$t->addCss("/htmgem/css/$style.css");
|
$t->addCss("/htmgem/css/$style.css");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
echo $t->getFullHtml();
|
echo $t->getFullHtml();
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,7 @@ class GemtextTranslate_html {
|
||||||
|
|
||||||
function __construct($parsedGemtext, $textDecorationEnabled=true) {
|
function __construct($parsedGemtext, $textDecorationEnabled=true) {
|
||||||
if (empty($parsedGemtext))
|
if (empty($parsedGemtext))
|
||||||
// So translate() will do no loop.
|
$parsedGemtext = "";
|
||||||
$parsedGemtext = array();
|
|
||||||
elseif (is_string($parsedGemtext))
|
elseif (is_string($parsedGemtext))
|
||||||
// to delete the last empty line, <p> </p> in HTML
|
// to delete the last empty line, <p> </p> in HTML
|
||||||
$parsedGemtext = rtrim($parsedGemtext);
|
$parsedGemtext = rtrim($parsedGemtext);
|
||||||
|
|
Loading…
Reference in New Issue