You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somehow htmlq turns the element, or tag names into lowercase:
Expected
$ echo -e '<Need>\n <PreserveCase>True</PreserveCase>\n</Need>'| htmlq Need
<Need><PreserveCase>True</PreserveCase></Need>
Actual
$ echo -e '<Need>\n <PreserveCase>True</PreserveCase>\n</Need>'| htmlq Need
<need><preservecase>True</preservecase></need>
Here the tag <Need> becomes <need> and <PreserveCase> becomes <preservecase>, which is not what expected.
Possible to preserve the exact case in the tag names? Even behind an option?
Thanks!
The text was updated successfully, but these errors were encountered:
Meanwhile I've moved on with yq, which can preserve case properly
Except yq, which assumes the input is standard XML rather than HTML, doesn't properly retain the order of text inside each tag (and it doesn't necessarily output valid html):
htmlq -p a <<<'<a>Order <b>should</b> be <em>preserved</em></a>'
produces
<a>Order <b>should</b> be <em>preserved</em></a>
but
yq -px -ox '.a'<<<'<a>Order <b>should</b> be <em>preserved</em></a>'
Somehow htmlq turns the element, or tag names into lowercase:
Expected
Actual
Here the tag
<Need>
becomes<need>
and<PreserveCase>
becomes<preservecase>
, which is not what expected.Possible to preserve the exact case in the tag names? Even behind an option?
Thanks!
The text was updated successfully, but these errors were encountered: