|
|
|
|
@ -76,17 +76,27 @@ The list of Pandoc specific meta-data is defined in |
|
|
|
|
|
|
|
|
|
Required fixes: |
|
|
|
|
|
|
|
|
|
- Unescape the Hugo shortcodes: \"{{\\\\=< shortcode \\\\=>}}\" -> \"{{< shortcode >}}\"" |
|
|
|
|
- Unescape the Hugo shortcodes: \"{{\\\\=< shortcode \\\\=>}}\" -> |
|
|
|
|
\"{{< shortcode >}}\". |
|
|
|
|
|
|
|
|
|
- Replace \"::: {#refs .references}\" with \"## References\" where the |
|
|
|
|
number of hashes depends on HUGO_LEVEL_OFFSET. |
|
|
|
|
|
|
|
|
|
- Replace \"::: {#ref-someref} with \"<a id=\"ref-someref\"></a>\". |
|
|
|
|
|
|
|
|
|
- Remove \"^:::$\"" |
|
|
|
|
(with-temp-buffer |
|
|
|
|
(insert content) |
|
|
|
|
(goto-char (point-min)) |
|
|
|
|
(let ((case-fold-search nil) |
|
|
|
|
(regexp (concat "{{\\\\<" |
|
|
|
|
"\\(?1:\\(.\\|\n\\)+?\\)" |
|
|
|
|
"\\\\>}}"))) |
|
|
|
|
(while (re-search-forward regexp nil :noerror) |
|
|
|
|
(replace-match "{{<\\1>}}" :fixedcase))) |
|
|
|
|
(buffer-substring-no-properties (point-min) (point-max)))) |
|
|
|
|
(let ((case-fold-search nil)) |
|
|
|
|
(goto-char (point-min)) |
|
|
|
|
(delete-matching-lines "^:::$") |
|
|
|
|
(save-excursion |
|
|
|
|
(let ((regexp (concat "{{\\\\<" |
|
|
|
|
"\\(?1:\\(.\\|\n\\)+?\\)" |
|
|
|
|
"\\\\>}}"))) |
|
|
|
|
(while (re-search-forward regexp nil :noerror) |
|
|
|
|
(replace-match "{{<\\1>}}" :fixedcase)))) |
|
|
|
|
(buffer-substring-no-properties (point-min) (point-max))))) |
|
|
|
|
|
|
|
|
|
(defun ox-hugo-pandoc-cite--parse-citations-maybe (info) |
|
|
|
|
"Check if Pandoc needs to be run to parse citations. |
|
|
|
|
|