-
Notifications
You must be signed in to change notification settings - Fork 435
Description
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
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.