I want to refine an HTML code using sed, as an extra refinement procedure after refining it using HTML Tidy, as HTML Tidy doesn’t look flexible enough for some requirements.
I used this command to add some tabs and/or line breaks to some tags and remove them from others:
- The first command worked fine unless
lihas an attribute, so, how can I target an opening tag regardless of whether it has an attribute or not?
- The second command didn’t work at all. I want here to put the closing tag
</li>at the end of the previous line.