Closed anuragphadke closed 4 years ago
Hey thanks for your issue. Unfortunately there is no way of doing that right now. Generally this would not be a part of this library (with the exact case from renaming div
to span
).
As this change would break the semantics of HTML. And the goal of the library is not just renaming, but minifying and preserving the previous meanings of the code.
@JPeer264 : can u suggest alternatives? I can also push a PR out if you have thoughts on how we can modify the existing repo.
I don't think this would be a place for this library, as this is completely changing the HTML semantics. However, I think it would be an idea to rename custom HTML5 tags like <myowntag></myowntag>
and minify those to non-semantic HTML tags (also avoid having renamed tags like a
, b
, br
, ...).
With that you could implement a custom generator, where div
etc. gets passed as argument. Also all the logic lives in rcs-core
where rename-css-selectors
is just a Node wrapper to read/write files
Is there a way to rename HTML tags such as "div" to "span"? example below: before:
after: