bwplotka / mdox

Format your docs; autogenerate from flags or Go structs or even generate versioned website directly from markdown!
Apache License 2.0
67 stars 11 forks source link

Hugo shortcode identation #155

Open titpetric opened 6 months ago

titpetric commented 6 months ago

When using hugo shortcodes, a particular shortcode may be used as:

{{< warning success >}}
<some text here>
{{< /warning >}}

When using mdox fmt, the snippet above gets it's leading and trailing spacing stripped, making an unnecessary change to:

{{< warning success >}} <some text here> {{< /warning >}}.

Ideally the shortcodes would be treated in the same way as fenced code blocks, leaving the leading/exiting whitespace as is.

Hugo shortcodes: https://gohugo.io/content-management/shortcodes/

bwplotka commented 3 months ago

👍🏽 help wanted!