|
@@ -923,8 +923,8 @@ MAY-INLINE-P allows inlining it as an image."
|
|
|
(org-export-html-format-desc desc)
|
|
|
"</a>")))))
|
|
|
|
|
|
-(defun org-html-handle-links (line opt-plist)
|
|
|
- "Return LINE with markup of Org mode links.
|
|
|
+(defun org-html-handle-links (org-line opt-plist)
|
|
|
+ "Return ORG-LINE with markup of Org mode links.
|
|
|
OPT-PLIST is the export options list."
|
|
|
(let ((start 0)
|
|
|
(current-dir (if buffer-file-name
|
|
@@ -933,12 +933,12 @@ OPT-PLIST is the export options list."
|
|
|
(link-validate (plist-get opt-plist :link-validation-function))
|
|
|
type id-file fnc
|
|
|
rpl path attr desc descp desc1 desc2 link)
|
|
|
- (while (string-match org-bracket-link-analytic-regexp++ line start)
|
|
|
+ (while (string-match org-bracket-link-analytic-regexp++ org-line start)
|
|
|
(setq start (match-beginning 0))
|
|
|
(setq path (save-match-data (org-link-unescape
|
|
|
- (match-string 3 line))))
|
|
|
+ (match-string 3 org-line))))
|
|
|
(setq type (cond
|
|
|
- ((match-end 2) (match-string 2 line))
|
|
|
+ ((match-end 2) (match-string 2 org-line))
|
|
|
((save-match-data
|
|
|
(or (file-name-absolute-p path)
|
|
|
(string-match "^\\.\\.?/" path)))
|
|
@@ -946,7 +946,7 @@ OPT-PLIST is the export options list."
|
|
|
(t "internal")))
|
|
|
(setq path (org-extract-attributes path))
|
|
|
(setq attr (get-text-property 0 'org-attributes path))
|
|
|
- (setq desc1 (if (match-end 5) (match-string 5 line))
|
|
|
+ (setq desc1 (if (match-end 5) (match-string 5 org-line))
|
|
|
desc2 (if (match-end 2) (concat type ":" path) path)
|
|
|
descp (and desc1 (not (equal desc1 desc2)))
|
|
|
desc (or desc1 desc2))
|
|
@@ -1087,9 +1087,9 @@ OPT-PLIST is the export options list."
|
|
|
(setq rpl (concat "<i><" type ":"
|
|
|
(save-match-data (org-link-unescape path))
|
|
|
"></i>"))))
|
|
|
- (setq line (replace-match rpl t t line)
|
|
|
+ (setq org-line (replace-match rpl t t org-line)
|
|
|
start (+ start (length rpl))))
|
|
|
- line))
|
|
|
+ org-line))
|
|
|
|
|
|
;;; org-export-as-html
|
|
|
|
|
@@ -1171,7 +1171,7 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
(org-current-export-dir
|
|
|
(or pub-dir (org-export-directory :html opt-plist)))
|
|
|
(org-current-export-file buffer-file-name)
|
|
|
- (level 0) (line "") (origline "") txt todo
|
|
|
+ (level 0) (org-line "") (origline "") txt todo
|
|
|
(umax nil)
|
|
|
(umax-toc nil)
|
|
|
(filename (if to-buffer nil
|
|
@@ -1426,9 +1426,9 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
(push "<ul>\n<li>" thetoc)
|
|
|
(setq lines
|
|
|
(mapcar
|
|
|
- #'(lambda (line)
|
|
|
- (if (and (string-match org-todo-line-regexp line)
|
|
|
- (not (get-text-property 0 'org-protected line)))
|
|
|
+ #'(lambda (org-line)
|
|
|
+ (if (and (string-match org-todo-line-regexp org-line)
|
|
|
+ (not (get-text-property 0 'org-protected org-line)))
|
|
|
;; This is a headline
|
|
|
(progn
|
|
|
(setq have-headings t)
|
|
@@ -1438,17 +1438,17 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
txt (save-match-data
|
|
|
(org-html-expand
|
|
|
(org-export-cleanup-toc-line
|
|
|
- (match-string 3 line))))
|
|
|
+ (match-string 3 org-line))))
|
|
|
todo
|
|
|
(or (and org-export-mark-todo-in-toc
|
|
|
(match-beginning 2)
|
|
|
- (not (member (match-string 2 line)
|
|
|
+ (not (member (match-string 2 org-line)
|
|
|
org-done-keywords)))
|
|
|
; TODO, not DONE
|
|
|
(and org-export-mark-todo-in-toc
|
|
|
(= level umax-toc)
|
|
|
(org-search-todo-below
|
|
|
- line lines level))))
|
|
|
+ org-line lines level))))
|
|
|
(if (string-match
|
|
|
(org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt)
|
|
|
(setq txt (replace-match
|
|
@@ -1477,11 +1477,11 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
(push "</li>\n</ul>" thetoc))
|
|
|
(push "\n" thetoc)))
|
|
|
;; Check for targets
|
|
|
- (while (string-match org-any-target-regexp line)
|
|
|
- (setq line (replace-match
|
|
|
+ (while (string-match org-any-target-regexp org-line)
|
|
|
+ (setq org-line (replace-match
|
|
|
(concat "@<span class=\"target\">"
|
|
|
- (match-string 1 line) "@</span> ")
|
|
|
- t t line)))
|
|
|
+ (match-string 1 org-line) "@</span> ")
|
|
|
+ t t org-line)))
|
|
|
(while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
|
|
|
(setq txt (replace-match "" t t txt)))
|
|
|
(setq href
|
|
@@ -1498,7 +1498,7 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
href txt) thetoc)
|
|
|
|
|
|
(setq org-last-level level)))))
|
|
|
- line)
|
|
|
+ org-line)
|
|
|
lines))
|
|
|
(while (> org-last-level (1- org-min-level))
|
|
|
(setq org-last-level (1- org-last-level))
|
|
@@ -1511,28 +1511,28 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
|
|
|
(org-open-par)
|
|
|
|
|
|
- (while (setq line (pop lines) origline line)
|
|
|
+ (while (setq org-line (pop lines) origline org-line)
|
|
|
(catch 'nextline
|
|
|
|
|
|
;; end of quote section?
|
|
|
- (when (and inquote (string-match org-outline-regexp-bol line))
|
|
|
+ (when (and inquote (string-match org-outline-regexp-bol org-line))
|
|
|
(insert "</pre>\n")
|
|
|
(org-open-par)
|
|
|
(setq inquote nil))
|
|
|
;; inside a quote section?
|
|
|
(when inquote
|
|
|
- (insert (org-html-protect line) "\n")
|
|
|
+ (insert (org-html-protect org-line) "\n")
|
|
|
(throw 'nextline nil))
|
|
|
|
|
|
;; Fixed-width, verbatim lines (examples)
|
|
|
(when (and org-export-with-fixed-width
|
|
|
- (string-match "^[ \t]*:\\(\\([ \t]\\|$\\)\\(.*\\)\\)" line))
|
|
|
+ (string-match "^[ \t]*:\\(\\([ \t]\\|$\\)\\(.*\\)\\)" org-line))
|
|
|
(when (not infixed)
|
|
|
(setq infixed t)
|
|
|
(org-close-par-maybe)
|
|
|
|
|
|
(insert "<pre class=\"example\">\n"))
|
|
|
- (insert (org-html-protect (match-string 3 line)) "\n")
|
|
|
+ (insert (org-html-protect (match-string 3 org-line)) "\n")
|
|
|
(when (or (not lines)
|
|
|
(not (string-match "^[ \t]*:\\(\\([ \t]\\|$\\)\\(.*\\)\\)"
|
|
|
(car lines))))
|
|
@@ -1542,17 +1542,17 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
(throw 'nextline nil))
|
|
|
|
|
|
;; Protected HTML
|
|
|
- (when (and (get-text-property 0 'org-protected line)
|
|
|
+ (when (and (get-text-property 0 'org-protected org-line)
|
|
|
;; Make sure it is the entire line that is protected
|
|
|
(not (< (or (next-single-property-change
|
|
|
- 0 'org-protected line) 10000)
|
|
|
- (length line))))
|
|
|
- (let (par (ind (get-text-property 0 'original-indentation line)))
|
|
|
+ 0 'org-protected org-line) 10000)
|
|
|
+ (length org-line))))
|
|
|
+ (let (par (ind (get-text-property 0 'original-indentation org-line)))
|
|
|
(when (re-search-backward
|
|
|
"\\(<p>\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t)
|
|
|
(setq par (match-string 1))
|
|
|
(replace-match "\\2\n"))
|
|
|
- (insert line "\n")
|
|
|
+ (insert org-line "\n")
|
|
|
(while (and lines
|
|
|
(or (= (length (car lines)) 0)
|
|
|
(not ind)
|
|
@@ -1564,144 +1564,144 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
(throw 'nextline nil))
|
|
|
|
|
|
;; Blockquotes, verse, and center
|
|
|
- (when (equal "ORG-BLOCKQUOTE-START" line)
|
|
|
+ (when (equal "ORG-BLOCKQUOTE-START" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "<blockquote>\n")
|
|
|
(org-open-par)
|
|
|
(throw 'nextline nil))
|
|
|
- (when (equal "ORG-BLOCKQUOTE-END" line)
|
|
|
+ (when (equal "ORG-BLOCKQUOTE-END" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "\n</blockquote>\n")
|
|
|
(org-open-par)
|
|
|
(throw 'nextline nil))
|
|
|
- (when (equal "ORG-VERSE-START" line)
|
|
|
+ (when (equal "ORG-VERSE-START" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "\n<p class=\"verse\">\n")
|
|
|
(setq org-par-open t)
|
|
|
(setq inverse t)
|
|
|
(throw 'nextline nil))
|
|
|
- (when (equal "ORG-VERSE-END" line)
|
|
|
+ (when (equal "ORG-VERSE-END" org-line)
|
|
|
(insert "</p>\n")
|
|
|
(setq org-par-open nil)
|
|
|
(org-open-par)
|
|
|
(setq inverse nil)
|
|
|
(throw 'nextline nil))
|
|
|
- (when (equal "ORG-CENTER-START" line)
|
|
|
+ (when (equal "ORG-CENTER-START" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "\n<div style=\"text-align: center\">")
|
|
|
(org-open-par)
|
|
|
(throw 'nextline nil))
|
|
|
- (when (equal "ORG-CENTER-END" line)
|
|
|
+ (when (equal "ORG-CENTER-END" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "\n</div>")
|
|
|
(org-open-par)
|
|
|
(throw 'nextline nil))
|
|
|
(run-hooks 'org-export-html-after-blockquotes-hook)
|
|
|
(when inverse
|
|
|
- (let ((i (org-get-string-indentation line)))
|
|
|
+ (let ((i (org-get-string-indentation org-line)))
|
|
|
(if (> i 0)
|
|
|
- (setq line (concat (mapconcat 'identity
|
|
|
+ (setq org-line (concat (mapconcat 'identity
|
|
|
(make-list (* 2 i) "\\nbsp") "")
|
|
|
- " " (org-trim line))))
|
|
|
- (unless (string-match "\\\\\\\\[ \t]*$" line)
|
|
|
- (setq line (concat line "\\\\")))))
|
|
|
+ " " (org-trim org-line))))
|
|
|
+ (unless (string-match "\\\\\\\\[ \t]*$" org-line)
|
|
|
+ (setq org-line (concat org-line "\\\\")))))
|
|
|
|
|
|
;; make targets to anchors
|
|
|
(setq start 0)
|
|
|
(while (string-match
|
|
|
- "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" line start)
|
|
|
+ "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" org-line start)
|
|
|
(cond
|
|
|
- ((get-text-property (match-beginning 1) 'org-protected line)
|
|
|
+ ((get-text-property (match-beginning 1) 'org-protected org-line)
|
|
|
(setq start (match-end 1)))
|
|
|
((match-end 2)
|
|
|
- (setq line (replace-match
|
|
|
+ (setq org-line (replace-match
|
|
|
(format
|
|
|
"@<a name=\"%s\" id=\"%s\">@</a>"
|
|
|
- (org-solidify-link-text (match-string 1 line))
|
|
|
- (org-solidify-link-text (match-string 1 line)))
|
|
|
- t t line)))
|
|
|
- ((and org-export-with-toc (equal (string-to-char line) ?*))
|
|
|
+ (org-solidify-link-text (match-string 1 org-line))
|
|
|
+ (org-solidify-link-text (match-string 1 org-line)))
|
|
|
+ t t org-line)))
|
|
|
+ ((and org-export-with-toc (equal (string-to-char org-line) ?*))
|
|
|
;; FIXME: NOT DEPENDENT on TOC?????????????????????
|
|
|
- (setq line (replace-match
|
|
|
+ (setq org-line (replace-match
|
|
|
(concat "@<span class=\"target\">"
|
|
|
- (match-string 1 line) "@</span> ")
|
|
|
- ;; (concat "@<i>" (match-string 1 line) "@</i> ")
|
|
|
- t t line)))
|
|
|
+ (match-string 1 org-line) "@</span> ")
|
|
|
+ ;; (concat "@<i>" (match-string 1 org-line) "@</i> ")
|
|
|
+ t t org-line)))
|
|
|
(t
|
|
|
- (setq line (replace-match
|
|
|
+ (setq org-line (replace-match
|
|
|
(concat "@<a name=\""
|
|
|
- (org-solidify-link-text (match-string 1 line))
|
|
|
- "\" class=\"target\">" (match-string 1 line)
|
|
|
+ (org-solidify-link-text (match-string 1 org-line))
|
|
|
+ "\" class=\"target\">" (match-string 1 org-line)
|
|
|
"@</a> ")
|
|
|
- t t line)))))
|
|
|
+ t t org-line)))))
|
|
|
|
|
|
- (setq line (org-html-handle-time-stamps line))
|
|
|
+ (setq org-line (org-html-handle-time-stamps org-line))
|
|
|
|
|
|
;; replace "&" by "&", "<" and ">" by "<" and ">"
|
|
|
;; handle @<..> HTML tags (replace "@>..<" by "<..>")
|
|
|
;; Also handle sub_superscripts and checkboxes
|
|
|
- (or (string-match org-table-hline-regexp line)
|
|
|
- (string-match "^[ \t]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ \t]*$" line)
|
|
|
- (setq line (org-html-expand line)))
|
|
|
+ (or (string-match org-table-hline-regexp org-line)
|
|
|
+ (string-match "^[ \t]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ \t]*$" org-line)
|
|
|
+ (setq org-line (org-html-expand org-line)))
|
|
|
|
|
|
;; Format the links
|
|
|
- (setq line (org-html-handle-links line opt-plist))
|
|
|
+ (setq org-line (org-html-handle-links org-line opt-plist))
|
|
|
|
|
|
;; TODO items
|
|
|
(if (and org-todo-line-regexp
|
|
|
- (string-match org-todo-line-regexp line)
|
|
|
+ (string-match org-todo-line-regexp org-line)
|
|
|
(match-beginning 2))
|
|
|
|
|
|
- (setq line
|
|
|
- (concat (substring line 0 (match-beginning 2))
|
|
|
+ (setq org-line
|
|
|
+ (concat (substring org-line 0 (match-beginning 2))
|
|
|
"<span class=\""
|
|
|
- (if (member (match-string 2 line)
|
|
|
+ (if (member (match-string 2 org-line)
|
|
|
org-done-keywords)
|
|
|
"done" "todo")
|
|
|
" " (org-export-html-get-todo-kwd-class-name
|
|
|
- (match-string 2 line))
|
|
|
- "\">" (match-string 2 line)
|
|
|
- "</span>" (substring line (match-end 2)))))
|
|
|
+ (match-string 2 org-line))
|
|
|
+ "\">" (match-string 2 org-line)
|
|
|
+ "</span>" (substring org-line (match-end 2)))))
|
|
|
|
|
|
;; Does this contain a reference to a footnote?
|
|
|
(when org-export-with-footnotes
|
|
|
(setq start 0)
|
|
|
- (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" line start)
|
|
|
+ (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" org-line start)
|
|
|
;; Discard protected matches not clearly identified as
|
|
|
;; footnote markers.
|
|
|
- (if (or (get-text-property (match-beginning 2) 'org-protected line)
|
|
|
- (not (get-text-property (match-beginning 2) 'org-footnote line)))
|
|
|
+ (if (or (get-text-property (match-beginning 2) 'org-protected org-line)
|
|
|
+ (not (get-text-property (match-beginning 2) 'org-footnote org-line)))
|
|
|
(setq start (match-end 2))
|
|
|
- (let ((n (match-string 2 line)) extra a)
|
|
|
+ (let ((n (match-string 2 org-line)) extra a)
|
|
|
(if (setq a (assoc n footref-seen))
|
|
|
(progn
|
|
|
(setcdr a (1+ (cdr a)))
|
|
|
(setq extra (format ".%d" (cdr a))))
|
|
|
(setq extra "")
|
|
|
(push (cons n 1) footref-seen))
|
|
|
- (setq line
|
|
|
+ (setq org-line
|
|
|
(replace-match
|
|
|
(concat
|
|
|
(format
|
|
|
(concat "%s"
|
|
|
(format org-export-html-footnote-format
|
|
|
(concat "<a class=\"footref\" name=\"fnr.%s%s\" href=\"#fn.%s\">%s</a>")))
|
|
|
- (or (match-string 1 line) "") n extra n n)
|
|
|
+ (or (match-string 1 org-line) "") n extra n n)
|
|
|
;; If another footnote is following the
|
|
|
;; current one, add a separator.
|
|
|
(if (save-match-data
|
|
|
(string-match "\\`\\[[0-9]+\\]"
|
|
|
- (substring line (match-end 0))))
|
|
|
+ (substring org-line (match-end 0))))
|
|
|
org-export-html-footnote-separator
|
|
|
""))
|
|
|
- t t line))))))
|
|
|
+ t t org-line))))))
|
|
|
|
|
|
(cond
|
|
|
- ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line)
|
|
|
+ ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" org-line)
|
|
|
;; This is a headline
|
|
|
(setq level (org-tr-level (- (match-end 1) (match-beginning 1)
|
|
|
level-offset))
|
|
|
- txt (match-string 2 line))
|
|
|
+ txt (match-string 2 org-line))
|
|
|
(if (string-match quote-re0 txt)
|
|
|
(setq txt (replace-match "" t t txt)))
|
|
|
(if (<= level (max umax umax-toc))
|
|
@@ -1712,19 +1712,19 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
head-count opt-plist)
|
|
|
|
|
|
;; QUOTES
|
|
|
- (when (string-match quote-re line)
|
|
|
+ (when (string-match quote-re org-line)
|
|
|
(org-close-par-maybe)
|
|
|
(insert "<pre>")
|
|
|
(setq inquote t)))
|
|
|
|
|
|
((and org-export-with-tables
|
|
|
- (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" line))
|
|
|
+ (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" org-line))
|
|
|
(when (not table-open)
|
|
|
;; New table starts
|
|
|
(setq table-open t table-buffer nil table-orig-buffer nil))
|
|
|
|
|
|
;; Accumulate lines
|
|
|
- (setq table-buffer (cons line table-buffer)
|
|
|
+ (setq table-buffer (cons org-line table-buffer)
|
|
|
table-orig-buffer (cons origline table-orig-buffer))
|
|
|
(when (or (not lines)
|
|
|
(not (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)"
|
|
@@ -1739,15 +1739,15 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
|
|
|
(t
|
|
|
;; This line either is list item or end a list.
|
|
|
- (when (get-text-property 0 'list-item line)
|
|
|
- (setq line (org-html-export-list-line
|
|
|
- line
|
|
|
- (get-text-property 0 'list-item line)
|
|
|
- (get-text-property 0 'list-struct line)
|
|
|
- (get-text-property 0 'list-prevs line))))
|
|
|
+ (when (get-text-property 0 'list-item org-line)
|
|
|
+ (setq org-line (org-html-export-list-line
|
|
|
+ org-line
|
|
|
+ (get-text-property 0 'list-item org-line)
|
|
|
+ (get-text-property 0 'list-struct org-line)
|
|
|
+ (get-text-property 0 'list-prevs org-line))))
|
|
|
|
|
|
;; Horizontal line
|
|
|
- (when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" line)
|
|
|
+ (when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" org-line)
|
|
|
(if org-par-open
|
|
|
(insert "\n</p>\n<hr/>\n<p>\n")
|
|
|
(insert "\n<hr/>\n"))
|
|
@@ -1756,44 +1756,44 @@ PUB-DIR is set, use this as the publishing directory."
|
|
|
;; Empty lines start a new paragraph. If hand-formatted lists
|
|
|
;; are not fully interpreted, lines starting with "-", "+", "*"
|
|
|
;; also start a new paragraph.
|
|
|
- (if (string-match "^ [-+*]-\\|^[ \t]*$" line) (org-open-par))
|
|
|
+ (if (string-match "^ [-+*]-\\|^[ \t]*$" org-line) (org-open-par))
|
|
|
|
|
|
;; Is this the start of a footnote?
|
|
|
(when org-export-with-footnotes
|
|
|
(when (and (boundp 'footnote-section-tag-regexp)
|
|
|
(string-match (concat "^" footnote-section-tag-regexp)
|
|
|
- line))
|
|
|
+ org-line))
|
|
|
;; ignore this line
|
|
|
(throw 'nextline nil))
|
|
|
- (when (string-match "^[ \t]*\\[\\([0-9]+\\)\\]" line)
|
|
|
+ (when (string-match "^[ \t]*\\[\\([0-9]+\\)\\]" org-line)
|
|
|
(org-close-par-maybe)
|
|
|
- (let ((n (match-string 1 line)))
|
|
|
+ (let ((n (match-string 1 org-line)))
|
|
|
(setq org-par-open t
|
|
|
- line (replace-match
|
|
|
+ org-line (replace-match
|
|
|
(format
|
|
|
(concat "<p class=\"footnote\">"
|
|
|
(format org-export-html-footnote-format
|
|
|
"<a class=\"footnum\" name=\"fn.%s\" href=\"#fnr.%s\">%s</a>"))
|
|
|
- n n n) t t line)))))
|
|
|
+ n n n) t t org-line)))))
|
|
|
;; Check if the line break needs to be conserved
|
|
|
(cond
|
|
|
- ((string-match "\\\\\\\\[ \t]*$" line)
|
|
|
- (setq line (replace-match "<br/>" t t line)))
|
|
|
+ ((string-match "\\\\\\\\[ \t]*$" org-line)
|
|
|
+ (setq org-line (replace-match "<br/>" t t org-line)))
|
|
|
(org-export-preserve-breaks
|
|
|
- (setq line (concat line "<br/>"))))
|
|
|
+ (setq org-line (concat org-line "<br/>"))))
|
|
|
|
|
|
;; Check if a paragraph should be started
|
|
|
(let ((start 0))
|
|
|
(while (and org-par-open
|
|
|
- (string-match "\\\\par\\>" line start))
|
|
|
+ (string-match "\\\\par\\>" org-line start))
|
|
|
;; Leave a space in the </p> so that the footnote matcher
|
|
|
;; does not see this.
|
|
|
(if (not (get-text-property (match-beginning 0)
|
|
|
- 'org-protected line))
|
|
|
- (setq line (replace-match "</p ><p >" t t line)))
|
|
|
+ 'org-protected org-line))
|
|
|
+ (setq org-line (replace-match "</p ><p >" t t org-line)))
|
|
|
(setq start (match-end 0))))
|
|
|
|
|
|
- (insert line "\n")))))
|
|
|
+ (insert org-line "\n")))))
|
|
|
|
|
|
;; Properly close all local lists and other lists
|
|
|
(when inquote
|
|
@@ -2041,7 +2041,7 @@ for formatting. This is required for the DocBook exporter."
|
|
|
(lambda (x) (string-match "^[ \t]*|-" x))
|
|
|
(cdr lines)))))
|
|
|
(nline 0) fnum nfields i (cnt 0)
|
|
|
- tbopen line fields html gr colgropen rowstart rowend
|
|
|
+ tbopen org-line fields html gr colgropen rowstart rowend
|
|
|
ali align aligns n)
|
|
|
(setq caption (and caption (org-html-do-expand caption)))
|
|
|
(when (and col-cookies org-table-clean-did-remove-column)
|
|
@@ -2050,9 +2050,9 @@ for formatting. This is required for the DocBook exporter."
|
|
|
(if splice (setq head nil))
|
|
|
(unless splice (push (if head "<thead>" "<tbody>") html))
|
|
|
(setq tbopen t)
|
|
|
- (while (setq line (pop lines))
|
|
|
+ (while (setq org-line (pop lines))
|
|
|
(catch 'next-line
|
|
|
- (if (string-match "^[ \t]*|-" line)
|
|
|
+ (if (string-match "^[ \t]*|-" org-line)
|
|
|
(progn
|
|
|
(unless splice
|
|
|
(push (if head "</thead>" "</tbody>") html)
|
|
@@ -2061,7 +2061,7 @@ for formatting. This is required for the DocBook exporter."
|
|
|
;; ignore this line
|
|
|
(throw 'next-line t)))
|
|
|
;; Break the line into fields
|
|
|
- (setq fields (org-split-string line "[ \t]*|[ \t]*"))
|
|
|
+ (setq fields (org-split-string org-line "[ \t]*|[ \t]*"))
|
|
|
(unless fnum (setq fnum (make-vector (length fields) 0)
|
|
|
nfields (length fnum)))
|
|
|
(setq nline (1+ nline) i -1
|
|
@@ -2176,14 +2176,14 @@ for formatting. This is required for the DocBook exporter."
|
|
|
This conversion does *not* use `table-generate-source' from table.el.
|
|
|
This has the advantage that Org-mode's HTML conversions can be used.
|
|
|
But it has the disadvantage, that no cell- or row-spanning is allowed."
|
|
|
- (let (line field-buffer
|
|
|
+ (let (org-line field-buffer
|
|
|
(head org-export-highlight-first-table-line)
|
|
|
fields html empty i)
|
|
|
(setq html (concat html-table-tag "\n"))
|
|
|
- (while (setq line (pop lines))
|
|
|
+ (while (setq org-line (pop lines))
|
|
|
(setq empty " ")
|
|
|
(catch 'next-line
|
|
|
- (if (string-match "^[ \t]*\\+-" line)
|
|
|
+ (if (string-match "^[ \t]*\\+-" org-line)
|
|
|
(progn
|
|
|
(if field-buffer
|
|
|
(progn
|
|
@@ -2209,7 +2209,7 @@ But it has the disadvantage, that no cell- or row-spanning is allowed."
|
|
|
;; Ignore this line
|
|
|
(throw 'next-line t)))
|
|
|
;; Break the line into fields and store the fields
|
|
|
- (setq fields (org-split-string line "[ \t]*|[ \t]*"))
|
|
|
+ (setq fields (org-split-string org-line "[ \t]*|[ \t]*"))
|
|
|
(if field-buffer
|
|
|
(setq field-buffer (mapcar
|
|
|
(lambda (x)
|
|
@@ -2574,10 +2574,10 @@ Replaces invalid characters with \"_\" and then prepends a prefix."
|
|
|
(org-close-li)
|
|
|
(insert "</ul>\n")))
|
|
|
|
|
|
-(defun org-html-export-list-line (line pos struct prevs)
|
|
|
- "Insert list syntax in export buffer. Return LINE, maybe modified.
|
|
|
+(defun org-html-export-list-line (org-line pos struct prevs)
|
|
|
+ "Insert list syntax in export buffer. Return ORG-LINE, maybe modified.
|
|
|
|
|
|
-POS is the item position or line position the line had before
|
|
|
+POS is the item position or org-line position the org-line had before
|
|
|
modifications to buffer. STRUCT is the list structure. PREVS is
|
|
|
the alist of previous items."
|
|
|
(let* ((get-type
|
|
@@ -2626,10 +2626,10 @@ the alist of previous items."
|
|
|
"\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
|
|
|
"\\(?:\\(\\[[ X-]\\]\\)[ \t]+\\)?"
|
|
|
"\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?"
|
|
|
- "\\(.*\\)") line)
|
|
|
- (let* ((checkbox (match-string 3 line))
|
|
|
- (desc-tag (or (match-string 4 line) "???"))
|
|
|
- (body (or (match-string 5 line) ""))
|
|
|
+ "\\(.*\\)") org-line)
|
|
|
+ (let* ((checkbox (match-string 3 org-line))
|
|
|
+ (desc-tag (or (match-string 4 org-line) "???"))
|
|
|
+ (body (or (match-string 5 org-line) ""))
|
|
|
(list-beg (org-list-get-list-begin pos struct prevs))
|
|
|
(firstp (= list-beg pos))
|
|
|
;; Always refer to first item to determine list type, in
|
|
@@ -2663,9 +2663,9 @@ the alist of previous items."
|
|
|
;; Return modified line
|
|
|
body))
|
|
|
;; At a list ender: go to next line (side-effects only).
|
|
|
- ((equal "ORG-LIST-END-MARKER" line) (throw 'nextline nil))
|
|
|
+ ((equal "ORG-LIST-END-MARKER" org-line) (throw 'nextline nil))
|
|
|
;; Not at an item: return line unchanged (side-effects only).
|
|
|
- (t line))))
|
|
|
+ (t org-line))))
|
|
|
|
|
|
(provide 'org-html)
|
|
|
|