File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 66
77- Expand unit tests to explicitly test the above two scenarios
88
9+ - Fixed IndexedAdvancedHTMLParser not working in some conditions due to a typo in a previous change
10+
11+ - Added a new formatter to AdvancedHTMLParser.Formatter - AdvancedHTMLMiniFormatter which will output mini html.
12+
13+ This will have all non-functional whitespace removed (keeping single-spaces which take up 1 character width), and provide no indentation.
14+
15+ For example, the following:
16+
17+ '''<html><head><title>Hello World</title></head>
18+ <body>
19+ <div>Hello world <span>And welcome to the show.</span>
20+ </div>
21+ </body></html>'''
22+
23+ If parsed and run through AdvancedHTMLMiniFormatter would come out as:
24+
25+ '<html ><head ><title >Hello World</title></head> <body > <div >Hello world <span >And welcome to the show.</span> </div> </body></html>'
26+
27+ retaining a space where one would not be ignored before, but removing all non-disregarded whitespace.
28+
29+ This feature is available on an AdvancedHTMLParser.AdvancedHTMLParser object via the new method "getMiniHTML"
30+
31+ As a reminder, "getHTML()" on a parser will retain all original whitespace,
32+
33+ "getFormattedHTML()" with an optional "indent" parameter (default 4 spaces per line) will pretty-print your HTML
34+
35+ and now "getMiniHTML()" will minify it.
36+
37+
938
1039* 8.0.1 - Nov 30 2017
1140
You can’t perform that action at this time.
0 commit comments