Skip to content
Snippets Groups Projects
Verified Commit fa540147 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files
parent 52759c4c
No related branches found
No related tags found
No related merge requests found
......@@ -192,10 +192,14 @@ function getpc {
function anchorIt {
local id=$cw idhtm idltx lbl=$line lblhtm lblltx ltxit
[[ $id = +([\ -~]) ]] || die \
"item identifyer ${id@Q} must be comprised of printable ASCII"
[[ $id = [A-Z_a-z]*([A-Z_a-z0-9.-]) ]] || die \
"item identifyer ${id@Q} is not a valid ASCII xml:id NCName"
[[ $id = [A-Za-z]*([A-Za-z0-9_:.-]) ]] || die \
"item identifyer ${id@Q} is not a valid HTML 4 id attribute"
[[ $id = *[\"\#\'\(\),=\{\}%\ \~\\]* ]] && die \
"item identifyer ${id@Q} contains characters prohibited in Tₑχ"
local -l idlc=$id
local idid=ID_${idlc//-/D}
idid=${idid//./P}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment