Asciidoc writer: use `
+...+
` form for inline code.
The old `` `a__b__c` `` yields emphasis inside code in asciidoc. To get a pure literal code span, use `` `+a__b__c+` ``.
This commit is contained in:
parent
5affa30e8a
commit
98ee6ca289
3 changed files with 14 additions and 14 deletions
|
@ -436,7 +436,7 @@ inlineToAsciiDoc opts (Quoted qt lst) = do
|
|||
| isAsciidoctor -> [Str "\"`"] ++ lst ++ [Str "`\""]
|
||||
| otherwise -> [Str "``"] ++ lst ++ [Str "''"]
|
||||
inlineToAsciiDoc _ (Code _ str) = return $
|
||||
text "`" <> text (escapeStringUsing (backslashEscapes "`") str) <> "`"
|
||||
text "`+" <> text (escapeStringUsing (backslashEscapes "`") str) <> "+`"
|
||||
inlineToAsciiDoc _ (Str str) = return $ text $ escapeString str
|
||||
inlineToAsciiDoc _ (Math InlineMath str) = do
|
||||
isAsciidoctor <- gets asciidoctorVariant
|
||||
|
|
|
@ -423,7 +423,7 @@ So is *_this_* word.
|
|||
|
||||
So is *_this_* word.
|
||||
|
||||
This is code: `>`, `$`, `\`, `\$`, `<html>`.
|
||||
This is code: `+>+`, `+$+`, `+\+`, `+\$+`, `+<html>+`.
|
||||
|
||||
[line-through]*This is _strikeout_.*
|
||||
|
||||
|
@ -446,7 +446,7 @@ spaces: a^b c^d, a~b c~d.
|
|||
|
||||
`He said, ``I want to go.''' Were you alive in the 70’s?
|
||||
|
||||
Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
|
||||
Here is some quoted ``+code+`' and a ``http://example.com/?foo=1&bar=2[quoted
|
||||
link]''.
|
||||
|
||||
Some dashes: one—two — three—four — five.
|
||||
|
@ -476,11 +476,11 @@ latexmath:[$\alpha + \omega \times x^2$].
|
|||
|
||||
These shouldn’t be math:
|
||||
|
||||
* To get the famous equation, write `$e = mc^2$`.
|
||||
* To get the famous equation, write `+$e = mc^2$+`.
|
||||
* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
|
||||
emphasized.)
|
||||
* Shoes ($20) and socks ($5).
|
||||
* Escaped `$`: $73 _this should be emphasized_ 23$.
|
||||
* Escaped `+$+`: $73 _this should be emphasized_ 23$.
|
||||
|
||||
Here’s a LaTeX table:
|
||||
|
||||
|
@ -610,7 +610,7 @@ ____
|
|||
Blockquoted: http://example.com/
|
||||
____
|
||||
|
||||
Auto-links should not occur here: `<http://example.com/>`
|
||||
Auto-links should not occur here: `+<http://example.com/>+`
|
||||
|
||||
....
|
||||
or here: <http://example.com/>
|
||||
|
@ -635,7 +635,7 @@ anywhere after the footnote reference. It need not be placed at the end of the
|
|||
document.] and another.[multiblock footnote omitted] This should _not_ be a
|
||||
footnote reference, because it contains a space.[^my note] Here is an inline
|
||||
note.footnote:[This is _easier_ to type. Inline notes may contain
|
||||
http://google.com[links] and `]` verbatim characters, as well as [bracketed
|
||||
http://google.com[links] and `+]+` verbatim characters, as well as [bracketed
|
||||
text].]
|
||||
|
||||
____
|
||||
|
|
|
@ -424,7 +424,7 @@ So is *_this_* word.
|
|||
|
||||
So is *_this_* word.
|
||||
|
||||
This is code: `>`, `$`, `\`, `\$`, `<html>`.
|
||||
This is code: `+>+`, `+$+`, `+\+`, `+\$+`, `+<html>+`.
|
||||
|
||||
[line-through]*This is _strikeout_.*
|
||||
|
||||
|
@ -447,8 +447,8 @@ spaces: a^b c^d, a~b c~d.
|
|||
|
||||
'`He said, "`I want to go.`"`' Were you alive in the 70’s?
|
||||
|
||||
Here is some quoted '``code``' and a "`http://example.com/?foo=1&bar=2[quoted
|
||||
link]`".
|
||||
Here is some quoted '``+code+``' and a
|
||||
"`http://example.com/?foo=1&bar=2[quoted link]`".
|
||||
|
||||
Some dashes: one—two — three—four — five.
|
||||
|
||||
|
@ -477,11 +477,11 @@ latexmath:[\alpha + \omega \times x^2].
|
|||
|
||||
These shouldn’t be math:
|
||||
|
||||
* To get the famous equation, write `$e = mc^2$`.
|
||||
* To get the famous equation, write `+$e = mc^2$+`.
|
||||
* $22,000 is a _lot_ of money. So is $34,000. (It worked if "`lot`" is
|
||||
emphasized.)
|
||||
* Shoes ($20) and socks ($5).
|
||||
* Escaped `$`: $73 _this should be emphasized_ 23$.
|
||||
* Escaped `+$+`: $73 _this should be emphasized_ 23$.
|
||||
|
||||
Here’s a LaTeX table:
|
||||
|
||||
|
@ -611,7 +611,7 @@ ____
|
|||
Blockquoted: http://example.com/
|
||||
____
|
||||
|
||||
Auto-links should not occur here: `<http://example.com/>`
|
||||
Auto-links should not occur here: `+<http://example.com/>+`
|
||||
|
||||
....
|
||||
or here: <http://example.com/>
|
||||
|
@ -636,7 +636,7 @@ anywhere after the footnote reference. It need not be placed at the end of the
|
|||
document.] and another.[multiblock footnote omitted] This should _not_ be a
|
||||
footnote reference, because it contains a space.[^my note] Here is an inline
|
||||
note.footnote:[This is _easier_ to type. Inline notes may contain
|
||||
http://google.com[links] and `]` verbatim characters, as well as [bracketed
|
||||
http://google.com[links] and `+]+` verbatim characters, as well as [bracketed
|
||||
text].]
|
||||
|
||||
____
|
||||
|
|
Loading…
Reference in a new issue