1
# Extract the preseeding example from appendix/example-preseed-*.xml.
2
# During extraction "line continuations" - that were added for improved
3
# readability - will be removed, rejoining the split lines.
5
# If variable lckeep is passed with value "1", line continuations are
6
# ignored, i.e. the lines in the example are not reformatted.
14
# Ignore everything before the line opening the example
15
# Note: this assumes that <informalexample><screen> is on one line
16
/<informalexample.*><screen>/ {
21
# Ignore everything after the line closing the example
22
# Note: this assumes that </screen></informalexample> is on one line
23
/<\/screen><\/informalexample>/ {
27
# Handling of lines not ending with a line continuation character
29
if ( inexample == "1" ) {
30
if ( lckeep == "1" ) {
34
sub(/^[[:space:]]*/, "")
35
sub(/^#[[:space:]]*/, "")
46
# Handling of lines ending with a line continuation character
48
if ( inexample == "1" ) {
49
if ( lckeep == "1" ) {
53
sub(/^[[:space:]]*/, "")
54
sub(/^#[[:space:]]*/, "")
57
gsub(/[[:space:]]*\\[[:space:]]*$/, " ")