From cc192426c7515df95126238ef417f8dcf2547d41 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Tue, 6 Mar 2018 14:30:44 -0500 Subject: [PATCH] Revert "Add blank line before the closing div tags; HTML5 validity" This reverts commit 654dba0838e4d4bc68a0447eee07fa0f2c256ba1. That commit wasn't the cleanest way to make the HTML valid. Actually the HTML will never be valid because of the div hack.. I guess we just live with it till Hugo/Blackfriday adds support for wrapping Markdown elements in div tags. --- ox-blackfriday.el | 2 +- test/site/content-org/all-posts.org | 14 ++++++------ .../posts/alert-short-code-lookalike.md | 2 -- ...-shortcodes-special-blocks-no-arguments.md | 1 - test/site/content/posts/special-blocks.md | 22 ++++++++----------- test/site/themes/bare_min | 2 +- 6 files changed, 18 insertions(+), 25 deletions(-) diff --git a/ox-blackfriday.el b/ox-blackfriday.el index c411872..58f7a1c 100644 --- a/ox-blackfriday.el +++ b/ox-blackfriday.el @@ -692,7 +692,7 @@ This function is adapted from `org-html-special-block'." (format "<%s%s>\n<%s>\n\n%s\n" ;See footnote 1 block-type attr-str block-type block-type contents block-type)) (t - (format "\n
\n\n%s\n\n" ;See footnote 1 + (format "\n
\n\n%s\n" ;See footnote 1 attr-str contents)))))) ;;;; Src Block diff --git a/test/site/content-org/all-posts.org b/test/site/content-org/all-posts.org index e9170f0..3046b13 100644 --- a/test/site/content-org/all-posts.org +++ b/test/site/content-org/all-posts.org @@ -3216,11 +3216,11 @@ Line 5 has this > charcter in-between and is retained. :END: ** HTML5 Element Blocks *** Block without NAME, class or id -#+begin_main -This is in the /main/ [[https://www.w3schools.com/html/html5_semantic_elements.asp][HTML5 semantic element]]. -#+end_main +#+begin_article +This is /an article/. +#+end_article *** Block with NAME -#+name: Aside-A +#+name: Aside A #+begin_aside /Some/ *text* --- 1 @@ -3229,12 +3229,12 @@ This is in the /main/ [[https://www.w3schools.com/html/html5_semantic_elements.a #+end_aside *** Block with class and id #+attr_html: :class my-section :id section-a -#+begin_footer +#+begin_section /Some/ *text* --- 2 | g | h | i | | j | k | l | -#+end_footer +#+end_section *** An inline HTML5 element Unmarked. #+begin_mark @@ -3247,7 +3247,7 @@ Unmarked again. This is /some text/ wrapped in a =div= block with class =something=. #+end_something *** DIV with NAME -#+name: Foo-A +#+name: Foo A #+begin_foo /Some/ *text* --- 3 diff --git a/test/site/content/posts/alert-short-code-lookalike.md b/test/site/content/posts/alert-short-code-lookalike.md index 95f1d17..f446d9d 100644 --- a/test/site/content/posts/alert-short-code-lookalike.md +++ b/test/site/content/posts/alert-short-code-lookalike.md @@ -144,7 +144,6 @@ div.alert-warning p:nth-child(2):before { Here's a tip or note. This can be multi-paragraph too. -
@@ -153,7 +152,6 @@ This can be multi-paragraph too. Here's a warning! This can be multi-paragraph too. -
diff --git a/test/site/content/posts/paired-shortcodes-special-blocks-no-arguments.md b/test/site/content/posts/paired-shortcodes-special-blocks-no-arguments.md index b724fa4..7ab6d1d 100644 --- a/test/site/content/posts/paired-shortcodes-special-blocks-no-arguments.md +++ b/test/site/content/posts/paired-shortcodes-special-blocks-no-arguments.md @@ -48,7 +48,6 @@ This will export as: Content **with** Markdown _emphasis_ characters is rendered fine in the default Special Blocks. - This will export as [Special Blocks](/posts/special-blocks) --- either wrapped with `
` diff --git a/test/site/content/posts/special-blocks.md b/test/site/content/posts/special-blocks.md index a7a0b17..5e6b32d 100644 --- a/test/site/content/posts/special-blocks.md +++ b/test/site/content/posts/special-blocks.md @@ -9,17 +9,16 @@ draft = false ### Block without NAME, class or id {#block-without-name-class-or-id} -
-
- -This is in the _main_ [HTML5 semantic element](https://www.w3schools.com/html/html5_semantic_elements.asp). +
+
-
+This is _an article_. + ### Block with NAME {#block-with-name} -
### DIV with NAME {#div-with-name} -
+
_Some_ **text** --- 3 @@ -75,7 +73,6 @@ _Some_ **text** --- 3 | m | n | o | |---|---|---| | p | q | r | -
@@ -89,5 +86,4 @@ _Some_ **text** --- 4 | s | t | u | |---|---|---| | v | w | x | -
diff --git a/test/site/themes/bare_min b/test/site/themes/bare_min index 39c66c5..90cff0b 160000 --- a/test/site/themes/bare_min +++ b/test/site/themes/bare_min @@ -1 +1 @@ -Subproject commit 39c66c511435a45cfcb947eab8ccaf494460fcc4 +Subproject commit 90cff0b29a97623efa77e6916b16a165e7f34366