diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-25 16:39:31 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-25 16:39:31 +0200 |
commit | 679a0e1fe93d630820185f931087328d32e81077 (patch) | |
tree | eca11269defbef4a6c3fb8a74fba34f38bb303f2 | |
parent | 8444207d3e65e107b6d00d320b156ec65bf80abe (diff) | |
download | org-mode-679a0e1fe93d630820185f931087328d32e81077.tar.gz |
Fix a regexp in HTML and DocBook exporters
* lisp/org-docbook.el (org-export-as-docbook): Fix regexp.
* lisp/org-html.el (org-export-as-html): Fix regexp.
The erroneous regexp would identify the string " *" as an headline.
-rw-r--r-- | lisp/org-docbook.el | 2 | ||||
-rw-r--r-- | lisp/org-html.el | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index ae454c5..e2ffe34 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -970,7 +970,7 @@ publishing directory." (push (cons num 1) footref-seen)))))) (cond - ((string-match "\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) + ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) ;; This is a headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) diff --git a/lisp/org-html.el b/lisp/org-html.el index 646f2c3..e7eada2 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1648,7 +1648,7 @@ PUB-DIR is set, use this as the publishing directory." t t line)))))) (cond - ((string-match "\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) + ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) ;; This is a headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) |