Closed trk closed 7 years ago
Hey @trk thanks so much for reporting this issue. I don't have time today, but I'll clean that up tomorrow.
Merry Christmas!
On my side i updated your function again there are many repeat for str_repeat() function.
Here is my solution : https://github.com/trk/AvbMarkupHtml/blob/master/MarkupHtml.php#L597
Created a $indenter variable with a if else check and replaced with str_repeat() function.
$indenter = ($indent >= $indentWith) ? str_repeat($indentWith, $indent) : "";
Error line is : https://github.com/mihaeu/html-formatter/blob/master/src/HtmlFormatter.php#L48
Passed html :
if i add if else check for error location, no more error
After my if else check and remove (html from $tagsWithoutIndentation) result is :
I am using your library functions for my module (HTML tag manager module) : https://github.com/trk/AvbMarkupHtml/blob/master/AvbMarkupHtml.module.php#L262