slightly modify the lua-manual tool
This commit is contained in:
parent
5e8b31ea47
commit
ffe428e0f5
@ -52,6 +52,7 @@
|
|||||||
(: :gsub "\"<code>(.-)</code>\"" "`\"%1\"`")
|
(: :gsub "\"<code>(.-)</code>\"" "`\"%1\"`")
|
||||||
(: :gsub "\'<code>(.-)</code>\'" "`\"%1\"`")
|
(: :gsub "\'<code>(.-)</code>\'" "`\"%1\"`")
|
||||||
(: :gsub "<code>(.-)</code>" "`%1`")
|
(: :gsub "<code>(.-)</code>" "`%1`")
|
||||||
|
;; supremum to unicode
|
||||||
(: :gsub "<sup>x</sup>" "ˣ")
|
(: :gsub "<sup>x</sup>" "ˣ")
|
||||||
(: :gsub "<sup>e</sup>" "ᵉ")
|
(: :gsub "<sup>e</sup>" "ᵉ")
|
||||||
(: :gsub "<sup>y</sup>" "ʸ")
|
(: :gsub "<sup>y</sup>" "ʸ")
|
||||||
@ -75,7 +76,7 @@
|
|||||||
(: :gsub "</?ul>" ""))
|
(: :gsub "</?ul>" ""))
|
||||||
;; check to ensure that all the tags have been defeated
|
;; check to ensure that all the tags have been defeated
|
||||||
tag (str:match "<[^>]+>[^>]+>")]
|
tag (str:match "<[^>]+>[^>]+>")]
|
||||||
(when tag (error (.. tag "\n" str)))
|
(when tag (error (.. "unhandled tag:" tag "\n" str)))
|
||||||
(-> str
|
(-> str
|
||||||
;; trim whitespace
|
;; trim whitespace
|
||||||
(: :match "^%s*(.-)%s*$")
|
(: :match "^%s*(.-)%s*$")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user