- (unless separator
- (setq separator (plist-get props :separator)))
- (if children
- (if without-tags
- (est-format-list children without-tags as-property separator)
- (format "<%s%s>%s</%s>"
- name
- (if props
- (est-format-props props)
- "")
- (est-format-list
- children nil without-edit as-property separator)
- name))
- (if without-tags
- ""
- (format "<%s%s/>"
- name (est-format-props props))))
+ (cond
+ (output-string)
+ (t
+ (unless separator
+ (setq separator (plist-get props :separator)))
+ (setq subtype (plist-get props :subtype))
+ (if children
+ (cond
+ ((eq output-format 'plain-text)
+ (est-format-list children output-format as-property separator
+ subtype)
+ )
+ ((eq subtype 'unordered-list)
+ (format "<ul\n%s><li\n>%s</li></ul\n>"
+ (if props
+ (est-format-props props)
+ "")
+ (est-format-list
+ children output-format
+ without-edit as-property "</li\n><li\n>")
+ )
+
+ )
+ (t
+ (format "<%s%s>%s</%s>"
+ name
+ (if props
+ (est-format-props props)
+ "")
+ (est-format-list
+ children output-format
+ without-edit as-property separator)
+ name)
+ ))
+ (if (eq output-format 'plain-text)
+ ""
+ (format "<%s%s/>"
+ name (est-format-props props))))
+ ))