tajmone / Alan3-Italian

Translation of Alan IF v3 to Italian
Artistic License 2.0
1 stars 0 forks source link

Fix 1st Line Indentation in Code Blocks #19

Open tajmone opened 5 years ago

tajmone commented 5 years ago

Problem

After an Alan code block starting with an indentation is processed by Highlight, the indentation on the first line is lost.

For more info on this problem, see: tajmone/hugo-book#15

For an example, see:

The {wj} Workaround

Right now, the only workaround solution is to add a word joiner character (⁠) at the beginning of the first indented line using its predefined attribute for character replacement ({wj}):

[source,alan, subs="+attributes"]
---------------------------------
{wj}  Add To Every object

This works fine, although it's far from being an ideal solution (but, at least, it shouldn't create any problems for other Asciidoctor backends and output formats).