AsciiDoc source like a * a
is converted to HTML as normal text "a * a". If the asterisk is the first non-space character in the line, it starts a list (this is normal). However, I need to start a paragraph with literal asterisk. I tried the following to escape it:
`*`
*
(rendered inside <code>
)\*
+*+
*
(rendered inside <code>
)pass::[*]
block macro cannot occur here: pass::[*]
'*'
<em>
— the closest to what I need so far)How to specify an asterisk in the beginning of the line in AsciiDoc source so that it appears as normal text in the HTML output?
AsciiDoc is a text document format that was explicitly designed with the needs of publishing in mind, both print and web. It supports all the structural elements necessary for writing notes, documentation, articles, books, ebooks, slideshows, web pages, technical manuals and blogs.
AsciiDoc uses the same number of markup characters or less when compared to Markdown in nearly all cases. AsciiDoc uses a consistent formatting scheme (i.e., it has consistent patterns). AsciiDoc can handle all permutations of nested inline (and block) formatting, whereas Markdown often falls down.
Comment syntax You can use a comment line or comment block when you want to add text to an AsciiDoc source file, but don't want that text to be displayed when the file is converted to an HTML page. A comment line is denoted by two consecutive forward slashes ( // ).
How to open an ADOC file. You can open an ADOC file and edit the text it contains in any text editor, including Microsoft Notepad (Windows), Apple TextEdit (Mac), Microsoft Visual Studio Code (cross-platform), and GitHub Atom (cross-platform).
It turned out that for inline passthroughs a different form of pass
is required. I also checked the solution suggested by @Mario Lopez. I summarize the options below:
pass:[*]
+++*+++
$$*$$
{empty}*
("official" solution from FAQ)*text
*{sp}
*
*
You have two options that I know of. The pattern that converts it to a list is specifically an asterisk followed by a space.
* item
Which will get rendered like this:
You could either omit the space or use the space attribute.
*item
*{sp}item
Which will get rendered like this (respectively):
*item
* item
More information about attributes and substitutions can be found here: http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With