asciidoctor / asciidoctor.org

:globe_with_meridians: Asciidoctor project site. Composed in AsciiDoc. Baked with Awestruct.
https://asciidoctor.org
Other
322 stars 805 forks source link

Allow for multiple callouts to be on the same line #770

Closed seinecle closed 6 years ago

seinecle commented 6 years ago

I am trying to achieve this, but this is not allowed:

----
private Float addFrenchVAT(Float priceWithoutVAT) { // <1>
   Float priceWithVAT; // <2>
   priceWithVAT = priceWithoutVAT * 1.20; // <3>
   return priceWithVAT; // <4>
}// <5>
----
<1> title of the method you create, then the method start at the opening curly brace `{`.
<2><3><4> the method itself
<5> this closing curly brace signals the end of the definition of the method.

I'd like to have the line <2><3><4> the method itself to proper render the callouts.

mojavelinux commented 6 years ago

You need to think about this the other way around. Instead of assigning the same definition to multiple callout numbers, you use the same callout number on multiple lines.

----
private Float addFrenchVAT(Float priceWithoutVAT) { // <1>
   Float priceWithVAT; // <2>
   priceWithVAT = priceWithoutVAT * 1.20; // <2>
   return priceWithVAT; // <2>
}// <5>
----
<1> title of the method you create, then the method start at the opening curly brace `{`.
<2> the method itself
<3> this closing curly brace signals the end of the definition of the method.
seinecle commented 6 years ago

Thx!