From d916df03e581919f9a2ad7eb47cb4789a8137059 Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Thu, 6 Jul 2023 23:52:22 +0200 Subject: [PATCH] fix: allow flow content for `ins` and `del` XHTML 1.1 elements (EPUB 2.0.1) See https://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_editmodule Fix #1522 --- .../adobe/epubcheck/schema/20/rng/xhtml/edit.rng | 4 ++-- .../edit-block-content-valid.xhtml | 16 ++++++++++++++++ .../epub2/ops-content-document-xhtml.feature | 5 +++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/test/resources/epub2/files/ops-document-xhtml/edit-block-content-valid.xhtml diff --git a/src/main/resources/com/adobe/epubcheck/schema/20/rng/xhtml/edit.rng b/src/main/resources/com/adobe/epubcheck/schema/20/rng/xhtml/edit.rng index b10b2afaa..8e48df83e 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/20/rng/xhtml/edit.rng +++ b/src/main/resources/com/adobe/epubcheck/schema/20/rng/xhtml/edit.rng @@ -5,7 +5,7 @@ - + @@ -18,7 +18,7 @@ - + diff --git a/src/test/resources/epub2/files/ops-document-xhtml/edit-block-content-valid.xhtml b/src/test/resources/epub2/files/ops-document-xhtml/edit-block-content-valid.xhtml new file mode 100644 index 000000000..37b5e1f3c --- /dev/null +++ b/src/test/resources/epub2/files/ops-document-xhtml/edit-block-content-valid.xhtml @@ -0,0 +1,16 @@ + + + + + Minimal EPUB + + + +

Title Old

+
+ +

Title New

+
+

Call me Ishmael.

+ + diff --git a/src/test/resources/epub2/ops-content-document-xhtml.feature b/src/test/resources/epub2/ops-content-document-xhtml.feature index cfe2c7a31..e8c7501c0 100644 --- a/src/test/resources/epub2/ops-content-document-xhtml.feature +++ b/src/test/resources/epub2/ops-content-document-xhtml.feature @@ -76,6 +76,11 @@ Feature: EPUB 2 ▸ Open Publication Structure ▸ XHTML Document Checks Scenario: Verify attributes allowed on `ins` and `del` are not restricted (issue 293) When checking document 'edit-attributes-valid.xhtml' Then no errors or warnings are reported + + Scenario: Verify `ins` and `del` elements can contain block content + See https://github.com/w3c/epubcheck/issues/1522 + When checking document 'edit-block-content-valid.xhtml' + Then no errors or warnings are reported ### Identifiers