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.
This commit is contained in:
Nicolas Goaziou 2011-10-25 16:39:31 +02:00
parent 8444207d3e
commit 679a0e1fe9
2 changed files with 2 additions and 2 deletions

View File

@ -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))

View File

@ -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))