@amermathsoc/texml-to-html 20.0.0 → 20.1.0

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 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.0](https://github.com/AmerMathSoc/texml-to-html/compare/v20.0.0...v20.1.0) (2026-01-13)
6
+
7
+
8
+ ### Features
9
+
10
+ * support strike element ([7f804f2](https://github.com/AmerMathSoc/texml-to-html/commit/7f804f2658a94d392308834c376e3ce0e59ba3a5)), closes [#497](https://github.com/AmerMathSoc/texml-to-html/issues/497)
11
+
5
12
  ## [20.0.0](https://github.com/AmerMathSoc/texml-to-html/compare/v19.0.1...v20.0.0) (2026-01-08)
6
13
 
7
14
 
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright (c) 2026 American Mathematical Society
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /**
18
+ * strike element
19
+ * @param {HTMLElement} htmlParentNode
20
+ * @param {Element} xmlnode
21
+ */
22
+ export default function (htmlParentNode, xmlnode) {
23
+ const node = this.createNode('s');
24
+ htmlParentNode.appendChild(node);
25
+ this.passThrough(node, xmlnode);
26
+ };
@@ -76,6 +76,7 @@ import TexMath from './elements/tex-math.js';
76
76
  import CiteGroup from './elements/cite-group.js';
77
77
  import CiteDetail from './elements/cite-detail.js';
78
78
  import TitleGroup from './elements/title-group.js';
79
+ import Strike from './elements/strike.js';
79
80
 
80
81
  import copyElement from './helpers/copyElement.js';
81
82
  import { extractContribGroups } from './helpers/extractContribGroups.js';
@@ -313,6 +314,7 @@ export class Transformer {
313
314
  'cite-detail' = CiteDetail.bind(this)
314
315
  'title-group' = TitleGroup.bind(this)
315
316
  'toc-title-group' = TitleGroup.bind(this)
317
+ strike = Strike.bind(this);
316
318
 
317
319
  // one-off reuse of imported elements
318
320
  // NOTE if RHS gets re-used more than once, use mapTag in the constructor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amermathsoc/texml-to-html",
3
- "version": "20.0.0",
3
+ "version": "20.1.0",
4
4
  "type": "module",
5
5
  "description": "A NodeJS library for converting AMS-style JATS XML to HTML",
6
6
  "scripts": {
package/test/article.xml CHANGED
@@ -166,6 +166,7 @@
166
166
  <sc/>
167
167
  <monospace/>
168
168
  <underline/>
169
+ <strike/>
169
170
  <sans-serif/>
170
171
  <disp-quote specific-use="use">
171
172
  <p>Quote</p>
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright (c) 2026 American Mathematical Society
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ import { article } from './helper.js';
19
+ import tape from 'tape';
20
+
21
+
22
+ tape('Template: strike', async function(t) {
23
+ t.plan(1);
24
+ const document = article;
25
+ t.ok(document.querySelector('s'), 'Strike element');
26
+ });
@@ -153,6 +153,7 @@
153
153
  <span data-ams-style="sc"></span>
154
154
  <span data-ams-style="monospace"></span>
155
155
  <u></u>
156
+ <s></s>
156
157
  <span data-ams-style="sans-serif"></span>
157
158
  <blockquote data-ams-style="use">
158
159
  <p>Quote</p>