feat(panettone): don't use _ for em in inline markdown

Since we are still using third_party, underscores are kind of common in
issue titles and are probably often forgotten to escape. Let's just
support `*` for emphasized text in titles for now.

Change-Id: I305bcf4d4c59123bba4ce816a6da2ee8b022c34e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2926
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
sterni 2021-04-11 02:24:21 +02:00
parent d7b89df748
commit 4edef59ba4
2 changed files with 5 additions and 6 deletions

View file

@ -3,7 +3,6 @@
(define-constant +inline-markup-types+ (define-constant +inline-markup-types+
'(("~~" :del) '(("~~" :del)
("_" :em)
("*" :em) ("*" :em)
("`" :code)) ("`" :code))
:test #'equal) :test #'equal)

View file

@ -10,12 +10,12 @@
(inline-markdown-unit-test (inline-markdown-unit-test
inline-markdown-typical-test inline-markdown-typical-test
"hello _world_, here is ~~no~~ `code`!" "hello *world*, here is ~~no~~ `code`!"
"hello <em>world</em>, here is <del>no</del> <code>code</code>!") "hello <em>world</em>, here is <del>no</del> <code>code</code>!")
(inline-markdown-unit-test (inline-markdown-unit-test
inline-markdown-two-emphasize-types-test inline-markdown-two-emphasize-types-test
"_stress_ *this*" "*stress* *this*"
"<em>stress</em> <em>this</em>") "<em>stress</em> <em>this</em>")
(inline-markdown-unit-test (inline-markdown-unit-test
@ -30,8 +30,8 @@
(inline-markdown-unit-test (inline-markdown-unit-test
inline-markdown-escaping-test inline-markdown-escaping-test
"A backslash \\\\ shows: \\*, \\_, \\` and \\~~" "A backslash \\\\ shows: \\*, \\` and \\~~"
"A backslash \\ shows: *, _, ` and ~~") "A backslash \\ shows: *, ` and ~~")
(inline-markdown-unit-test (inline-markdown-unit-test
inline-markdown-nested-escaping-test inline-markdown-nested-escaping-test
@ -45,7 +45,7 @@
(inline-markdown-unit-test (inline-markdown-unit-test
inline-markdown-no-unclosed-tags-test inline-markdown-no-unclosed-tags-test
"A tag, once opened, _must be closed" "A tag, once opened, *must be closed"
"A tag, once opened, <em>must be closed</em>") "A tag, once opened, <em>must be closed</em>")
(inline-markdown-unit-test (inline-markdown-unit-test