From a6f09c0a317edeff3f1f489480ccb4a6edaf6f46 Mon Sep 17 00:00:00 2001 From: Ze Yu Date: Fri, 31 Jan 2020 16:56:55 +0800 Subject: [PATCH] Remove extra blank lines from page.njk output --- src/page.njk | 33 +++++++------------ .../test_site/expected/bugs/index.html | 3 -- test/functional/test_site/expected/index.html | 1 - .../test_site/expected/sub_site/index.html | 4 --- .../test_site/expected/testAfterSetup.html | 4 --- .../expected/testAnchorGeneration.html | 4 --- .../expected/testAntiFOUCStyles.html | 4 --- .../expected/testEmptyFrontmatter.html | 4 --- .../expected/testExternalScripts.html | 4 --- .../expected/testImportVariables.html | 4 --- .../test_site/expected/testLayouts.html | 3 -- .../expected/testLayoutsOverride.html | 3 -- .../testPanelsWithImportedVariables.html | 4 --- .../test_site/expected/testPlantUML.html | 4 --- .../test_site/expected/testThumbnails.html | 4 --- .../expected/testTooltipSpacing.html | 4 --- .../test_site/expected/test_md_fragment.html | 4 --- .../expected/index.html | 4 --- .../test_site_convert/expected/Home.html | 3 -- .../test_site_convert/expected/Page-1.html | 3 -- .../test_site_convert/expected/_Footer.html | 3 -- .../test_site_convert/expected/_Sidebar.html | 3 -- .../test_site_convert/expected/about.html | 3 -- .../expected/contents/topic1.html | 3 -- .../expected/contents/topic2.html | 3 -- .../expected/contents/topic3a.html | 3 -- .../expected/contents/topic3b.html | 3 -- .../test_site_convert/expected/index.html | 3 -- .../expected/index.html | 5 --- .../expected/contents/topic1.html | 4 --- .../expected/contents/topic2.html | 4 --- .../expected/contents/topic3a.html | 4 --- .../expected/contents/topic3b.html | 4 --- .../test_default/expected/index.html | 3 -- .../test_minimal/expected/index.html | 5 --- 35 files changed, 12 insertions(+), 142 deletions(-) diff --git a/src/page.njk b/src/page.njk index c0a8860e6e..cc3bc433f4 100644 --- a/src/page.njk +++ b/src/page.njk @@ -13,32 +13,26 @@ - {%- if asset.pluginLinks %} - {%- for link in asset.pluginLinks %} + {%- if asset.pluginLinks -%} + {%- for link in asset.pluginLinks -%} {{ link }} - {%- endfor %} - {%- endif %} + {%- endfor -%} + {%- endif -%} - {%- if siteNav %} - - {%- endif %} - {%- if pageNav %} - - {%- endif %} - {{ headFileBottomContent }} - {%- if faviconUrl %} - - {%- endif %} + {%- if siteNav -%} {%- endif -%} + {%- if pageNav -%} {%- endif -%} + {{- headFileBottomContent -}} + {%- if faviconUrl -%} {%- endif -%}
- {{ headerHtml }} + {{ headerHtml -}}
- {{ siteNavHtml }} + {{ siteNavHtml -}} {{ content }} - {{ pageNavHtml }} + {{ pageNavHtml -}}
- {{ footerHtml }} + {{ footerHtml -}}
@@ -51,18 +45,15 @@ const enableSearch = {{ enableSearch }} - {%- if asset.externalScripts %} {%- for script in asset.externalScripts %} {%- endfor %} {%- endif %} - {%- if asset.pluginScripts %} {%- for script in asset.pluginScripts %} {{ script }} {%- endfor %} {%- endif %} - diff --git a/test/functional/test_site/expected/bugs/index.html b/test/functional/test_site/expected/bugs/index.html index 774d5a13a4..c0da8dc821 100644 --- a/test/functional/test_site/expected/bugs/index.html +++ b/test/functional/test_site/expected/bugs/index.html @@ -32,7 +32,6 @@
-

popover initiated by trigger: honor trigger attribute

@@ -84,7 +83,6 @@ link text]

-