nihdoc

WIP markup parser (txt -> html)
git clone git://git.alexkarle.com.com/blag
Log | Files | Refs | README | LICENSE

commit 39569ef782d50a47b05695fd2bbbabddf596c7f2 (patch)
parent 1884b58ddb9f947e3257294e4f01e372962f37d3
Author: Alex Karle <alex@alexkarle.com>
Date:   Sun, 19 Dec 2021 01:44:29 -0500

Allow inline styles in url descriptions

Diffstat:
Mblag.c | 6+++---
Mtest/big.html | 4++++
Mtest/big.txt | 2++
3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/blag.c b/blag.c @@ -187,7 +187,7 @@ int parse() { } break; case '`': - if (s.in_link == NONE && s.in != CODE) { + if (s.in_link != LINK_URL_PARSE && s.in != CODE) { if (s.in_code) { printf("</code>"); s.in_code = 0; @@ -200,7 +200,7 @@ int parse() { } break; case '*': - if (!s.in_code && s.in_link == NONE && s.in != CODE) { + if (!s.in_code && s.in_link != LINK_URL_PARSE && s.in != CODE) { if (s.in_bold) { printf("</strong>"); s.in_bold = 0; @@ -213,7 +213,7 @@ int parse() { } break; case '_': - if (!s.in_code && s.in_link == NONE && s.in != CODE) { + if (!s.in_code && s.in_link != LINK_URL_PARSE && s.in != CODE) { if (s.in_ital) { printf("</em>"); s.in_ital = 0; diff --git a/test/big.html b/test/big.html @@ -83,3 +83,7 @@ $ git status <p> cheers! </p> + +<p> +<a href="gopher://alexkarle.com">use <code>sacc(1)</code></a> +</p> diff --git a/test/big.txt b/test/big.txt @@ -33,3 +33,5 @@ my [gopher://alexkarle.com gopherhole]. <html> is escaped! cheers! + +[gopher://alexkarle.com use `sacc(1)`]