asciidoctor / asciidoctor

:gem: A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.
https://asciidoctor.org
Other
4.8k stars 787 forks source link

Double underscore attributes {_} in a block translates to emphasis #1991

Closed shahryareiv closed 11 months ago

shahryareiv commented 7 years ago

If we have an attribute as _: and use it more than one time in a block {_} some text {_} it will be translated into emphasis instead of two attributes. This is especially important for this case:https://github.com/asciidoctor/asciidoctor/issues/1982

kathawala commented 7 years ago

I'm having a similar problem. For example, consider the following text in an .adoc file:

`__int128` is a GCC extension which allows 64 bit computers to handle 128 bit numbers.
Let's see some uses of the `__int128` type in example C code.

The rendering of this paragraph should have "__int128" in a code block, but instead, the rendering looks like this:

int128 is a GCC extension which allows 64 bit computers to handle 128 bit numbers. Let's see some uses of the int128 type in example C code

mojavelinux commented 11 months ago

Double underscore is unconstrained emphasis, which means it's going to match anywhere that is not a passthrough / literal.

The correct way to write the previous example is as follows:

`+__int128+` is a GCC extension which allows 64 bit computers to handle 128 bit numbers.
Let's see some uses of the `+__int128+` type in example C code.

See https://docs.asciidoctor.org/asciidoc/latest/text/literal-monospace/ for details.