From d460e259708e37bc66a0ac1eea911b05c6a2b876 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Thu, 22 Sep 2005 16:15:59 +0000 Subject: [PATCH] If more than 1 blank separates list/table items, separate them. * lisp/muse-docbook.el, muse-html.el, muse-latex.el, muse-texinfo.el, experimental/muse-xml.el (muse-*-markup-regexps): If more than 1 blank line separates a list or table item, it will form a new table. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-240 --- ChangeLog | 16 ++++++++++++++++ experimental/muse-xml.el | 19 +++++++++++++++---- lisp/muse-docbook.el | 19 ++++++++++++++----- lisp/muse-html.el | 16 +++++++++++++--- lisp/muse-latex.el | 4 +++- lisp/muse-texinfo.el | 8 +++++--- 6 files changed, 66 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5a3cfd..8ee8d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,22 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-09-22 16:15:59 GMT Michael Olson patch-240 + + Summary: + If more than 1 blank separates list/table items, separate them. + Revision: + muse--main--1.0--patch-240 + + * lisp/muse-docbook.el, muse-html.el, muse-latex.el, muse-texinfo.el, + experimental/muse-xml.el (muse-*-markup-regexps): If more than 1 blank + line separates a list or table item, it will form a new table. + + modified files: + ChangeLog experimental/muse-xml.el lisp/muse-docbook.el + lisp/muse-html.el lisp/muse-latex.el lisp/muse-texinfo.el + + 2005-09-19 01:34:48 GMT Michael Olson patch-239 Summary: diff --git a/experimental/muse-xml.el b/experimental/muse-xml.el index 9510ec4..996a720 100644 --- a/experimental/muse-xml.el +++ b/experimental/muse-xml.el @@ -85,12 +85,23 @@ This may be text or a filename." (defcustom muse-xml-markup-regexps `(;; Join together the parts of a table - (10000 ,(concat " \\s-*\\s-*" - "]*>\\s-*\n") 0 "") - (10100 "\\s-*]*>\n" 0 "") + (10000 ,(concat " \\s-*" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "]*>\\s-*\n") + 0 "") + (10100 ,(concat "" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "]*>\n") + 0 "") ;; Join together the parts of a list - (10200 "\\s-*]*>\\s-*" 0 "") + (10200 ,(concat "" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "]*>\\s-*") + 0 "") ;; Beginning of doc, end of doc, or plain paragraph separator (10300 ,(concat "\\(\n\\)?" diff --git a/lisp/muse-docbook.el b/lisp/muse-docbook.el index 815d6b8..33ffaf3 100644 --- a/lisp/muse-docbook.el +++ b/lisp/muse-docbook.el @@ -76,15 +76,24 @@ This may be text or a filename." (defcustom muse-docbook-markup-regexps `(;; Join together the parts of a table (10000 ,(concat " \\s-*" - "\\s-*\\s-*" + "\\s-*" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" "]*>\\s-*]*>\\s-*" - "\n") 0 "") - (10100 ,(concat " \\s-*\\s-*" - "]*>\\s-*]*>\n") 0 "") + "\n") + 0 "") + (10100 ,(concat " \\s-*" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "]*>\\s-*]*>\n") + 0 "") ;; Join together the parts of a list (10200 ,(concat "" - "\\s-*<\\1list" "[^>]*>\\s-*") 0 "") + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "<\\1list" "[^>]*>\\s-*") + 0 "") ;; Beginning of doc, end of doc, or plain paragraph separator (10300 ,(concat "\\(\n\\)?" diff --git a/lisp/muse-html.el b/lisp/muse-html.el index 89f17f3..cfddaf5 100644 --- a/lisp/muse-html.el +++ b/lisp/muse-html.el @@ -220,12 +220,22 @@ than the HTML table tag." (defcustom muse-html-markup-regexps `(;; Join together the parts of a table - (10000 ,(concat " \\s-*\\s-*" + (10000 ,(concat " \\s-*" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" "]*>\\s-*\n") 0 "") - (10100 "\\s-*]*>\n" 0 "") + (10100 ,(concat "" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "]*>\n") + 0 "") ;; Join together the parts of a list - (10200 "\\s-*<\\1>\\s-*" 0 "") + (10200 ,(concat "" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" + "<\\1>\\s-*") + 0 "") ;; Beginning of doc, end of doc, or plain paragraph separator (10300 ,(concat "\\(\n\\)?" diff --git a/lisp/muse-latex.el b/lisp/muse-latex.el index 624be7f..d2c8d0e 100644 --- a/lisp/muse-latex.el +++ b/lisp/muse-latex.el @@ -121,7 +121,9 @@ filename." ;; join together the parts of a list or table (10200 ,(concat - "\\\\end{\\(tabular\\|description\\|itemize\\|enumerate\\)}\n+" + "\\\\end{\\(tabular\\|description\\|itemize\\|enumerate\\)}" + "\\([" muse-regexp-blank "]*\n\\)\\{0,2\\}" + "[" muse-regexp-blank "]*" "\\\\begin{\\1}\\({[^\n}]+}\\)?\n+") 0 "")) "List of markup regexps for identifying regions in a Muse page. For more on the structure of this list, see `muse-publish-markup-regexps'." diff --git a/lisp/muse-texinfo.el b/lisp/muse-texinfo.el index 6d67b7e..c8a7c2c 100644 --- a/lisp/muse-texinfo.el +++ b/lisp/muse-texinfo.el @@ -98,9 +98,11 @@ It may contain markup tags." :group 'muse-texinfo) (defcustom muse-texinfo-markup-regexps - '(;; join together the parts of a list or table - (10000 - "@end \\(\\(multi\\)?table\\|itemize\\|enumerate\\)\n+@\\1.*\n+" 0 "")) + `(;; join together the parts of a list or table + (10000 ,(concat "@end \\(\\(multi\\)?table\\|itemize\\|enumerate\\)" + "\n\\{1,2\\}" + "@\\1.*\n+") + 0 "")) "List of markup rules for publishing a Muse page to Texinfo. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice -- 2.11.4.GIT