mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
allow backticks in docs
This commit is contained in:
parent
e70a94267a
commit
6c05f1560b
@ -6,7 +6,7 @@ basicFormatting = {{
|
||||
have a title and 0 or more paragraphs or other section elements.
|
||||
|
||||
Text can be **bold**, __italicized__, ~~strikethrough~~, or
|
||||
''monospaced''.
|
||||
''monospaced'' (or `monospaced`).
|
||||
|
||||
You can link to Unison terms, types, and external URLs:
|
||||
|
||||
|
@ -114,7 +114,7 @@ and the rendered output using `display`:
|
||||
section elements.
|
||||
|
||||
Text can be **bold**, __italicized__, ~~strikethrough~~,
|
||||
or ''monospaced''.
|
||||
or ''monospaced'' (or ''monospaced'').
|
||||
|
||||
You can link to Unison terms, types, and external URLs:
|
||||
|
||||
@ -141,7 +141,7 @@ and the rendered output using `display`:
|
||||
elements.
|
||||
|
||||
Text can be bold, *italicized*, ~~strikethrough~~, or
|
||||
`monospaced`.
|
||||
`monospaced` (or `monospaced`).
|
||||
|
||||
You can link to Unison terms, types, and external URLs:
|
||||
|
||||
@ -581,7 +581,7 @@ Lastly, it's common to build longer documents including subdocuments via `{{ sub
|
||||
section elements.
|
||||
|
||||
Text can be bold, *italicized*, ~~strikethrough~~, or
|
||||
`monospaced`.
|
||||
`monospaced` (or `monospaced`).
|
||||
|
||||
You can link to Unison terms, types, and external URLs:
|
||||
|
||||
|
@ -499,9 +499,12 @@ lexemes' eof =
|
||||
stop' = maybe stop end (lastMay after)
|
||||
|
||||
verbatim =
|
||||
P.label "code (examples: ''**unformatted**'', '''_words_''')" $ do
|
||||
P.label "code (examples: ''**unformatted**'', `words` or '''_words_''')" $ do
|
||||
(start, txt, stop) <- positioned $ do
|
||||
quotes <- lit "''" <+> many (P.satisfy (== '\''))
|
||||
-- a single backtick followed by a non-backtick is treated as monospaced
|
||||
let tick = P.try (lit "`" <* P.lookAhead (P.satisfy (/= '`')))
|
||||
-- also two or more ' followed by that number of closing '
|
||||
quotes <- tick <|> (lit "''" <+> many (P.satisfy (== '\'')))
|
||||
P.someTill P.anySingle (lit quotes)
|
||||
if all isSpace $ takeWhile (/= '\n') txt
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user