emmetio / html-transform Goto Github PK
View Code? Open in Web Editor NEWPrepares given Emmet abbreviation for HTML output
License: MIT License
Prepares given Emmet abbreviation for HTML output
License: MIT License
When using bem,
.parent>.-child.anotherclass
should expand to
<div class="parent">
<div class="parent__child anotherclass"></div>
</div>
instead expands to
<div class="parent">
<div class="anotherclass__child anotherclass"></div>
</div>
.parent>._child.anotherclass
should expand to
<div class="parent">
<div class="parent parent_child anotherclass"></div>
</div>
instead expands to
<div class="parent">
<div class="anotherclass anotherclass_child"></div>
</div>
As per microsoft/vscode#55366, abbreviations when using the haml syntax should use {} for attributes, but this module uses () instead.
According to https://github.com/emmetio/html-transform/blob/v0.3.10/test/numbering.js#L13-L15, the $
in abbreviations without explicit repeaters are not expected to be replaced with numbers.
But in https://docs.emmet.io/, it does get replaced with 1. For example: p{$}
expands to <p>1</p>
cc @sergeche
.ct-target>(.-wrapper-img>.-img+.-title)
expand to
<div class="ct-target">
<div class="ct-target__wrapper">
<div class="ct-target__img"></div>
<div class="ct-target__title"></div>
</div>
</div>
wrapper-img element converted into wrapper, word img
dissapered.
Descending order in numbering as described in https://docs.emmet.io/abbreviations/syntax/#changing-numbering-base-and-direction is not supported
From @ramya-rao-a on November 28, 2017 4:8
Add the below unit test in https://github.com/emmetio/expand-abbreviation/blob/master/test/html.js and observe that it fails
assert.equal(expand('ul>.item$*', {syntax: 'html', text: ['one.txt', 'two.txt']}), '<ul>\n\t<li class="item1">one.txt</li>\n\t<li class="item2">two.txt</li>\n</ul>');
Actual output:
<ul>
<li class="item1" href="http://one.txt">one.txt</li>
<li class="item2" href="http://two.txt">two.txt</li>
</ul>
instead of the expected output
<ul>
<li class="item1">one.txt</li>
<li class="item2">two.txt</li>
</ul>
cc @sergeche
Copied from original issue: emmetio/expand-abbreviation#15
When using bem, div.b_m_o
should expand to <div class="b b_m_o"></div>
, instead it get expands to <div class="b b_m_o"></div>
cc @sergeche
Not working cases like this
Value | Result | Expect |
---|---|---|
.block>.-element-name | <div class="block"><div class="block__element"></div></div> |
<div class="block"><div class="block__element-name"></div></div> |
.block>.-element_mod-val | <div class="block"><div class="block__element block__element--mod"></div></div> |
<div class="block"><div class="block__element block__element--mod_val"></div></div> |
Return please bem.shortElementPrefix
options. I want DISABLE THIS!!!
In old version emmet in vs code emmet bem was good tool, now this tool for tortule.
.hello_mod1._mod2
and .hello._mod1._mod2
both expand to <div class="hello hello_mod1 hello_mod2"></div>
as expected
Now update the options so that the modifier
is __
Now .hello_mod1._mod2
incorrectly expands to <div class="hello_mod1 hello_mod1__mod2"></div>
.hello._mod1._mod2
correctly expands to <div class="hello hello__mod1 hello__mod2"></div>
cc @sergeche
.block>.-my-element
gets expanded to
<div class="block">
<div class="block__my"></div>
</div>
instead of
<div class="block">
<div class="block__my-element"></div>
</div>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.