New upstream version 8.1.0
This commit is contained in:
28
thirdparty/source/nu/docs/extract.awk
vendored
Normal file
28
thirdparty/source/nu/docs/extract.awk
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
BEGIN {
|
||||
indent = "";
|
||||
}
|
||||
|
||||
$1 == "//-" {
|
||||
sub("^ ", "", indent);
|
||||
}
|
||||
|
||||
$1 ~ "^//[+-/0]$", $1 ~ "^//[+-/0]$" {
|
||||
line = $0;
|
||||
sub("^[ \t]*//. ?", "", line);
|
||||
|
||||
if (line ~ /↩$/)
|
||||
sub("↩$", "\\", line);
|
||||
|
||||
if ($1 == "//0")
|
||||
print line;
|
||||
else
|
||||
print indent line;
|
||||
}
|
||||
|
||||
$1 == "//+" {
|
||||
indent = indent " ";
|
||||
}
|
||||
|
||||
$1 !~ "^//[+-/0]$" {
|
||||
print "";
|
||||
}
|
||||
Reference in New Issue
Block a user