X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=est-format.el;h=b9278abcfe55a8240b2ae2cd23e1a09b4483a867;hb=c85a026c09f8382792ee30992b6ace022cdd516a;hp=116d412463d6ee07088109711167c39f7dd6d3c9;hpb=578906c647cfa2a94b1c95806deca27d2b218c7e;p=chise%2Fest.git diff --git a/est-format.el b/est-format.el index 116d412..b9278ab 100644 --- a/est-format.el +++ b/est-format.el @@ -41,7 +41,7 @@ (setq output-format 'html) )) (let (name props children ret object feature format value - output-string) + output-string subtype) (cond ((stringp format-unit) (www-format-encode-string format-unit @@ -69,9 +69,10 @@ (eq output-format 'wiki-text)) (unless separator (setq separator (plist-get props :separator))) + (setq subtype (plist-get props :subtype)) (setq output-string (est-format-list children output-format - without-edit as-property separator)) + without-edit as-property separator subtype)) ) ((eq output-format 'html) (setq props (list* :class name props) @@ -131,6 +132,26 @@ children))) )) ) + ((eq name 'omitted) + (cond + ((eq output-format 'wiki-text) + (setq output-string "{{...}}") + ) + ((and (eq output-format 'html) + (setq object (plist-get props :object)) + (setq feature (plist-get props :feature))) + (setq children + (list + (list* 'a + (list :href + (concat (www-uri-make-object-url object) + (if est-hide-cgi-mode + "/feature=" + "&feature=") + (www-uri-encode-feature-name feature))) + children))) + )) + ) ((eq name 'feature-name) (setq name 'span) (when (eq output-format 'html) @@ -227,9 +248,25 @@ (t (unless separator (setq separator (plist-get props :separator))) + (setq subtype (plist-get props :subtype)) (if children - (if (eq output-format 'plain-text) - (est-format-list children output-format as-property separator) + (cond + ((eq output-format 'plain-text) + (est-format-list children output-format as-property separator + subtype) + ) + ((eq subtype 'unordered-list) + (format "%s" + (if props + (est-format-props props) + "") + (est-format-list + children output-format + without-edit as-property "") + ) + + ) + (t (format "<%s%s>%s" name (if props @@ -238,7 +275,8 @@ (est-format-list children output-format without-edit as-property separator) - name)) + name) + )) (if (eq output-format 'plain-text) "" (format "<%s%s/>" @@ -250,14 +288,26 @@ (defun est-format-list (format-list &optional output-format without-edit as-property - separator) - (if (atom format-list) - (est-format-unit - format-list output-format without-edit as-property separator) + separator subtype) + (cond + ((atom format-list) + (est-format-unit + format-list output-format without-edit as-property separator) + ) + ((eq subtype 'unordered-list) + (concat "
  • " + (mapconcat (lambda (unit) + (est-format-unit + unit output-format without-edit as-property separator)) + format-list "
  • ") + "") + ) + (t (mapconcat (lambda (unit) (est-format-unit - unit output-format without-edit as-property separator)) - format-list separator))) + unit output-format without-edit as-property)) + format-list separator) + ))) ;;; @ End.