Is there any way to trim the beginning indentation white spaces in a included source code snippet?
Yes, you need to use the indent
attribute in your include directive, see Indent included content. If you include code from a snippet.src
file, it will look something like this:
include::snippet.src[indent=0]
or
[source,indent=0]
----
include::snippet.src[]
----