You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the config options looking for a way to disable entirely the adding of boilerplate code (doctype, head, title, meta, body, and their closing tags)
Use case 1:
I have several snippets of markup from different sources, which I want tidied so that the syntax is consistent. This code will be concatenated at a later time into a larger piece of markup, with its own doctype, head and body, so I don't want doctype, head, body etc. around my snippets, I just want them to be tidied.
Use case 2:
I have a snippet of markup which derives from a call from outerHTML. It's been minified, and I want to pretty print it so that it may be inspected more easily by a human. I want the snippet to contain the exact same markup, only prettier. When tidy inserts additional boilerplate code, it creates more work for me, because I then have to delete those in order to achieve the actual goal of focusing-in.
AFAICT there is no such feature as omit-boilerplate (or equivalent - correct me if I am wrong). So this is a formal request for a config option which allows this.
The closest appears to be
doctype:omit
tidy-mark:no
omit-optional-tags:yes
but that will also remove optional tags from the input markup, which is not what I am looking for. There's no setting which will omit the title!
I just want tidy/pretty markup without any additional boilerplate. I hope this is possible.
The text was updated successfully, but these errors were encountered:
@geoffmcl Thank you! That's exactly the behavior I wanted.
OK, then I will dial down my feature request to request that show-body-only is easier to find in the docs :D
Very nice plugin.
I have searched the config options looking for a way to disable entirely the adding of boilerplate code (doctype, head, title, meta, body, and their closing tags)
Use case 1:
I have several snippets of markup from different sources, which I want tidied so that the syntax is consistent. This code will be concatenated at a later time into a larger piece of markup, with its own doctype, head and body, so I don't want doctype, head, body etc. around my snippets, I just want them to be tidied.
Use case 2:
I have a snippet of markup which derives from a call from outerHTML. It's been minified, and I want to pretty print it so that it may be inspected more easily by a human. I want the snippet to contain the exact same markup, only prettier. When tidy inserts additional boilerplate code, it creates more work for me, because I then have to delete those in order to achieve the actual goal of focusing-in.
AFAICT there is no such feature as omit-boilerplate (or equivalent - correct me if I am wrong). So this is a formal request for a config option which allows this.
The closest appears to be
but that will also remove optional tags from the input markup, which is not what I am looking for. There's no setting which will omit the title!
I just want tidy/pretty markup without any additional boilerplate. I hope this is possible.
The text was updated successfully, but these errors were encountered: