exit 1
fi
+printf '<div class="macro include wrapper">'
page_glob "$page" \
| sort $rev \
| sed "${items}q" \
else
continue
fi
- printf '<div class="macro include" page="%s">' "$(HTML "$glob")"
- refpfx="$(HTML "$glob" |sed 's;[\;&\;];\\&;g')"
+ hglob="$(HTML "$glob")"
+ refpfx="$(printf %s\\n "$hglob" |sed 's;[\;&\;];\\&;g')"
+ printf '<div class="macro include page"><article class="include" id="include_%s">' "${hglob}"
( cd -- "${mdfile%/*}"
sed -n "${from},${to}p" <"$mdfile" \
| md \
s;(<[^>]+ )(href|src)="([^#/"][^"]*)"([^>]*>);\1\2="'"${refpfx}"'\3"\4;g
s;(<[^>]+ )(href|src)="/#safe/([^"]*)"([^>]*>);\1\2="\3"\4;g
'
+ printf '</article>'
+ printf '<a class="include link" href="%s">%s</a>' "${hglob}" "${hglob}"
printf '</div>'
done
+printf '</div>'