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
Copy file name to clipboardExpand all lines: docs/cli.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,16 @@ Use `--fragment` to parse the input as an HTML fragment (instead of a full docum
42
42
echo'<li>Hi</li>'| justhtml - --fragment
43
43
```
44
44
45
+
## Strict Mode
46
+
47
+
Use `--strict` to fail immediately and print an error to `stderr` if the input HTML contains parsing errors or is otherwise malformed according to the WHATWG specification.
48
+
49
+
```bash
50
+
echo'</b>'| justhtml - --strict --fragment
51
+
# Exits with code 2 and prints:
52
+
# StrictModeError: Element 'b' has no matching start tag
0 commit comments