Fix <email> rendering when the length of the address is shorter

than 12 characters.
This commit is contained in:
Hiroki Sato 2004-12-29 17:24:58 +00:00
parent 4b11f29386
commit c949c5a344
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=23363

View file

@ -249,16 +249,20 @@
(element email
(let* ((class (attribute-string (normalize "role"))))
(cond
((or (equal? class "nolink") (string=?
(substring (data (current-node))
(- (string-length (data (current-node))) 11)
(- (string-length (data (current-node))) 4)) "example"))
((or (equal? class "nolink")
(and (> (string-length (data (current-node)))
11)
(string=?
(substring (data (current-node))
(- (string-length (data (current-node))) 11)
(- (string-length (data (current-node))) 4))
"example")))
($code-seq$
(make sequence
(literal "&#60;")
(process-children)
(literal "&#62;"))))
(else
(make sequence
(literal "&#60;")
(process-children)
(literal "&#62;"))))
(else
(next-match)))))
;; Ensure that we start with no preferred mediaobject notations,