(www-xml-to-stext-unit): Support <link><ref>...</ref>...</link>.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Fri, 19 Mar 2010 04:04:29 +0000 (13:04 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Fri, 19 Mar 2010 04:04:29 +0000 (13:04 +0900)
cwiki-set.el

index 2b552c3..1337b15 100644 (file)
       (setq name (car unit))
       (if (stringp name)
          nil
-       (setq props (nth 1 unit)
+       (setq props (www-xml-to-stext-props (nth 1 unit))
              children (nthcdr 2 unit))
        (if children
            (setq children (www-xml-to-stext-list children)))
+       (when (and (eq name 'link)
+                  (consp (car children))
+                  (eq (caar children) 'ref))
+         (setq props (list* :ref (nthcdr 2 (car children))
+                            props)
+               children (cdr children)))
        (if children
-           (list* name
-                  (www-xml-to-stext-props props)
-                  children)
+           (list* name props children)
          (if props
-             (list name (www-xml-to-stext-props props))
+             (list name props)
            (list name))))
       )
      (t