ext/generate.c in rdiscount-1.2.6.2 vs ext/generate.c in rdiscount-1.2.7
- old
+ new
@@ -699,11 +699,11 @@
if ( size == 0 )
return 0;
if ( maybetag || (size >= 3 && strncmp(cursor(f), "!--", 3) == 0) ) {
Qstring(forbidden_tag(f) ? "<" : "<", f);
- while ( ((c = peek(f, size+1)) != EOF) && (c != '>') )
+ while ( ((c = peek(f, 1)) != EOF) && (c != '>') )
cputc(pull(f), f);
return 1;
}
if ( f->flags & DENY_A ) return 0;
@@ -923,9 +923,25 @@
Qchar(c, f);
break;
case '[': if ( tag_text(f) || !linkylinky(0, f) )
Qchar(c, f);
break;
+#if SUPERSCRIPT
+ case '^': if ( isthisspace(f,-1) || isthisspace(f,1) )
+ Qchar(c,f);
+ else {
+ char *sup = cursor(f);
+ int len = 0;
+ Qstring("<sup>",f);
+ while ( !isthisspace(f,1+len) ) {
+ ++len;
+ }
+ shift(f,len);
+ reparse(sup, len, 0, f);
+ Qstring("</sup>", f);
+ }
+ break;
+#endif
case '*':
case '_': if ( tag_text(f) )
Qchar(c, f);
#if RELAXED_EMPHASIS
else if ( peek(f,1) == c ) {