diff --git a/src/mdutil.c b/src/mdutil.c index 3be66c5..709610e 100644 --- a/src/mdutil.c +++ b/src/mdutil.c @@ -125,6 +125,7 @@ notheader: if (line[0] == '<') { char *testline; + int isopen; testline = line + 1; for (i = 0; i < LEN(concretetags); ++i) { char *aftertag; @@ -137,8 +138,12 @@ notheader: return; } } - if (testline[0] == '/') + if (testline[0] == '/') { ++testline; + isopen = 0; + } + else + isopen = 1; for (i = 0; i < LEN(skeletontags); ++i) { char *aftertag; aftertag = after(skeletontags[i], testline); @@ -152,7 +157,72 @@ notheader: return; } } + + /* < || `", newtestline[0]) + == NULL && + newtestline[0] != '\0') + ++newtestline; + if (newtestline[0] == '\0') + goto nothtml; + break; + /* Swallow unquoted attribute value */ + } + } + /* Swallow attribute value */ + + testline = newtestline; + } + + /* <[tag name][attribute]* || ') { + ret->type = GENERICTAG; + ret->data.isfirst = 1; + return; + } } +nothtml: ret->type = PLAIN; return; diff --git a/test.md b/test.md deleted file mode 100644 index 7470180..0000000 --- a/test.md +++ /dev/null @@ -1,5 +0,0 @@ -

- This should just be raw HTML -

- -This should not be