surdu/selector-to-tag

When snippet ends with . results in empty class

dsandstrom opened this issue · 1 comments

I'm not sure if this is a bug, but it is something I wanted to bring to your attention. If the snippet ends with a dot, I get a empty class. However, if it ends in a hash, it doesn't add an empty id. I think either it should not expand (like if the snippets ends in a dash) or it should not add the class attribute.

Actual
div. -> <div class="">|</div>
div# -> <div>|</div>

Expected
div. -> <div>|</div>
or
div. -> div. |

surdu commented

I incline more to it not expanding. I'll look into it, thank you!