From 08519158f49bb97c6f758cf8886e25b7f9aec433 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 25 Feb 2020 21:16:49 +0100 Subject: #153, Remove extra spaces in generated tabs html --- exampleSite/content/docs/example/tabs.md | 28 ++++++++++++++++++++++++++++ layouts/shortcodes/tabs.html | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 exampleSite/content/docs/example/tabs.md diff --git a/exampleSite/content/docs/example/tabs.md b/exampleSite/content/docs/example/tabs.md new file mode 100644 index 0000000..dca1961 --- /dev/null +++ b/exampleSite/content/docs/example/tabs.md @@ -0,0 +1,28 @@ +--- +weight: 99 +title: This is a layout test doc +--- + +# Doc Title + +{{< columns >}} +This is content for col 1 +<---> + +This is content for col 2 - tabs inside a column: +{{< tabs "noneworkingtabs" >}} +{{< tab "Thing1" >}}This information on Thing1 does not appear.{{< /tab >}} +{{< tab "Thing2" >}}This information on Thing2 does not appear.{{< /tab >}} +{{< /tabs >}} + +More content for col 2 +{{< /columns >}} + +Back to one wide col. Here are some tabs outside columns which work fine: + +{{< tabs "workingtabs" >}} +{{< tab "Thing3" >}}This information on Thing3 is fine.{{< /tab >}} +{{< tab "Thing4" >}}This information on Thing4 is fine.{{< /tab >}} +{{< /tabs >}} + +end of doc diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 9431af5..7aace73 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -3,7 +3,7 @@ {{ $group := printf "tabs-%s" $id }}
-{{ range $index, $tab := .Scratch.Get $group }} +{{- range $index, $tab := .Scratch.Get $group -}}
-- cgit v1.2.3