Methods
(static) alignTags() → {string}
- Source:
- Since:
- 0.3.0
Return a copy of the input HTML string formatted by inserting return chars between tags.
Example
> input = '<main><div class="item"><div class="labels"><span>foo</span></div> </div></main>'
> alignTags(input)
<main>
<div class="item">
<div class="labels">
<span>foo</span>
</div>
</div>
</main>
> input = '<main><div class="item"><div class="labels"><span>[Object object]</span></div> </div></main>'
> alignTags(input)
<main>
<div class="item">
<div class="labels">
<span>
[Object object]
</span>
</div>
</div>
</main>
Parameters:
Type | Description |
---|---|
string | HTML string |
Returns:
- formatted HTML string
- Type
- string