@amermathsoc/texml-to-html 20.1.0 → 20.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/postProcessing.js +1 -1
- package/package.json +1 -1
- package/test/article.xml +1 -1
- package/test/postProcessing.js +3 -2
- package/test/snapshots/article.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [20.1.1](https://github.com/AmerMathSoc/texml-to-html/compare/v20.1.0...v20.1.1) (2026-01-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **postProcessing.js:** s tag is phrasing content ([f4b2561](https://github.com/AmerMathSoc/texml-to-html/commit/f4b2561f40ff309f8275a374e7fdd61b80f2f83e)), closes [#498](https://github.com/AmerMathSoc/texml-to-html/issues/498)
|
|
11
|
+
|
|
5
12
|
## [20.1.0](https://github.com/AmerMathSoc/texml-to-html/compare/v20.0.0...v20.1.0) (2026-01-13)
|
|
6
13
|
|
|
7
14
|
|
package/lib/postProcessing.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// From https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#phrasing_content
|
|
18
18
|
// Note: 'a', 'del', 'ins', 'link', 'map', 'meta' have additional constraints that we ignore since they shouldn't occur in our content
|
|
19
|
-
const phrasingContentTags = ['abbr', 'audio', 'b', 'bdo', 'br', 'button', 'canvas', 'cite', 'code', 'data', 'datalist', 'dfn', 'em', 'embed', 'i', 'iframe', 'img', 'input', 'kbd', 'label', 'mark', 'math', 'meter', 'noscript', 'object', 'output', 'picture', 'progress', 'q', 'ruby', 'samp', 'script', 'select', 'small', 'span', 'strong', 'sub', 'sup', 'svg', 'textarea', 'time', 'u', 'var', 'video', 'wbr', 'a', 'del', 'ins', 'link', 'map', 'meta']
|
|
19
|
+
const phrasingContentTags = ['abbr', 'audio', 'b', 'bdo', 'br', 'button', 'canvas', 'cite', 'code', 'data', 'datalist', 'dfn', 'em', 'embed', 'i', 'iframe', 'img', 'input', 'kbd', 'label', 'mark', 'math', 'meter', 'noscript', 'object', 'output', 'picture', 'progress', 'q', 'ruby', 'samp', 'script', 'select', 'small', 'span', 'strong', 'sub', 'sup', 'svg', 'textarea', 'time', 'u', 'var', 'video', 'wbr', 'a', 's', 'del', 'ins', 'link', 'map', 'meta']
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Checks if node is an element that is not phrasing content.
|
package/package.json
CHANGED
package/test/article.xml
CHANGED
package/test/postProcessing.js
CHANGED
|
@@ -19,7 +19,7 @@ import tape from 'tape';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
tape('postProcessing.js', async function (t) {
|
|
22
|
-
t.plan(
|
|
22
|
+
t.plan(5);
|
|
23
23
|
const document = article;
|
|
24
24
|
|
|
25
25
|
t.equal(document.querySelector('#contentModel-1').innerHTML.trim(), `<p>
|
|
@@ -41,5 +41,6 @@ tape('postProcessing.js', async function (t) {
|
|
|
41
41
|
t.equal(document.querySelector('#contentModel-3').innerHTML.trim(), `<p>1</p><p>2</p><p>3</p>`, 'Paragraph with text+paragraph+text split into 3 paragraphs (snapshot)');
|
|
42
42
|
|
|
43
43
|
t.equal(document.querySelector('cite-group').parentNode.tagName, 'P', 'Custom elements remain in paragraph');
|
|
44
|
-
});
|
|
45
44
|
|
|
45
|
+
t.equal(document.querySelector('p:has(s)').innerHTML, `pre<s></s>post`, 's element is phrasing content');
|
|
46
|
+
});
|