You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including snippets of source code from external files, the code will often be padded with a leading block indent. This leading block indent is relevant in its original context. However, once inside the documentation, this leading block indent is no longer needed.
Instead of seeing:
def names
@name.split ' '
end
We want to see:
def names
@name.split ' '
end
Introduce an attribute named indent to blocks with verbatim content (listing, literal, source, verse, etc) that allows the leading block indent to be stripped and, optionally, a new block indent to be specified. When indent is 0, the leading block indent is stripped. When indent is > 0, the leading block indent is stripped, then a block indentation equal to the value of indent is inserted.
For example, this AsciiDoc source
[indent=0]
----
def names
@name.split ' '
end
----
should produce:
def names
@name.split ' '
end
This AsciiDoc source:
[indent=2]
----
def names
@name.split ' '
end
----
should produce:
def names
@name.split ' '
end
Note that the relative indentation between the lines of source code should not be affected.
The text was updated successfully, but these errors were encountered:
When including snippets of source code from external files, the code will often be padded with a leading block indent. This leading block indent is relevant in its original context. However, once inside the documentation, this leading block indent is no longer needed.
Instead of seeing:
We want to see:
Introduce an attribute named
indent
to blocks with verbatim content (listing, literal, source, verse, etc) that allows the leading block indent to be stripped and, optionally, a new block indent to be specified. Whenindent
is 0, the leading block indent is stripped. Whenindent
is > 0, the leading block indent is stripped, then a block indentation equal to the value ofindent
is inserted.For example, this AsciiDoc source
should produce:
This AsciiDoc source:
should produce:
Note that the relative indentation between the lines of source code should not be affected.
The text was updated successfully, but these errors were encountered: