* < stuff > to soh stuff stx
* </> to ack ack etx
*/
- char *c;
+ char *c, *c1;
for (c = str; *c; c += 1) {
if (c[0] == soh || c[0] == ack)
break;
continue;
}
c[0] = soh;
- while (c[0] && c[1] != '>')
- c++;
- if (!c[0])
+ c += 1;
+ c1 = c;
+ while (*c && *c != '>') {
+ if (*c == '\\' &&
+ (c[1] == '\\' || c[1] == '>'))
+ c++;
+ *c1++ = *c++;
+ }
+ while (c1 < c)
+ *c1++ = ack;
+ if (!*c)
break;
- c[1] = stx;
+ *c = stx;
}
return str;
}
<space-above:40,space-below:10,20,fg:blue,bg:yellow,center>This is my test file for markup</>
<word-wrap,wrap-tail:,wrap-head:-),wrap-,right:400,left:70>Now is the time for all good men to come to the aid of the party</a>
-<wrap-tail:,wrap-head:-),wrap-,right:400,left:70>Now is the time for all good men to come to the aid of the party</a>
+<wrap-tail:,wrap-head:-\>,wrap-,right:300,left:70>Now is the time for all good men to come to the aid of the party</a>
+
+LEFT<ctab,bg:green>MIDDLE</><rtab>RIGHT
+
+<word-wrap,tab:40,wrap-margin,right:300><tab:0>This is a line that should wrap to form a paragraph with hanging indent</>