A few more HTML conversion improvements

- Fix segfault on empty output (bug was in XS code)
- Still better end-of-URL detection
- Recognize a few common multicharacter sections in man references
This commit is contained in:
Yorhel 2017-01-15 20:27:16 +01:00
parent 1ccc86ce86
commit 746889851c
3 changed files with 18 additions and 5 deletions

View file

@ -20,7 +20,7 @@ html(str)
STRLEN len;
char *inbuf = SvPV(str, len);
struct StringWrap buf = grotty2html_wrap(inbuf, len);
SV *dest = newSVpv(buf.buf, buf.len);
SV *dest = buf.len ? newSVpv(buf.buf, buf.len) : newSVpv("", 0);
grotty2html_free(buf);
SvUTF8_on(dest);
RETVAL = dest;