html-agility-pack
html-agility-pack copied to clipboard
Format and indent HTML
There could be a feature to format and indent code.
var html = @"<!DOCTYPE html><html><body><h1>
This is <b>bold</b> heading</h1><p>This is <u>underlined</u> paragraph</p>
<h2>This is <i>italic</i> heading</h2></body></html>";
var htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(html);
To get this ugly HTML code beautifully outputted to:
<!DOCTYPE html>
<html>
<body>
<h1>This is <b>bold</b> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
<h2>This is <i>italic</i> heading</h2>
</body>
</html>
Thank you for this suggestion,
At this moment, we have no plan to implement something like this but this is indeed a good idea.
Best Regards,
Jon
Sponsorship Help us improve this library
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function