# Input: arg1 path input wikicode file
# Output: files wikicode file tree
# Depends: Bash 5.1.16, GNU Coreutils 8.32
-# Version: 0.2.0
+# Version: 0.3.0
re_sp='^(<!-- @subpage:)(.*)([ ]*-->)$'; # subpage marker pattern
d_out=./wikicode/; # default output dir
## Process input line-by-line
while read -r line; do
- #declare -p line re_sp; # debug
+ # declare -p line re_sp; # debug
### 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<!-- End of Page -->\n";
printf -- "\n";
}; # print wikicode footer
create_output_wikicode() {