Fix fenced code blocks in Pandoc output

master
Kaushal Modi 8 years ago
parent 83858559ce
commit 00a6794684
  1. 5
      ox-hugo-pandoc-cite.el
  2. 4
      test/site/content-org/all-posts.org
  3. 12
      test/site/content/posts/citation-forms.md
  4. 6
      test/site/content/posts/citations-example-toml.md

@ -14,7 +14,7 @@
;; TODO: Change the defconst to defvar ;; TODO: Change the defconst to defvar
(defvar org-hugo-pandoc-cite-pandoc-args-list (defvar org-hugo-pandoc-cite-pandoc-args-list
'("-f" "markdown" '("-f" "markdown"
"-t" "markdown-citations-simple_tables+pipe_tables-fenced_divs" "-t" "markdown-citations-simple_tables+pipe_tables-fenced_divs-fenced_code_attributes"
"--atx-headers" "--atx-headers"
"--id-prefix=fn:") "--id-prefix=fn:")
"Pandoc arguments used in `org-hugo-pandoc-cite--run-pandoc'. "Pandoc arguments used in `org-hugo-pandoc-cite--run-pandoc'.
@ -34,6 +34,9 @@
-fenced_divs : Do not replace HTML <div> tags with Pandoc fenced -fenced_divs : Do not replace HTML <div> tags with Pandoc fenced
divs \":::\". divs \":::\".
-fenced_code_attributes : Create fenced code blocks like
\"``` lang .. ```\" instead of \"``` {.lang} .. ```\".
--atx-headers : Use \"# foo\" style heading for output markdown. --atx-headers : Use \"# foo\" style heading for output markdown.
--id-prefix=fn: : Create footnote ID's like \"[^fn:1]\" instead of --id-prefix=fn: : Create footnote ID's like \"[^fn:1]\" instead of

@ -4635,6 +4635,10 @@ Text not containing *Markdown*
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
|----------+----------+----------| |----------+----------+----------|
*** Testing fenced code blocks
#+begin_src emacs-lisp
(message "Hello World")
#+end_src
** Citations Example (YAML) :yaml: ** Citations Example (YAML) :yaml:
:PROPERTIES: :PROPERTIES:
:EXPORT_HUGO_FRONT_MATTER_FORMAT: yaml :EXPORT_HUGO_FRONT_MATTER_FORMAT: yaml

@ -10,20 +10,20 @@ draft = false
The citations withing square brackets will be rendered within The citations withing square brackets will be rendered within
parentheses. parentheses.
``` {.org} ``` org
Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1]. Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
``` ```
Blah blah (see Doe [1999](#ref-doe99), 4:33--35; also Smith Blah blah (see Doe [1999](#ref-doe99), 4:33--35; also Smith
[2004](#ref-smith04), ch. 1). [2004](#ref-smith04), ch. 1).
``` {.org} ``` org
Blah blah [@doe99, pp. 33-35, 38-39]. Blah blah [@doe99, pp. 33-35, 38-39].
``` ```
Blah blah (Doe [1999](#ref-doe99), 4:33--35, 38--39). Blah blah (Doe [1999](#ref-doe99), 4:33--35, 38--39).
``` {.org} ``` org
Blah blah [@smith04; @doe99]. Blah blah [@smith04; @doe99].
``` ```
@ -35,7 +35,7 @@ A minus sign (`-`) before the `@` will suppress mention of the author in
the citation. This can be useful when the author is already mentioned in the citation. This can be useful when the author is already mentioned in
the text. the text.
``` {.org} ``` org
Smith says blah [-@smith04]. Smith says blah [-@smith04].
``` ```
@ -43,13 +43,13 @@ Smith says blah ([2004](#ref-smith04)).
## In-text citations (no square brackets) {#in-text-citations--no-square-brackets} ## In-text citations (no square brackets) {#in-text-citations--no-square-brackets}
``` {.org} ``` org
@smith04 says blah. @smith04 says blah.
``` ```
Smith ([2004](#ref-smith04)) says blah. Smith ([2004](#ref-smith04)) says blah.
``` {.org} ``` org
@smith04 [p. 33] says blah. @smith04 [p. 33] says blah.
``` ```

@ -50,6 +50,12 @@ Some text.
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
## Testing fenced code blocks
``` emacs-lisp
(message "Hello World")
```
## References {#references} ## References {#references}
<div id="refs" class="references"> <div id="refs" class="references">

Loading…
Cancel
Save