diff options
| author | 2025-03-17 08:27:38 +0100 | |
|---|---|---|
| committer | 2025-03-17 08:27:38 +0100 | |
| commit | dd318eb6b26b6ca7eccca5bb6377058a87d60f1d (patch) | |
| tree | 4a8c2672774122c2dcc4193858f831d1ecc2412b | |
| parent | Minor tweak. (diff) | |
| download | snac2-dd318eb6b26b6ca7eccca5bb6377058a87d60f1d.tar.gz snac2-dd318eb6b26b6ca7eccca5bb6377058a87d60f1d.tar.xz snac2-dd318eb6b26b6ca7eccca5bb6377058a87d60f1d.zip | |
Reverted the usage of _ for italics (they are causing problems).
| -rw-r--r-- | doc/snac.5 | 2 | ||||
| -rw-r--r-- | format.c | 7 |
2 files changed, 1 insertions, 8 deletions
| @@ -24,7 +24,7 @@ A special subset of Markdown is allowed, including: | |||
| 24 | .It bold | 24 | .It bold |
| 25 | **text between two pairs of asterisks** | 25 | **text between two pairs of asterisks** |
| 26 | .It italic | 26 | .It italic |
| 27 | *text between a pair of asterisks* or _between a pair of underscores_ | 27 | *text between a pair of asterisks* |
| 28 | .It strikethrough text | 28 | .It strikethrough text |
| 29 | ~~text between a pair of tildes~~ | 29 | ~~text between a pair of tildes~~ |
| 30 | .It underlined text | 30 | .It underlined text |
| @@ -95,7 +95,6 @@ static xs_str *format_line(const char *line, xs_list **attach) | |||
| 95 | "~~[^~]+~~" "|" | 95 | "~~[^~]+~~" "|" |
| 96 | "\\*\\*?\\*?[^\\*]+\\*?\\*?\\*" "|" | 96 | "\\*\\*?\\*?[^\\*]+\\*?\\*?\\*" "|" |
| 97 | ":.+:" "|" //emotes | 97 | ":.+:" "|" //emotes |
| 98 | "_[^_]+_" "|" //anzu | ||
| 99 | "__[^_]+__" "|" //anzu | 98 | "__[^_]+__" "|" //anzu |
| 100 | "!\\[[^]]+\\]\\([^\\)]+\\)" "|" | 99 | "!\\[[^]]+\\]\\([^\\)]+\\)" "|" |
| 101 | "\\[[^]]+\\]\\([^\\)]+\\)" "|" | 100 | "\\[[^]]+\\]\\([^\\)]+\\)" "|" |
| @@ -139,12 +138,6 @@ static xs_str *format_line(const char *line, xs_list **attach) | |||
| 139 | xs *s2 = xs_fmt("<u>%s</u>", s1); | 138 | xs *s2 = xs_fmt("<u>%s</u>", s1); |
| 140 | s = xs_str_cat(s, s2); | 139 | s = xs_str_cat(s, s2); |
| 141 | } | 140 | } |
| 142 | else | ||
| 143 | if (xs_startswith(v, "_")) { | ||
| 144 | xs *s1 = xs_strip_chars_i(xs_dup(v), "_"); | ||
| 145 | xs *s2 = xs_fmt("<i>%s</i>", s1); | ||
| 146 | s = xs_str_cat(s, s2); | ||
| 147 | } | ||
| 148 | //anzu - end | 141 | //anzu - end |
| 149 | else | 142 | else |
| 150 | if (xs_startswith(v, "~~")) { | 143 | if (xs_startswith(v, "~~")) { |