pre2html

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/pre2html.git/
Log | Files | Refs

commit ed24e77c1efac6d659c1bd11d5e791d8e1328427
parent 896a6f1ea6ed48b2de233c06ca407d39b8c1d0b2
Author: Tomas Hlavaty <tom@logand.com>
Date:   Tue,  6 Sep 2011 20:47:18 +0200

link to local anchor implemented

Diffstat:
Mpre2html.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/pre2html.c b/pre2html.c @@ -73,6 +73,18 @@ static void rest(char *b, char *e) { b = n; escape(*b++); } + else if(head("<#", b, e)) { + b += 2; + char *n = find(' ', b, e); + printf("<a href=\"#"); + attr(b, n); + printf("\">"); + b = n + 1; + n = find('>', b, e); + text(b, n); + printf("</a>"); + b = n + 1; + } else escape(*b++); } }