diff --git a/README.md b/README.md index f65b2ba..ab32032 100644 --- a/README.md +++ b/README.md @@ -216,19 +216,41 @@ blablabla # Displayed below of the image. ### Wrapper -A simple, but useful, shortcode to wrap content in a div with a class. +A simple, but useful, shortcode to wrap content in a div with a class. The content will be run through "markdownify". ``` -{{% wrapper class-name-you-want %}} +{{< wrapper class-name-you-want markdown >}} The **content** that should be wrapped. -{{% /wrapper %}} + +Some more content. +{{< /wrapper >}} ``` This will produce: ```
-The content that should be wrapped. +

The content that should be wrapped.

+ +

Some more content.

+
+``` + +If the content should be left untouched add "nomarkdown" after the class name. + +``` +{{< wrapper class-name-you-want nomarkdown >}} +The **content** that should be wrapped. + +Some more content. +{{< /wrapper >}} +``` + +This will produce: + +``` +
+The **content** that should be wrapped. Some more content.
``` diff --git a/layouts/shortcodes/wrapper.html b/layouts/shortcodes/wrapper.html index 2828268..371f73c 100644 --- a/layouts/shortcodes/wrapper.html +++ b/layouts/shortcodes/wrapper.html @@ -1 +1 @@ -
{{ .Inner }}
+
{{ if eq (.Get 1) "nomarkdown" }}{{ .Inner }}{{ else }}{{ .Inner | markdownify }}{{ end }}