how to convert asciidoc attribute to document

91 Views Asked by At

asciidoc attribute string can't convert to document.

my code below:

:source: ~sub~script phrase | S~2~ + S~3~ = S~4~

[source,asciidoc,subs="attributes"]
.source code
----
{source}
----

.result
====
{source}

~sub~script phrase | S~2~ + S~3~ = S~4~
====

expect: the attribute string will convert to mathematical formula

actual: still original string

when i set source in my doc head, i can't preview the attribute converted doc, but can see origin source converted doc.

result below:

enter image description here

so how can i convert my attribute {source} to mathematical formula.

1

There are 1 best solutions below

0
steven On

finally, resolved the problem by using code below:

:content: {content}
:source: ~sub~script phrase | S~2~ + S~3~ = S~4~

[source,asciidoc,subs="attributes, +post_replacements"]
.source code
----
{source}
----

[source,asciidoc,subs="attributes+,normal,+quotes"]
.result
----
{source}
----

and result below:

enter image description here