commit | author | age
|
76bbd0
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file uses dynamic docstrings, first added in Emacs 19.29. |
|
7 |
|
|
8 |
;;; This file does not contain utf-8 non-ASCII characters, |
|
9 |
;;; and so can be loaded in Emacs versions earlier than 23. |
|
10 |
|
|
11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
13 |
|
|
14 |
|
|
15 |
(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313\314\315\316\317&\210\320\321\322\323\324DD\325\312\305\326\327&\210\320\330\322\323\331DD\332\312\305\326\333\314\334\316\335&\210\320\336\322\323\337DD\340\312\305\326\333\314\334\316\341&\210\342\343\344\345\346\347\350\351\352\353\354&\n\207" [require cl-lib ox-html ox-publish custom-declare-group org-export-md nil "Options specific to Markdown export back-end." :tag "Org Markdown" :group org-export :version "24.4" :package-version (Org . "8.0") custom-declare-variable org-md-headline-style funcall function #[0 "\300\207" [atx] 1] "Style used to format headlines.\nThis variable can be set to either `atx' or `setext'." :type (choice (const :tag "Use \"atx\" style" atx) (const :tag "Use \"Setext\" style" setext)) org-md-footnotes-section #[0 "\300\207" [#1="%s%s"] 1 #1#] "Format string for the footnotes section.\nThe first %s placeholder will be replaced with the localized Footnotes section\nheading, the second with the contents of the Footnotes section." string "26.1" (Org . "9.0") org-md-footnote-format #[0 "\300\207" [#2="<sup>%s</sup>"] 1 #2#] "Format string for the footnote reference.\nThe %s will be replaced by the footnote reference itself." (Org . "9.0") org-export-define-derived-backend md html :filters-alist ((:filter-parse-tree . org-md-separate-elements)) :menu-entry (109 "Export to Markdown" ((77 "To temporary buffer" (lambda (a s v b) (org-md-export-as-markdown a s v))) (109 "To file" (lambda (a s v b) (org-md-export-to-markdown a s v))) (111 "To file and open" (lambda (a s v b) (if a (org-md-export-to-markdown t s v) (org-open-file (org-md-export-to-markdown nil s v))))))) :translate-alist ((bold . org-md-bold) (code . org-md-verbatim) (example-block . org-md-example-block) (export-block . org-md-export-block) (fixed-width . org-md-example-block) (headline . org-md-headline) (horizontal-rule . org-md-horizontal-rule) (inline-src-block . org-md-verbatim) (inner-template . org-md-inner-template) (italic . org-md-italic) (item . org-md-item) (keyword . org-md-keyword) (line-break . org-md-line-break) (link . org-md-link) (node-property . org-md-node-property) (paragraph . org-md-paragraph) (plain-list . org-md-plain-list) (plain-text . org-md-plain-text) (property-drawer . org-md-property-drawer) (quote-block . org-md-quote-block) (section . org-md-section) (src-block . org-md-example-block) (template . org-md-template) (verbatim . org-md-verbatim)) :options-alist ((:md-footnote-format nil nil org-md-footnote-format) (:md-footnotes-section nil nil org-md-footnotes-section) (:md-headline-style nil nil org-md-headline-style))] 12) |
|
16 |
#@501 Fix blank lines between elements. |
|
17 |
|
|
18 |
TREE is the parse tree being exported. BACKEND is the export |
|
19 |
back-end used. INFO is a plist used as a communication channel. |
|
20 |
|
|
21 |
Enforce a blank line between elements. There are two exceptions |
|
22 |
to this rule: |
|
23 |
|
|
24 |
1. Preserve blank lines between sibling items in a plain list, |
|
25 |
|
|
26 |
2. In an item, remove any blank line before the very first |
|
27 |
paragraph and the next sub-list when the latter ends the |
|
28 |
current item. |
|
29 |
|
|
30 |
Assume BACKEND is `md'. |
|
31 |
|
|
32 |
(fn TREE BACKEND INFO) |
|
33 |
(defalias 'org-md-separate-elements #[771 "\301\302\303\"\304\305\306\307\310!\311\"\312\313%#\210\207" [org-element-all-elements org-element-map remq item make-byte-code 257 "\211\301\211:\204 \211;\205 \302\202 \211@9\205 \211@\262\303=\203\213 \304\211;\203/ \305\306#\2025 \307A@\"\266\202\211:\204E \211;\205M \302\202M \211@9\205M \211@\262\310=\203\213 \311\300\"\203\213 \312\300\"\211\211:\204n \211;\205v \302\202v \211@9\205v \211@\262\313=\205\202 \312\300\"?\262\203\213 \306\202\214 \314;\203\232 \315\316$\202\246 A\317A@#\240\210\207" vconcat vector [:post-blank plain-text paragraph :parent get-text-property 0 plist-get item org-export-first-sibling-p org-export-get-next-element plain-list 1 org-add-props nil plist-put] 9 "\n\n(fn E)"] 12 (#$ . 3085)]) |
|
34 |
#@161 Transcode BOLD object into Markdown format. |
|
35 |
CONTENTS is the text within bold markup. INFO is a plist used as |
|
36 |
a communication channel. |
|
37 |
|
|
38 |
(fn BOLD CONTENTS INFO) |
|
39 |
(defalias 'org-md-bold #[771 "\300\301\"\207" [format "**%s**"] 6 (#$ . 4396)]) |
|
40 |
#@145 Transcode VERBATIM object into Markdown format. |
|
41 |
CONTENTS is nil. INFO is a plist used as a communication |
|
42 |
channel. |
|
43 |
|
|
44 |
(fn VERBATIM CONTENTS INFO) |
|
45 |
(defalias 'org-md-verbatim #[771 "\300\211;\203 \301\302#\202 \303A@\"\266\202\304\305\306\"\204# \307\2026 \310\306\"\2041 \311\306\"\2035 \312\2026 \313\"\207" [:value get-text-property 0 plist-get format string-match "`" "`%s`" string-prefix-p string-suffix-p "`` %s ``" "``%s``"] 9 (#$ . 4644)]) |
|
46 |
#@156 Transcode EXAMPLE-BLOCK element into Markdown format. |
|
47 |
CONTENTS is nil. INFO is a plist used as a communication |
|
48 |
channel. |
|
49 |
|
|
50 |
(fn EXAMPLE-BLOCK CONTENTS INFO) |
|
51 |
(defalias 'org-md-example-block #[771 "\300\301\302\303\304\"!#\207" [replace-regexp-in-string "^" " " org-remove-indentation org-export-format-code-default] 10 (#$ . 5106)]) |
|
52 |
#@155 Transcode a EXPORT-BLOCK element from Org to Markdown. |
|
53 |
CONTENTS is nil. INFO is a plist holding contextual information. |
|
54 |
|
|
55 |
(fn EXPORT-BLOCK CONTENTS INFO) |
|
56 |
(defalias 'org-md-export-block #[771 "\300\211;\203 \301\302#\202 \303A@\"\266\202\304\235\2036 \305\306\211;\203, \301\302#\2022 \303A@\"\266\202!\207\307\310$\207" [:type get-text-property 0 plist-get ("MARKDOWN" "MD") org-remove-indentation :value org-export-with-backend html] 10 (#$ . 5450)]) |
|
57 |
#@164 Transcode HEADLINE element into Markdown format. |
|
58 |
CONTENTS is the headline contents. INFO is a plist used as |
|
59 |
a communication channel. |
|
60 |
|
|
61 |
(fn HEADLINE CONTENTS INFO) |
|
62 |
(defalias 'org-md-headline #[771 "\300\211;\203 \301\302#\202 \303A@\"\266\202?\205M\304\"\305\306\211;\203/ \301\302#\2025 \303A@\"\266\202\"\303\307\"\205c \310\211;\203O \301\302#\202U \303A@\"\266\202\211\205a \305\"\311P\262\303\312\"\205} \313\"\211\205{ \314\315\316\317\320#\"\262\303\321\"\205\246 \322\211;\203\224 \301\302#\202\232 \303A@\"\266\202\211\205\244 \314\323\"\262Q\303\324\"\325\n \"\204\330 \211\326>\203\330 \211\327=\203\313 \330V\204\330 \211\331=\203\332V\203\333\n \"\204\345 \334\202\362 \335\336\337\f\"!@!\340P\211\341\342GZ\343\"\344\205 \345\346\347#\260\262\202K\350\n \"\205=\314\351\352\f\211;\203+\301\302#\2021\303A@\"\266\202\206<\353\f\"\"\354 %\nP\262\266\207\207" [:footnote-section-p get-text-property 0 plist-get org-export-get-relative-level org-export-data :title :with-todo-keywords :todo-keyword " " :with-tags org-export-get-tags format " :%s:" mapconcat identity ":" :with-priority :priority "[#%c] " :md-headline-style org-export-low-level-p (atx setext) atx 6 setext 2 org-export-numbered-headline-p "-" number-to-string last org-export-get-headline-number "." make-string 4 32 "\n\n" replace-regexp-in-string "^" " " org-md--headline-referred-p "<a id=\"%s\"></a>" :CUSTOM_ID org-export-get-reference org-md--headline-title] 20 (#$ . 5924)]) |
|
63 |
#@167 Non-nil when HEADLINE is being referred to. |
|
64 |
INFO is a plist used as a communication channel. Links and table |
|
65 |
of contents can refer to headlines. |
|
66 |
|
|
67 |
(fn HEADLINE INFO) |
|
68 |
(defalias 'org-md--headline-referred-p #[514 "\300\211;\203 \301\302#\202 \303A@\"\266\202?\205] \303\304\"\203. \305\303\304\"\">\206] \306\307\310\311\312\313\"\314\"\315\316%\317!\"\206] \320\303\321\"\322\307\310\323\312\313 \"\324\"\325\326%\327%\207" [:footnote-section-p get-text-property 0 plist-get :with-toc org-export-collect-headlines cl-some make-byte-code 257 "\211\211:\204\n \302\202 \211@9\203 \211AA\202 \211\262@\211\211:\204) \211;\2051 \303\2021 \211@9\2051 \211@\262\304=\205K \305\306\307\310\311\312\313\300\301\"\314\"\315\316%\301\317%\207" vconcat vector [nil plain-text section org-element-map keyword make-byte-code 257 "\304\211;\203 \305\306#\202 \307A@\"\266\202\310\232\205q \311\312\211;\203, \305\306#\2022 \307A@\"\266\202\313\314\311\315#)\266\203\205n \315\316\"\205S \317\320\306\"!\321\314\311\315#)\266\203\300\322\301\205j #>\266\202)\266\202\207" vconcat vector [case-fold-search inhibit-changing-match-data :key get-text-property 0 plist-get "TOC" t :value "\\<headlines\\>" nil string-match "\\<[0-9]+\\>" string-to-number match-string "\\<local\\>" org-export-collect-headlines] 11 "\n\n(fn KEYWORD)" t] 12 "\n\n(fn H)" org-element-lineage org-element-map :parse-tree link "\300\302\211;\203 \303\304#\202 \305A@\"\266\202\211\306\235\203% \307\301\"\2023 \211\310\232\2032 \311\301\"\2023 \312\262=\207" [:type get-text-property 0 plist-get ("id" "custom-id") org-export-resolve-id-link "fuzzy" org-export-resolve-fuzzy-link nil] 8 "\n\n(fn LINK)" t] 12 (#$ . 7491)]) |
|
69 |
#@322 Generate a headline title in the preferred Markdown headline style. |
|
70 |
STYLE is the preferred style (`atx' or `setext'). LEVEL is the |
|
71 |
header level. TITLE is the headline title. ANCHOR is the HTML |
|
72 |
anchor tag for the section as a string. TAGS are the tags set on |
|
73 |
the section. |
|
74 |
|
|
75 |
(fn STYLE LEVEL TITLE &optional ANCHOR TAGS) |
|
76 |
(defalias 'org-md--headline-title #[1283 "\205 \300P\301=\2035 \302W\2035 \303U\203 \304\202 \305\306G\"\307P\307\307\307\260\266\202\202F \306\310\"\307\311\300\260\262\207" ["\n\n" setext 3 1 61 45 make-string "\n" 35 " "] 15 (#$ . 9246)]) |
|
77 |
#@185 Transcode HORIZONTAL-RULE element into Markdown format. |
|
78 |
CONTENTS is the horizontal rule contents. INFO is a plist used |
|
79 |
as a communication channel. |
|
80 |
|
|
81 |
(fn HORIZONTAL-RULE CONTENTS INFO) |
|
82 |
(defalias 'org-md-horizontal-rule #[771 "\300\207" ["---"] 4 (#$ . 9842)]) |
|
83 |
#@167 Transcode ITALIC object into Markdown format. |
|
84 |
CONTENTS is the text within italic markup. INFO is a plist used |
|
85 |
as a communication channel. |
|
86 |
|
|
87 |
(fn ITALIC CONTENTS INFO) |
|
88 |
(defalias 'org-md-italic #[771 "\300\301\"\207" [format "*%s*"] 6 (#$ . 10108)]) |
|
89 |
#@152 Transcode ITEM element into Markdown format. |
|
90 |
CONTENTS is the item contents. INFO is a plist used as |
|
91 |
a communication channel. |
|
92 |
|
|
93 |
(fn ITEM CONTENTS INFO) |
|
94 |
(defalias 'org-md-item #[771 "\300\301\211;\203 \302\303#\202 \304A@\"\266\202\262\211;\203( \302\303#\202. \304A@\"\266\202\305\211;\203? \302\303#\202E \304A@\"\266\202\306=\204Q \307\202{ \310\311\312\313\211;\203d \302\303#\202j \304A@\"\266\202\314!\315!$!@!\316P\211\317\320GZ\321\"\322\211;\203\223 \302\303#\202\231 \304A@\"\266\202\211\323\267\202\255 \324\202\256 \325\202\256 \326\202\256 \327\262\330 \211;\203\300 \302\303#\202\306 \304A@\"\266\202\211\205\324 \331\332\333\"\"\262\205\366 \334\335\336#\327\334\203\353 \337\202\354 \340\341\334\342\341##\266\202\260\207" [:type :parent get-text-property 0 plist-get :structure ordered "-" number-to-string last org-list-get-item-number :begin org-list-prevs-alist org-list-parents-alist "." make-string 4 32 :checkbox #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (on 161 trans 165 off 169)) "[X] " "[-] " "[ ] " nil :tag format "**%s:** " org-export-data replace-regexp-in-string "^" " " "\\`\\([ ]*\n\\)+" "\\`[ \n
]+" "" "[ \n
]+\\'"] 19 (#$ . 10363)]) |
|
95 |
#@146 Transcode a KEYWORD element into Markdown format. |
|
96 |
CONTENTS is nil. INFO is a plist used as a communication |
|
97 |
channel. |
|
98 |
|
|
99 |
(fn KEYWORD CONTENTS INFO) |
|
100 |
(defalias 'org-md-keyword #[771 "\302\211;\203 \303\304#\202 \305A@\"\266\202\211\306\235\2037 \307\211;\203, \303\304#\2022 \305A@\"\266\202\202\231 \211\310\232\203\223 \311\307\211;\203M \303\304#\202S \305A@\"\266\202\312\313\311\314#)\266\203\205\215 \314\315\"\205t \316\317\304\"!\320\313\311\314#)\266\203\321\322$!\266\202)\266\202\202\231 \323\324$\207" [case-fold-search inhibit-changing-match-data :key get-text-property 0 plist-get ("MD" "MARKDOWN") :value "TOC" t "\\<headlines\\>" nil string-match "\\<[0-9]+\\>" string-to-number match-string "\\<local\\>" org-remove-indentation org-md--build-toc org-export-with-backend html] 14 (#$ . 11642)]) |
|
101 |
#@149 Transcode LINE-BREAK object into Markdown format. |
|
102 |
CONTENTS is nil. INFO is a plist used as a communication |
|
103 |
channel. |
|
104 |
|
|
105 |
(fn LINE-BREAK CONTENTS INFO) |
|
106 |
(defalias 'org-md-line-break #[771 "\300\207" [" \n"] 4 (#$ . 12495)]) |
|
107 |
#@162 Transcode LINE-BREAK object into Markdown format. |
|
108 |
CONTENTS is the link's description. INFO is a plist used as |
|
109 |
a communication channel. |
|
110 |
|
|
111 |
(fn LINK CONTENTS INFO) |
|
112 |
(defalias 'org-md-link #[771 "\301\302\211;\203 \303\304#\202 \305A@\"\266\202\306\307#\206\341\211\310\235\203 \211\311\230\2033 \312\"\2027 \313\"\211\211:\204F \211;\205N \314\202N \211@9\205N \211@\262\211\315\267\202\314 !\204e \316\317\"\202k \316\320#\262\202\316\321\322!\206\251 \323\"\203\216 \324\325\326\n\"\327#\202\251 \330\331\211;\203\236 \303\304#\202\244 \305A@\"\266\202\"\332\211;\203\270 \303\304#\202\276 \305A@\"\266\202\206\310 \333 \"#\202\322!\206\362 \334\"\211\204\340 \335\202\360 \211:\204\353 \325!\202\360 \324\325\327#\262\211\205 \316\321\333\n\"#\262\262\262\202\341\336\"\203c\337\211;\203\303\304#\202%\305A@\"\266\202\340\232\2044\341Q\202A\342!\204>\211\202A\343!\262\330\344\345!!\"\316\346\322!\204X\202]\316\347#\"\266\202\202\341\211\350\230\203\221\337\211;\203x\303\304#\202~\305A@\"\266\202\316\351\"\352\"\"\262\202\341\211\353\232\203\233\202\341\337\211;\203\252\303\304#\202\260\305A@\"\266\202\354\235\203\277\341Q\202\316\340\230\203\315\355!!\202\316\211\204\331\316\317\"\202\337\316\320#\266\202\207" [org-html-inline-image-rules #[257 "\300\301\"\227\302\230\203 \303!\304P\207\207" [file-name-extension "." ".org" file-name-sans-extension ".md"] 4 "\n\n(fn RAW-PATH)"] :type get-text-property 0 plist-get org-export-custom-protocol-maybe md ("custom-id" "id" "fuzzy") "fuzzy" org-export-resolve-fuzzy-link org-export-resolve-id-link plain-text #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (plain-text 86 headline 112)) format "<%s>" "[%s](%s)" "[%s](#%s)" org-string-nw-p org-export-numbered-headline-p mapconcat number-to-string org-export-get-headline-number "." org-export-data :title :CUSTOM_ID org-export-get-reference org-export-get-ordinal nil org-export-inline-image-p :path "file" ":" file-name-absolute-p expand-file-name org-export-get-caption org-export-get-parent-element "![img](%s)" "%s \"%s\"" "coderef" org-export-get-coderef-format org-export-resolve-coderef "radio" ("http" "https" "ftp" "mailto" "irc") org-export-file-uri] 16 (#$ . 12722)]) |
|
113 |
#@157 Transcode a NODE-PROPERTY element into Markdown syntax. |
|
114 |
CONTENTS is nil. INFO is a plist holding contextual |
|
115 |
information. |
|
116 |
|
|
117 |
(fn NODE-PROPERTY CONTENTS INFO) |
|
118 |
(defalias 'org-md-node-property #[771 "\300\301\302\211;\203 \303\304#\202 \305A@\"\266\202\306\211;\203) \303\304#\202/ \305A@\"\266\202\211\203; \307P\202< |