# Input: arg1 path input wikicode file
# Output: files wikicode file tree
# Depends: Bash 5.1.16, GNU Coreutils 8.32
# Input: arg1 path input wikicode file
# Output: files wikicode file tree
# Depends: Bash 5.1.16, GNU Coreutils 8.32
re_sp='^(<!-- @subpage:)(.*)([ ]*-->)$'; # subpage marker pattern
d_out=./wikicode/; # default output dir
re_sp='^(<!-- @subpage:)(.*)([ ]*-->)$'; # subpage marker pattern
d_out=./wikicode/; # default output dir
### Check for subpage marker
if [[ "$line" =~ $re_sp ]]; then
#### Identify new subpage path
### Check for subpage marker
if [[ "$line" =~ $re_sp ]]; then
#### Identify new subpage path
printf -- "\n==References==\n<references />\n"
printf -- "\n==Footnotes==\n<references group=fn />\n";
printf -- "\n==Comments==\n<references group=cmt />\n";
printf -- "\n==References==\n<references />\n"
printf -- "\n==Footnotes==\n<references group=fn />\n";
printf -- "\n==Comments==\n<references group=cmt />\n";