From 5d9b531df03f2145ce6db837286d915abc54b79a Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Mon, 27 Nov 2017 14:59:14 -0500 Subject: [PATCH] Minor re-org of tests and tags --- test/site/content-org/all-posts.org | 56 ++++++++++--------- .../posts/code-fenced-src-blocks-default.md | 2 +- .../posts/source-block-with-highlighting.md | 2 +- .../posts/source-block-with-line-numbers.md | 2 +- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/test/site/content-org/all-posts.org b/test/site/content-org/all-posts.org index 62a24e4..46375af 100644 --- a/test/site/content-org/all-posts.org +++ b/test/site/content-org/all-posts.org @@ -472,7 +472,8 @@ sense. But hey, a test is a test./ You should see *no* table exported above. * Source blocks :src_block: -** Code-fenced source blocks (default behavior) +** Code fence :code_fence: +*** Code-fenced source blocks (default behavior) :PROPERTIES: :EXPORT_FILE_NAME: code-fenced-src-blocks-default :EXPORT_DATE: 2017-07-31 @@ -484,7 +485,7 @@ The source blocks are code-fenced by default. *It is necessary to set the Hugo site config variable =pygmentsCodeFences= to =true= for syntax highlighting to work for fenced code blocks.* -** Code-fenced source blocks :code_fence: +*** Code-fenced source blocks :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: t :EXPORT_FILE_NAME: code-fenced-src-blocks @@ -498,7 +499,8 @@ the =EXPORT_HUGO_CODE_FENCE= property to =t=. *It is necessary to set the Hugo site config variable =pygmentsCodeFences= to =true= for syntax highlighting to work for fenced code blocks.* -** Source blocks with =highlight= shortcode :highlight:shortcode: +** Highlight Shortcode :highlight:shortcode: +*** Source blocks with =highlight= shortcode :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: :EXPORT_FILE_NAME: highlight-shortcode-src-blocks @@ -512,66 +514,66 @@ property needs to be left *empty* instead of setting to =nil=! :END: #+END_EXAMPLE #+INCLUDE: "./all-posts.org::#example-text-with-code-blocks" :only-contents t -** Source blocks with line number annotation +*** Source blocks with line number annotation :PROPERTIES: :EXPORT_FILE_NAME: source-block-with-line-numbers :END: - [[http://orgmode.org/manual/Literal-examples.html][Org reference]] - [[https://gohugo.io/content-management/syntax-highlighting/][Hugo =highlight= shortcode with line numbers]] -*** Cases +**** Cases :PROPERTIES: :CUSTOM_ID: source-block-line-number-cases :END: -**** Default new line number start -***** Org source +***** Default new line number start +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC -**** Specify new line number start -***** Org source +***** Specify new line number start +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC -**** Default continued line numbers -***** Org source +***** Default continued line numbers +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC -**** Specify continued line numbers jump -***** Org source +***** Specify continued line numbers jump +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC -** Source blocks with highlighting +*** Source blocks with highlighting :PROPERTIES: :EXPORT_FILE_NAME: source-block-with-highlighting :CUSTOM_ID: source-blocks-with-highlighting :END: -*** Without line numbers +**** Without line numbers :PROPERTIES: :CUSTOM_ID: source-blocks-with-highlighting-no-linenums :END: -***** Org source +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC @@ -580,7 +582,7 @@ page/container width. This could be either called a bug in Hugo, or the HTML limitation. A workaround is below.. *use line numbers too!*. -*** With line numbers *not* starting from 1 +**** With line numbers *not* starting from 1 :PROPERTIES: :CUSTOM_ID: source-blocks-with-highlighting-with-linenums-not-starting-from-1 :END: @@ -594,23 +596,23 @@ in the =highlight= shortcode when line numbers are enabled). always with the starting line number reference of 1. That has no relation with the value of the line numbers displayed using the =-n= or =+n= switches! -***** Org source +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC -*** With line numbers +**** With line numbers :PROPERTIES: :CUSTOM_ID: source-blocks-with-highlighting-with-linenums :END: -***** Org source +****** Org source #+BEGIN_SRC org :noweb yes <> #+END_SRC -***** Output +****** Output #+BEGIN_SRC org :noweb yes :exports results :results output replace :eval yes <> #+END_SRC diff --git a/test/site/content/posts/code-fenced-src-blocks-default.md b/test/site/content/posts/code-fenced-src-blocks-default.md index 736454d..23d94ee 100644 --- a/test/site/content/posts/code-fenced-src-blocks-default.md +++ b/test/site/content/posts/code-fenced-src-blocks-default.md @@ -1,7 +1,7 @@ +++ title = "Code-fenced source blocks (default behavior)" date = 2017-07-31 -tags = ["src-block"] +tags = ["src-block", "code-fence"] draft = false +++ diff --git a/test/site/content/posts/source-block-with-highlighting.md b/test/site/content/posts/source-block-with-highlighting.md index c8f74f5..52435d6 100644 --- a/test/site/content/posts/source-block-with-highlighting.md +++ b/test/site/content/posts/source-block-with-highlighting.md @@ -1,6 +1,6 @@ +++ title = "Source blocks with highlighting" -tags = ["src-block"] +tags = ["src-block", "highlight", "shortcode"] draft = false +++ diff --git a/test/site/content/posts/source-block-with-line-numbers.md b/test/site/content/posts/source-block-with-line-numbers.md index 8e661ef..64989f4 100644 --- a/test/site/content/posts/source-block-with-line-numbers.md +++ b/test/site/content/posts/source-block-with-line-numbers.md @@ -1,6 +1,6 @@ +++ title = "Source blocks with line number annotation" -tags = ["src-block"] +tags = ["src-block", "highlight", "shortcode"] draft = false +++