From 825f1750e4a0ae19b48713b61833154759ecc7a3 Mon Sep 17 00:00:00 2001 From: Matteo Trubini <7964032+matteotrubini@users.noreply.github.com> Date: Thu, 9 Dec 2021 10:21:44 +0100 Subject: [PATCH] add md_line + md_safe Twig filters --- markup-filter-md.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/markup-filter-md.md b/markup-filter-md.md index dda9c343..f6f51598 100644 --- a/markup-filter-md.md +++ b/markup-filter-md.md @@ -7,3 +7,27 @@ The `| md` filter converts the value from Markdown to HTML format. The above will output the following:
Text is bold.
+ +# | md_line + +The `| md_line` filter converts the value from Markdown to HTML format, as inline element. + + {{ '**Text** is bold.' | md_line }} + +The above will output the following: + + Text is bold. + +# | md_safe + +The `| md_safe` filter converts the value from Markdown to HTML format, preventing `` blocks caused by indentation.
+
+ {{ ' **Text** is bold.' | md_safe }}
+
+The above will output the following:
+
+ Text is bold.
+
+instead of
+
+ Text is bold.