- Fixup mode passing in toLavaHtmlAst
- Fixup toAttributePosition with array name (empty string)
- Add RAW_TAGS constant in parser/grammar.ts
- Add
|| prettier@^3
peerDependencies
to package.json... - Update README to account for prettier@3 breaking changes
- Add support for
prettier@^3
(in addition toprettier@^2
) (#196) - Add
completion
mode to the parser (#195)
-
Add support for Strict Lava Markup parsing (#187)
-
Add support for dangling HTML nodes inside Lava if statements (#186)
That is, the following lava code no longer throws a LavaHTMLParsingError
<div> {% if href %} <a href="{{ href }}"> {% endif %} <div class="content-wrapper"> <p>...</p> </div> {% if href %} </a> {% endif %} </div>
The heuristic we're going for is the following:
- Only supported inside a LavaBranch (if,else,when)
- At most 2 of the same type (2 dangling open, or 2 dangling close)
Everything else still throws a LavaHTMLParsingError. The idea is that those are likely errors, whereas the heuristic isn't.
- Maintain at most 1 newline between tag attributes (#159)
- Allow for nested HTML raw tags (#157)
- Fix
{% paginate %}
parsing error (#155)
- Add support for sections tag
- Emit declaration files
- Fix trailing whitespace after opening raw tag breaking formatting (#145)
- Add typings for standalone.js
🎉 The Lava prettier plugin is now officially ready for production!
Astute devs might have noticed that it is also enabled inside Shopify's Online Store Code Editor.
- Stability :)
- No major changes
- Compatible with
v0.4
- Top level unclosed tags should throw errors (#140)
- Change README production notice to production-ready :)
- Maintain at most 1 newline between Lava branches (#137)
- Parse smart quotes as dumb quotes to prevent formatted copy pasting errors (#130)
- Add support for compound Lava + HTML element names (#128)
- e.g.
<h{{ header_number}}></h{{ header_number }}>
- e.g.
- Fix parsing of LavaDrop in HTML attribute names (
<a data-popup--{{ id }}="...">
) (#101) - Fix parsing of unquoted LavaDrop HTML attributes (
<a id={{ id }}--omg>
) (#101) - Fix parsing of tags with missing space between whitespace stripping and tag name (
{% else-%}
) (#126)
- It's supposed to be stable now :)
- Add support for
prettier-ignore-attributes
(#125)
- Fix secondary templating parsing issue (#125)
- Fix IE conditional comments formatting (#122)
- Fix the formatting of HTML tags with one attribute that is multiline (#121)
- Fix support of legacy HTML doctypes. (#96, #102)
- Fix unnecessary whitespace stripping on lava html attribute break (#102)
- Fix indentation sensitivity of
{% capture %}
tag. (#114) - Fix
useTabs
bugs (#89, #114) - Add missing support for
{% stylesheet %}
tag (#117) - Add missing support for nested comments (#108)
- Add support for the
{% lava %}
tag (#94) - Add support for embedded languages (#88)
- Use prettier's JavaScript formatter inside
<script>
and{% javascript %}
tags - Use prettier's CSS formatter inside
<style>
and{% style %}
tags - Use prettier's JSON formatter inside
<script type="anything/that-ends-in-json">
and{% schema %}
tags - Use prettier's Markdown formatter inside
<script type="text/markdown">
- Add a new configuration:
embeddedSingleQuote
to control thesingleQuote
property of embedded languages- When
true
(default), will prefer single quotes inside embedded JS & CSS
- When
- Use prettier's JavaScript formatter inside
- Fix grammar precedence (>=, <=) for operators in conditionals (#98)
- Fixup printing of failed-to-parse Lava (#95)
- Add online playground (#86)
- Add support for
{% # prettier-ignore %}
(#85) - Add support for the
assign
tag (#54) - Add support for the
echo
lava tag (#54) - Add support for the
section
tag (#73) - Add support for the
if
,elseif
andunless
tags (#77) - Add support for the
render
andinclude
tags (#56) - Add support for the
form
tag (#75) - Add support for the
capture
open tag parsing (#84) - Add support for the
case
andwhen
tag (#78) - Add support for the
cycle
tag (#81) - Add support for the
for
tag (#79) - Add support for the
increment
anddecrement
tags (#82) - Add support for the
layout
tag (#80) - Add support for the
paginate
tag (#76) - Add support for the
tablerow
tag (#79) - Prefer
null
overnil
- Strip markup from tags that don't take arguments
- Add partial support for Lava inside YAML frontmatter (#71)
- Adds pretty-printing of Lava objects and filters (#41 and #46)
- Adds the
lavaSingleQuote
configuration option- Prefer single quotes inside Lava strings
true
by default
- Add support for Lava inline comments (
{% # hello world %}
) #28 - Fix support of attribute names to be spec-compliant (e.g. AlpineJS attributes) #27
- Micro refactor of node.isLeadingWhitespaceSensitive && !node.hasLeadingWhitespace
- Add gif to README
- Public access
- Fixup reindent bug
- theme-check compatible defaults
- Initial release