-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: basic schema support for HTML custom elements
- add an `isCustomElement` method in `HTMLUtils`. - pre-process custom elements in `XMLParser` to put them in the proprietary namespace used by the Nu Html Checker schemas to treat them distinctively. - add a simple test case. Fix #932
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/test/resources/30/single/xhtml/valid/custom-elements.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
<head> | ||
<title>Test</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
<body> | ||
<h1>Test</h1> | ||
<epub-switch> | ||
<epub-case required-namespace="https://example.org"> oh my! </epub-case> | ||
<epub-default> | ||
<p>is this real?</p> | ||
</epub-default> | ||
</epub-switch> | ||
</body> | ||
</html> |