Cocoanetics / DTCoreText

Methods to allow using HTML code with CoreText
BSD 2-Clause "Simplified" License
6.35k stars 1.18k forks source link

Nested list render issue #1254

Open yanweida99 opened 2 years ago

yanweida99 commented 2 years ago

Regardless of ordered list/unordered list, when the text is too long, the first line will always be wrapped

Sample Html: <html><body style=\"line-height: 19.0px\"><ul style=\"list-style-type:\'disc\'\"><li>abcdefghijkl<ul style=\"list-style-type:\'disc\'\"><li>abcdefghijkl21321321321362152632165sdadsadsad<ul style=\"list-style-type:\'disc\'\"><li>sadasd<ul style=\"list-style-type:\'disc\'\"><li>wqewqeasdasdasdasdasdasdasd</li></ul></li><li>sadasd</li><li>sadsadasdasdasdfasfdasfdsadasdasd</li></ul></li><li>abcdefghijklsd</li><li>abcdefghijkls</li><li>abcdefghijkl</li><li>abcdefghijkl</li><li>abcdefghijkl</li></ul></li><li>abcdefghijkl</li><li>abcdefghijkl</li><li>abcdefghijkl</li><li>abcdefghijkldsfsdgfdgdgfdsgsdfgsdfgsfdgsdgsdgsdgdsgsd</li></ul></body></html>

Result: Simulator Screen Shot - iPhone SE (3rd generation) - 2022-05-23 at 09 33 25