From 71509bb63d0c30fc4b8600a9896c52d21030b4c5 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Mon, 26 Feb 2018 11:26:57 -0500 Subject: [PATCH] Add newline before the comment; HTML validity --- ox-hugo.el | 2 +- test/site/content/posts/link-to-headings-by-name.md | 1 + test/site/content/posts/no-toc-in-summary.md | 1 + .../content/posts/post-with-export-options-toc-1-num-onlytoc.md | 1 + .../content/posts/post-with-export-options-toc-2-num-nil.md | 1 + test/site/content/posts/post-with-export-options-toc-2-num-t.md | 1 + .../content/posts/post-with-export-options-toc-t-num-nil.md | 1 + .../content/posts/post-with-export-options-toc-t-num-onlytoc.md | 1 + test/site/content/posts/post-with-export-options-toc-t-num-t.md | 1 + test/site/content/posts/post-with-toc-keyword-2.md | 1 + test/site/content/posts/post-with-toc-keyword-6.md | 1 + 11 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ox-hugo.el b/ox-hugo.el index 6a61e07c..9e9ae9fd 100644 --- a/ox-hugo.el +++ b/ox-hugo.el @@ -1005,7 +1005,7 @@ contents according to the current headline." "
\n" ;till Hugo/Blackfriday support toc-headline ;wrapping Markdown in HTML div's. toc-items ;https://github.com/kaushalmodi/ox-hugo/issues/93 - "\n" + "\n\n" "\n" ;; Special comment that can be use to filter out the TOC ;; from .Summary in Hugo templates. diff --git a/test/site/content/posts/link-to-headings-by-name.md b/test/site/content/posts/link-to-headings-by-name.md index 5d79d02e..81e262a2 100644 --- a/test/site/content/posts/link-to-headings-by-name.md +++ b/test/site/content/posts/link-to-headings-by-name.md @@ -21,6 +21,7 @@ draft = false - 1.1.2 [Epsilon 102.1.2](#epsilon-102-dot-1-dot-2) - [Zeta 103](#zeta-103) - [Links (no descriptions) to headings with section numbers](#links--no-descriptions--to-headings-with-section-numbers) + diff --git a/test/site/content/posts/no-toc-in-summary.md b/test/site/content/posts/no-toc-in-summary.md index fd24c34c..11df8a28 100644 --- a/test/site/content/posts/no-toc-in-summary.md +++ b/test/site/content/posts/no-toc-in-summary.md @@ -12,6 +12,7 @@ draft = false - [`ox-hugo`'s Solution](#ox-hugo-s-solution) - [Snippet](#snippet) - [Example](#example) + diff --git a/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md b/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md index c38a031d..4c1db253 100644 --- a/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md +++ b/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md @@ -17,6 +17,7 @@ draft = false - 1 [Post sub-heading 1](#post-sub-heading-1) - 2 [Post sub-heading 2](#post-sub-heading-2) - 3 [Post sub-heading 3](#post-sub-heading-3) + diff --git a/test/site/content/posts/post-with-export-options-toc-2-num-nil.md b/test/site/content/posts/post-with-export-options-toc-2-num-nil.md index f19cd1f5..dfb2cb56 100644 --- a/test/site/content/posts/post-with-export-options-toc-2-num-nil.md +++ b/test/site/content/posts/post-with-export-options-toc-2-num-nil.md @@ -18,6 +18,7 @@ draft = false - [Post sub-heading 2.2](#post-sub-heading-2-dot-2) - [Post sub-heading 3](#post-sub-heading-3) - [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-export-options-toc-2-num-t.md b/test/site/content/posts/post-with-export-options-toc-2-num-t.md index 67295f8a..e426430e 100644 --- a/test/site/content/posts/post-with-export-options-toc-2-num-t.md +++ b/test/site/content/posts/post-with-export-options-toc-2-num-t.md @@ -23,6 +23,7 @@ draft = false - 2.2 [Post sub-heading 2.2](#post-sub-heading-2-dot-2) - 3 [Post sub-heading 3](#post-sub-heading-3) - 3.1 [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-nil.md b/test/site/content/posts/post-with-export-options-toc-t-num-nil.md index eb257470..72a4a1d4 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-nil.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-nil.md @@ -22,6 +22,7 @@ draft = false - [Post sub-heading 2.2.3](#post-sub-heading-2-dot-2-dot-3) - [Post sub-heading 3](#post-sub-heading-3) - [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md b/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md index 869312ad..19ce6bdc 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md @@ -27,6 +27,7 @@ draft = false - 2.2.2 [Post sub-heading 2.2.3](#post-sub-heading-2-dot-2-dot-3) - 3 [Post sub-heading 3](#post-sub-heading-3) - 3.1 [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-t.md b/test/site/content/posts/post-with-export-options-toc-t-num-t.md index 2942c360..f500a181 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-t.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-t.md @@ -27,6 +27,7 @@ draft = false - 2.2.2 [Post sub-heading 2.2.3](#post-sub-heading-2-dot-2-dot-3) - 3 [Post sub-heading 3](#post-sub-heading-3) - 3.1 [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-toc-keyword-2.md b/test/site/content/posts/post-with-toc-keyword-2.md index 69857663..2aad8a47 100644 --- a/test/site/content/posts/post-with-toc-keyword-2.md +++ b/test/site/content/posts/post-with-toc-keyword-2.md @@ -18,6 +18,7 @@ draft = false - [Post sub-heading 2.2](#post-sub-heading-2-dot-2) - [Post sub-heading 3](#post-sub-heading-3) - [Post sub-heading 3.1](#post-sub-heading-3-dot-1) + diff --git a/test/site/content/posts/post-with-toc-keyword-6.md b/test/site/content/posts/post-with-toc-keyword-6.md index b785c510..cb209283 100644 --- a/test/site/content/posts/post-with-toc-keyword-6.md +++ b/test/site/content/posts/post-with-toc-keyword-6.md @@ -22,6 +22,7 @@ draft = false - [Post sub-heading 2.2.3](#post-sub-heading-2-dot-2-dot-3) - [Post sub-heading 3](#post-sub-heading-3) - [Post sub-heading 3.1](#post-sub-heading-3-dot-1) +