Giter VIP home page Giter VIP logo

html-transform's People

Contributors

ramya-rao-a avatar sergeche avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

html-transform's Issues

bem: parent class not appended when child has multiple classes

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>

Wrong convert bem

.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.

When text passed in options has a period, href gets added to the expanded abbreviation

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

Wrong bem transform.

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.

Customizing bem modifier doesnt work as expected

.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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.