diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-28 14:46:32 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-28 17:03:15 +0300 |
commit | ad187092129d967961e621b2ce416d817c760810 (patch) | |
tree | eb8f5ed1ba35744a868ee3019cf54179fd6396fc | |
parent | fd596a5d578ece78b48ce3626d58dd6f9a4739fb (diff) |
GmDocument: Markdown regex tweak
-rw-r--r-- | src/gmdocument.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 632d3a02..8b24ce29 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -2063,8 +2063,9 @@ static void convertMarkdownToGemtext_GmDocument_(iGmDocument *d) { | |||
2063 | replaceRegExp_String(&ln, iClob(new_RegExp("\\*\\*(.+?)\\*\\*", 0)), "\x1b[1m\\1\x1b[0m", NULL, NULL); | 2063 | replaceRegExp_String(&ln, iClob(new_RegExp("\\*\\*(.+?)\\*\\*", 0)), "\x1b[1m\\1\x1b[0m", NULL, NULL); |
2064 | replaceRegExp_String(&ln, iClob(new_RegExp("__(.+?)__", 0)), "\x1b[1m\\1\x1b[0m", NULL, NULL); | 2064 | replaceRegExp_String(&ln, iClob(new_RegExp("__(.+?)__", 0)), "\x1b[1m\\1\x1b[0m", NULL, NULL); |
2065 | replaceRegExp_String(&ln, iClob(new_RegExp("\\*(.+?)\\*", 0)), "\x1b[3m\\1\x1b[0m", NULL, NULL); | 2065 | replaceRegExp_String(&ln, iClob(new_RegExp("\\*(.+?)\\*", 0)), "\x1b[3m\\1\x1b[0m", NULL, NULL); |
2066 | replaceRegExp_String(&ln, iClob(new_RegExp("\\b_(.+?)_\\b", 0)), "\x1b[3m\\1\x1b[0m", NULL, NULL); | 2066 | replaceRegExp_String(&ln, iClob(new_RegExp("\\b_([^_]+?)_\\b", 0)), "\x1b[3m\\1\x1b[0m", NULL, NULL); |
2067 | replaceRegExp_String(&ln, iClob(new_RegExp("(?<!`)`([^`]+?)`(?!`)", 0)), "\x1b[11m\\1\x1b[0m", NULL, NULL); | 2067 | replaceRegExp_String(&ln, iClob(new_RegExp("(?<!`)`([^`]+?)`(?!`)", 0)), "\x1b[11m\\1\x1b[0m", NULL, NULL); |
2068 | replace_String(&ln, "\\_", "_"); | ||
2068 | append_String(&result, &ln); | 2069 | append_String(&result, &ln); |
2069 | deinit_String(&ln); | 2070 | deinit_String(&ln); |
2070 | } | 2071 | } |