浏览代码

Introduced org-lparse-do-format-list-table

* contrib/lisp/org-lparse.el
(org-lparse-do-format-list-table): New. Factored out from
`org-lparse-do-format-org-table'.
(org-lparse-do-format-org-table): Use above function.
(org-lparse-format-list-table): New.  Wrapper for
`org-lparse-do-format-list-table'. For future use.
Jambunathan K 13 年之前
父节点
当前提交
fdb8395886
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      contrib/lisp/org-lparse.el

+ 12 - 1
contrib/lisp/org-lparse.el

@@ -1373,7 +1373,7 @@ for formatting.  This is required for the DocBook exporter."
 			       (lambda (x) (string-match "^[ \t]*|-" x))
 			       (cdr lines)))))
 	 (org-lparse-table-rownum -1) org-lparse-table-ncols i (cnt 0)
-	 tbopen line fields
+	 tbopen fields
 	 org-lparse-table-cur-rowgrp-is-hdr
 	 org-lparse-table-rowgrp-open
 	 org-lparse-table-num-numeric-items-per-column
@@ -1383,6 +1383,12 @@ for formatting.  This is required for the DocBook exporter."
 	 (org-lparse-table-style 'org-table)
 	 org-lparse-table-is-styled)
     (setq lines (org-lparse-org-table-to-list-table lines splice))
+
+    (org-lparse-do-format-list-table lines splice caption label attributes head)))
+
+(defun org-lparse-do-format-list-table (lines &optional splice
+					      caption label attributes head)
+  (let (line)
     (cond
      (splice
       (setq org-lparse-table-is-styled nil)
@@ -1407,6 +1413,11 @@ for formatting.  This is required for the DocBook exporter."
     (org-lparse-do-format-org-table lines splice)
     (buffer-substring-no-properties (point-min) (point-max))))
 
+(defun org-lparse-format-list-table (lines &optional splice)
+  (with-temp-buffer
+    (org-lparse-do-format-list-table lines splice)
+    (buffer-substring-no-properties (point-min) (point-max))))
+
 (defun org-lparse-do-format-table-table (lines)
   "Format a table generated by table.el into backend-specific code.
 This conversion does *not* use `table-generate-source' from table.el.