commit
2c7b9d2ec0
2 changed files with 8 additions and 2 deletions
6
smu.c
6
smu.c
|
@ -449,10 +449,12 @@ dosurround(const char *begin, const char *end, int newblock) {
|
|||
start = begin + l;
|
||||
p = start - 1;
|
||||
do {
|
||||
stop = p;
|
||||
p = strstr(p + 1, surround[i].search);
|
||||
} while(p && p[-1] == '\\');
|
||||
if(!p || p >= end ||
|
||||
!(stop = strstr(start, surround[i].search)) || stop >= end)
|
||||
if (p && p[-1] != '\\')
|
||||
stop = p;
|
||||
if(!stop || stop < start || stop >= end)
|
||||
continue;
|
||||
fputs(surround[i].before, stdout);
|
||||
if(surround[i].process)
|
||||
|
|
4
testdoc
4
testdoc
|
@ -7,6 +7,10 @@ simple tests
|
|||
first paragraph.
|
||||
testing surround: _emph_ then **strong** and `code`.
|
||||
|
||||
`\`escaped backticks\``.
|
||||
|
||||
`x = *y * 6;`
|
||||
|
||||
horizontal rule:
|
||||
|
||||
- - -
|
||||
|
|
Loading…
Add table
Reference in a new issue