CASE: use indent formatting in markdown

Hi all :wave:

We added something very neat now to the markdown coding we use in our templates! :smirk:

We made indenting possible now without needing to use additional columns in table structures, and we can even use indenting without a table structure!

Here’s an example on how to use it without table structures:

{::indent level="10"}
This text is indented
{:/indent}

{::indent level="8"}
This text is indented
{:/indent}

{::indent level="6"}
This text is indented
{:/indent}

Resulting into:

The level here is limited to 10, but that should be plenty right :smiley:

In tables, we sometimes had this issue:

{% capture some_indent %}     {% endcapture %}

{% stripnewlines %}
|----25%----
|-----------+
{% newline %}
| **Some header we use without indent**
|  
{% newline %}
| {{ some_indent }} This is some nifty code we can use for long sentences like these, right? 
{% endstripnewlines %} 

presenting this:

However, we can tweak that code into this:

{% stripnewlines %}
|----25%----
|-----------+
{% newline %}
| **Some header we use without indent**
|  
{% newline %}
|-> This is some nifty code we can use for long sentences like these, right? 
{% endstripnewlines %}

creating a nice indenting into the first row:

Adding an extra dash into ---> can create even more indenting. So the -> is the trigger of creating indenting, near the pipe |.

Handy coding, right? :muscle:

4 Likes

Hi there

Might it be an idea to add indent+tab as short key to the liquid editor?

Thanks in advance!

Kind regards
Sam
Fintrax

Hi Sam,

We have forwarded your query to our core development team. We’ll let you know when this is available.

Best,
Borja

Hi Sam,

This has now been implemented.

Best,
Borja

1 Like

Thank you!