File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Aztec/Classes/Libxml2/Converters/In Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,16 @@ open class HTMLParser {
4545 //
4646 htmlHandleOmittedElem ( 0 )
4747
48+ var parserOptions = HTML_PARSE_RECOVER . rawValue | HTML_PARSE_NODEFDTD . rawValue | HTML_PARSE_NOERROR . rawValue | HTML_PARSE_NOWARNING . rawValue | HTML_PARSE_NOIMPLIED . rawValue
49+ if shouldCollapseSpaces {
50+ parserOptions = parserOptions | HTML_PARSE_NOBLANKS . rawValue
51+ }
4852 let document = htmlCtxtReadMemory ( parserContext,
4953 htmlPtr,
5054 Int32 ( wrappedHTML. lengthOfBytes ( using: String . Encoding. utf8) ) ,
5155 " " ,
5256 " UTF-8 " ,
53- Int32 ( HTML_PARSE_RECOVER . rawValue | HTML_PARSE_NODEFDTD . rawValue | HTML_PARSE_NOERROR . rawValue | HTML_PARSE_NOWARNING . rawValue | HTML_PARSE_NOIMPLIED . rawValue | HTML_PARSE_NOBLANKS . rawValue ) )
57+ Int32 ( parserOptions ) )
5458
5559 defer {
5660 xmlFreeDoc ( document)
You can’t perform that action at this time.
0 commit comments