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