From 3e021e5fda7276b3d4f7c1a07afe319b4437a72d Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Tue, 23 May 2006 14:24:58 +0000 Subject: [PATCH] Fix publishing error with tables and initial whitespace. * lisp/muse-publish.el (muse-publish-markup-regexps): Move table rule above blockquote and centered text, so that indented but blank initial table fields publish correctly. * lisp/muse-regexps.el (muse-table-line-regexp): Make this much simpler. We accept anything that has at least one field delimiter. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-132 --- ChangeLog.2006 | 18 ++++++++++++++++++ lisp/muse-publish.el | 17 +++++++++-------- lisp/muse-regexps.el | 4 +--- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ChangeLog.2006 b/ChangeLog.2006 index f5c356f..81eef85 100644 --- a/ChangeLog.2006 +++ b/ChangeLog.2006 @@ -2,6 +2,24 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2006/muse--main--1.0 # +2006-05-23 14:24:58 GMT Michael Olson patch-132 + + Summary: + Fix publishing error with tables and initial whitespace. + Revision: + muse--main--1.0--patch-132 + + * lisp/muse-publish.el (muse-publish-markup-regexps): Move table rule + above blockquote and centered text, so that indented but blank initial + table fields publish correctly. + + * lisp/muse-regexps.el (muse-table-line-regexp): Make this much simpler. + We accept anything that has at least one field delimiter. + + modified files: + ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el + + 2006-05-18 06:58:58 GMT Michael Olson patch-131 Summary: diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index 7dc2a00..514ec88 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -139,12 +139,20 @@ If non-nil, publish comments using the markup of the current style." ;; reason all of these rules are handled here, is so that ;; blockquote detection doesn't interfere with indented list ;; members. - (2200 ,(format muse-list-item-regexp (concat "[" muse-regexp-blank "]*")) 0 list) + ;; simple table markup is supported, nothing fancy. use | to + ;; separate cells, || to separate header cells, and ||| for footer + ;; cells + (2300 ,(concat "\\(\\([" muse-regexp-blank "]*\n\\)?" + "\\(" muse-table-line-regexp "\\(?:\n\\|\\'\\)\\)\\)+") + 0 table) + + ;; blockquote and centered text (2400 ,(concat "^\\([" muse-regexp-blank "]+\\).+") 0 quote) + ;; the emdash ("--") (2500 ,(concat "\\(^\\|[" muse-regexp-blank "]+\\)--\\($\\|[" muse-regexp-blank "]+\\)") 0 emdash) @@ -154,13 +162,6 @@ If non-nil, publish comments using the markup of the current style." ;; (see below). (2600 ,(concat "^[" muse-regexp-blank "]*> ") 0 verse) - ;; simple table markup is supported, nothing fancy. use | to - ;; separate cells, || to separate header cells, and ||| for footer - ;; cells - (2700 ,(concat "\\(\\([" muse-regexp-blank "]*\n\\)?" - "\\(" muse-table-line-regexp "\\(?:\n\\|\\'\\)\\)\\)+") - 0 table) - ;; replace links in the buffer (links to other pages) (2900 muse-explicit-link-regexp 0 link) diff --git a/lisp/muse-regexps.el b/lisp/muse-regexps.el index 4cf8c31..794d2f1 100644 --- a/lisp/muse-regexps.el +++ b/lisp/muse-regexps.el @@ -162,9 +162,7 @@ The first match string must contain the term." :type 'regexp :group 'muse-regexp) -(defcustom muse-table-line-regexp - (concat "^[" muse-regexp-blank "]*\\(?:[^|\n]+\\||\\)" - muse-table-field-regexp "[^|\n].*") +(defcustom muse-table-line-regexp (concat "^.*" muse-table-field-regexp ".*") "Regexp used to match a table line when publishing." :type 'regexp :group 'muse-regexp) -- 2.11.4.GIT