3 last='' curr='' next=''
6 "${0%/*}"/cgilite/html-sh.sed | {
9 tag="${tag}${line%%>*}"
11 if [ "$line" = "${line%%>*}" ]; then
12 # $line did not contain ">" and thus was added to $tag entirely
13 if ! line="$(line)"; then
20 # $line is shortened by segment added to $tag
26 *\<slide\ *id=\"?*\"*\>*)
27 prev="$curr" curr="$next"
28 next="${tag#*<slide }"
31 printf '%s<a href="#%s">previous</a><a href="#%s">next</a><slide %s' \
32 "${tag%<slide *}" "$prev" "$next" "${tag#*<slide }"
36 prev="$curr" curr="$next"
37 next="autoslide${idoff}"
38 idoff="$((idoff + 1))"
39 printf '%s<a href="#%s">previous</a><a href="#%s">next</a><slide %s' \
40 "${tag%<slide *}" "$prev" "$next" "${tag#*<slide }"