Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Releases: mubaraqwahab/prettier-plugin-twig-enhancements

v1.0.1

03 Nov 12:59
Compare
Choose a tag to compare

No newlines between opening and closing tags of empty HTML elements.

Example input:

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"></div>

Output in v1.0.0:

<div
  class="modal fade"
  id="exampleModal"
  tabindex="-1"
  role="dialog"
  aria-labelledby="exampleModalLabel"
  aria-hidden="true"
>

</div>

Output now:

<div
  class="modal fade"
  id="exampleModal"
  tabindex="-1"
  role="dialog"
  aria-labelledby="exampleModalLabel"
  aria-hidden="true"
></div>

v1.0.0

26 Oct 21:38
Compare
Choose a tag to compare

Remove support for frontmatter

Reasons:

  • Previous end-of-frontmatter formatting wasn't correct
  • The Twig plugin is itself not very compatible with Nunjucks syntax, thus it renders the frontmatter enhancement useless for me.

Initial release

25 Oct 17:39
Compare
Choose a tag to compare
  • Initial release
  • Add support for YAML frontmatter.
  • Always keep an HTML block element on a single line if it fits.
  • Break long HTML element opening tags so that every attribute is on its own line and the closing > of the opening tag is also on its own line (like Prettier does).
  • Print empty {% block %} statements on a single line.