Comments (3)
Update
Applying the logic for this beautification rule. The finalized schema and accepted options are as follows:
Options | Description |
---|---|
preserve |
All tag attribute keys/values are preserved (default) |
lowercase |
All tag attribute keys/values are converted to lowercase |
lowercase-name |
Only attribute names are converted to lowercase |
lowercase-value |
Only attribute values are converted to lowercase |
Finalised Changes
The lowercase-name
will be used instead of lowercase-keys
and lowercase-value
opposed to lowercase-values
. There should be a clear separation of naming conventions here. When describing a HTML attribute, it is more common to refer to data-attr
as a name instead of key. Relating to the removal of pluralised values this is merely a matter of preference.
from esthetic.
Finalised Shipment
This will conclude the new ruleset of attributeCasing
. The formatting option supports Liquid contained html attributes and HTML attributes. Below is the finalised examples:
Input
<div {% if %}DATA-{{ x }}-FOO{% else %}ID="BAR"{% endif %}></div>
Output - preserve
<div CLASS="XX" {% if %}DATA-{{ x }}-FOO{% else %}ID="BAR"{% endif %}></div>
Output - lowercase
<div class="xx" {% if %}data-{{ x }}-foo{% else %}id="bar"{% endif %}></div>
Output - lowercase-name
<div class="XX" {% if %}data-{{ x }}-foo{% else %}id="BAR"{% endif %}></div>
Output - lowercase-value
<div CLASS="xx" {% if %}DATA-{{ x }}-FOO{% else %}ID="bar"{% endif %}></div>
from esthetic.
Solved in 0.3.0.beta
from esthetic.
Related Issues (20)
- {% # @prettify-ignore %} adds a bracket or a new line at the end of file HOT 1
- Formatting of multiline liquid tags HOT 1
- Improve Text (content) handling HOT 1
- JSON formatting issue HOT 4
- Improve parse error information HOT 1
- New Markup Rule: valueForce HOT 1
- Support Bad Liquid HOT 1
- Support SVG Voids HOT 2
- Changing module name to Æsthetic
- Tree shaking HOT 2
- Comment defects and Improvement
- Empty Conditionals
- Better handling for Liquid Captures
- Support Liquid Line Comment Ignores HOT 1
- spam account HOT 3
- https://æsthetic.dev/ longer working HOT 1
- Improve PreserveText - v0.7.0 (beta 1)
- Implied End Tag Handling - v0.7.0 (beta 1)
- Word Wrap overhaul - v0.7.0 (beta 1)
- New Markup Rule: stripTextWrapLines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esthetic.