highmark-markdown 1.1.7 → 1.1.9

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.
Files changed (46) hide show
  1. package/example.js +46 -46
  2. package/lib/node/css.js +6 -6
  3. package/lib/node/html/directive.js +2 -2
  4. package/lib/node/html/division.js +2 -2
  5. package/lib/node/html/heading/index.js +2 -2
  6. package/lib/node/html/image.js +2 -2
  7. package/lib/node/html/item/contents.js +2 -2
  8. package/lib/node/html/item/footnote.js +3 -3
  9. package/lib/node/html/item/index.js +6 -6
  10. package/lib/node/html/line.js +3 -3
  11. package/lib/node/html/link/contents.js +3 -3
  12. package/lib/node/html/link/email.js +3 -3
  13. package/lib/node/html/link/footnote.js +2 -2
  14. package/lib/node/html/link/hyper.js +3 -3
  15. package/lib/node/html/link/index.js +3 -3
  16. package/lib/node/html/list/contents.js +2 -2
  17. package/lib/node/html/list/footnotes.js +2 -2
  18. package/lib/node/html/list/index.js +2 -2
  19. package/lib/node/html/pageNumber.js +3 -3
  20. package/lib/node/html/text/inline.js +3 -3
  21. package/lib/node/html/text/stronglyEmphasised.js +2 -2
  22. package/lib/node/html/topmost.js +3 -3
  23. package/lib/node/html.js +8 -8
  24. package/package.json +1 -1
  25. package/src/node/css.js +5 -4
  26. package/src/node/html/directive.js +1 -1
  27. package/src/node/html/division.js +2 -2
  28. package/src/node/html/heading/index.js +1 -1
  29. package/src/node/html/image.js +1 -1
  30. package/src/node/html/item/contents.js +2 -2
  31. package/src/node/html/item/footnote.js +2 -2
  32. package/src/node/html/item/index.js +5 -5
  33. package/src/node/html/line.js +2 -2
  34. package/src/node/html/link/contents.js +2 -2
  35. package/src/node/html/link/email.js +2 -2
  36. package/src/node/html/link/footnote.js +1 -1
  37. package/src/node/html/link/hyper.js +2 -2
  38. package/src/node/html/link/index.js +2 -2
  39. package/src/node/html/list/contents.js +2 -2
  40. package/src/node/html/list/footnotes.js +2 -2
  41. package/src/node/html/list/index.js +2 -2
  42. package/src/node/html/pageNumber.js +2 -2
  43. package/src/node/html/text/inline.js +2 -2
  44. package/src/node/html/text/stronglyEmphasised.js +1 -1
  45. package/src/node/html/topmost.js +2 -2
  46. package/src/node/html.js +7 -6
package/src/node/css.js CHANGED
@@ -81,14 +81,15 @@ class CSSNode extends Node {
81
81
  return node;
82
82
  }
83
83
 
84
- static fromChildNodes(Class, childNodes, ...remainingArguments) {
85
- if (childNodes === undefined) {
86
- childNodes = Class; ///
84
+ static fromChildCSSNodes(Class, childCssNodes, ...remainingArguments) {
85
+ if (childCssNodes === undefined) {
86
+ childCssNodes = Class; ///
87
87
 
88
88
  Class = CSSNode; ///
89
89
  }
90
90
 
91
- const node = Node.fromChildNodes(Class, childNodes, ...remainingArguments);
91
+ const childNodes = childCssNodes, ///
92
+ node = Node.fromChildNodes(Class, childNodes, ...remainingArguments);
92
93
 
93
94
  return node;
94
95
  }
@@ -9,7 +9,7 @@ export default class DirectiveHTMLNode extends HTMLNode {
9
9
  return siblingDOMElement;
10
10
  }
11
11
 
12
- unmount(parentDOMElement, context) {
12
+ unmount(parentDOMElement) {
13
13
  ///
14
14
  }
15
15
 
@@ -172,8 +172,8 @@ export default class DivisionHTMLNode extends HTMLNode {
172
172
  }
173
173
 
174
174
  static fromPaginatedHTMLNodesAndDivisionClassName(paginatedHTMLNodes, divisionClassName) {
175
- const childNodes = paginatedHTMLNodes, ///
176
- divisionHTMLNode = HTMLNode.fromChildNodes(DivisionHTMLNode, childNodes, divisionClassName);
175
+ const childHTMLNodes = paginatedHTMLNodes, ///
176
+ divisionHTMLNode = HTMLNode.fromChildHTMLNodes(DivisionHTMLNode, childHTMLNodes, divisionClassName);
177
177
 
178
178
  return divisionHTMLNode;
179
179
  }
@@ -49,7 +49,7 @@ export default class IndexHeadingHTMLNode extends HTMLNode {
49
49
  return siblingDOMElement;
50
50
  }
51
51
 
52
- unmount(parentDOMElement, context) {
52
+ unmount(parentDOMElement) {
53
53
  let domElement;
54
54
 
55
55
  {
@@ -79,7 +79,7 @@ export default class ImageHTMLNode extends HTMLNode {
79
79
  return siblingDOMElement;
80
80
  }
81
81
 
82
- unmount(parentDOMElement, context) {
82
+ unmount(parentDOMElement) {
83
83
  const domElement = this.getDOMElement();
84
84
 
85
85
  remove(domElement, parentDOMElement);
@@ -28,8 +28,8 @@ export default class ContentsItemHTMLNode extends HTMLNode {
28
28
 
29
29
  return htmlNode;
30
30
  }),
31
- childNodes = htmlNodes, ///
32
- contentsItemHTMLNode = HTMLNode.fromChildNodes(ContentsItemHTMLNode, childNodes);
31
+ childHTMLNodes = htmlNodes, ///
32
+ contentsItemHTMLNode = HTMLNode.fromChildHTMLNodes(ContentsItemHTMLNode, childHTMLNodes);
33
33
 
34
34
  return contentsItemHTMLNode;
35
35
  }
@@ -28,11 +28,11 @@ export default class FootnoteItemHTMLNode extends HTMLNode {
28
28
  const prepend = FOOTNOTE_PREPEND,
29
29
  anchorHTMLNode = AnchorHTMLNode.fromPrependAndIdentifier(prepend, identifier),
30
30
  lineHTMLNode = lineHTMLTransform.getLineHTMLNode(),
31
- childNodes = [
31
+ childHTMLNodes = [
32
32
  anchorHTMLNode,
33
33
  lineHTMLNode
34
34
  ],
35
- footnoteItemHTMLNode = HTMLNode.fromChildNodes(FootnoteItemHTMLNode, childNodes);
35
+ footnoteItemHTMLNode = HTMLNode.fromChildHTMLNodes(FootnoteItemHTMLNode, childHTMLNodes);
36
36
 
37
37
  return footnoteItemHTMLNode;
38
38
  }
@@ -29,23 +29,23 @@ export default class IndexItemHTMLNode extends HTMLNode {
29
29
  const wordOrPhrase = indexItem.getWordOrPhrase(),
30
30
  pageNumbers = indexItem.getPageNumbers(),
31
31
  indexSpanHTMLNode = IndexTextHTMLNode.fromWordOrPhrase(wordOrPhrase),
32
- childNodes = [
32
+ childNHTMLodes = [
33
33
  indexSpanHTMLNode
34
34
  ];
35
35
 
36
36
  pageNumbers.forEach((pageNumber) => {
37
37
  const indexLinkHTMLNOde = IndexLinkHTMLNode.fromPageNumber(pageNumber);
38
38
 
39
- childNodes.push(indexLinkHTMLNOde);
39
+ childNHTMLodes.push(indexLinkHTMLNOde);
40
40
 
41
41
  const commaTextHTMLNode = CommaTextHTMLNode.fromNothing();
42
42
 
43
- childNodes.push(commaTextHTMLNode);
43
+ childNHTMLodes.push(commaTextHTMLNode);
44
44
  });
45
45
 
46
- childNodes.pop();
46
+ childNHTMLodes.pop();
47
47
 
48
- const indexItemHTMLNode = HTMLNode.fromChildNodes(IndexItemHTMLNode, childNodes);
48
+ const indexItemHTMLNode = HTMLNode.fromChildHTMLNodes(IndexItemHTMLNode, childNHTMLodes);
49
49
 
50
50
  return indexItemHTMLNode;
51
51
  }
@@ -40,7 +40,7 @@ export default class LineHTMLNode extends HTMLNode {
40
40
  return siblingDOMElement;
41
41
  }
42
42
 
43
- unmount(parentDOMElement, context) {
43
+ unmount(parentDOMElement) {
44
44
  {
45
45
  let domElement;
46
46
 
@@ -54,7 +54,7 @@ export default class LineHTMLNode extends HTMLNode {
54
54
  remove(domElement, parentDOMElement);
55
55
  }
56
56
 
57
- super.unmount(parentDOMElement, context);
57
+ super.unmount(parentDOMElement);
58
58
  }
59
59
 
60
60
  childNodesAsHTML(indent, context) {
@@ -49,10 +49,10 @@ export default class ContentsLinkHTMLNode extends HTMLNode {
49
49
 
50
50
  static fromLineHTMLTransformAndIdentifier(lineHTMLTransform, identifier) {
51
51
  const lineHTMLNode = lineHTMLTransform.getLineHTMLNode(),
52
- childNodes = [
52
+ childHTMLNodes = [
53
53
  lineHTMLNode
54
54
  ],
55
- contentsLinkHTMLNode = HTMLNode.fromChildNodes(ContentsLinkHTMLNode, childNodes, identifier);
55
+ contentsLinkHTMLNode = HTMLNode.fromChildHTMLNodes(ContentsLinkHTMLNode, childHTMLNodes, identifier);
56
56
 
57
57
  return contentsLinkHTMLNode;
58
58
  }
@@ -73,11 +73,11 @@ export default class EmailLinkHTMLNode extends HTMLNode {
73
73
  return siblingDOMElement;
74
74
  }
75
75
 
76
- unmount(parentDOMElement, context) {
76
+ unmount(parentDOMElement) {
77
77
  const simple = this.isSimple();
78
78
 
79
79
  if (!simple) {
80
- super.unmount(parentDOMElement, context);
80
+ super.unmount(parentDOMElement);
81
81
 
82
82
  return;
83
83
  }
@@ -78,7 +78,7 @@ export default class FootnoteLinkHTMLNode extends HTMLNode {
78
78
  return siblingDOMElement;
79
79
  }
80
80
 
81
- unmount(parentDOMElement, context) {
81
+ unmount(parentDOMElement) {
82
82
  let domElement;
83
83
 
84
84
  {
@@ -73,11 +73,11 @@ export default class HyperlinkHTMLNode extends HTMLNode {
73
73
  return siblingDOMElement;
74
74
  }
75
75
 
76
- unmount(parentDOMElement, context) {
76
+ unmount(parentDOMElement) {
77
77
  const simple = this.isSimple();
78
78
 
79
79
  if (!simple) {
80
- super.unmount(parentDOMElement, context);
80
+ super.unmount(parentDOMElement);
81
81
 
82
82
  return;
83
83
  }
@@ -61,7 +61,7 @@ export default class IndexLinkHTMLNode extends HTMLNode {
61
61
  return siblingDOMElement;
62
62
  }
63
63
 
64
- unmount(parentDOMElement, context) {
64
+ unmount(parentDOMElement) {
65
65
  {
66
66
  let domElement;
67
67
 
@@ -75,7 +75,7 @@ export default class IndexLinkHTMLNode extends HTMLNode {
75
75
  remove(domElement, parentDOMElement);
76
76
  }
77
77
 
78
- super.unmount(parentDOMElement, context);
78
+ super.unmount(parentDOMElement);
79
79
  }
80
80
 
81
81
  asPlainText(context) {
@@ -28,8 +28,8 @@ export default class ContentsListHTMLNode extends HTMLNode {
28
28
 
29
29
  return contentsItemHTMLNode;
30
30
  }),
31
- childNodes = contentsItemHTMLNodes, ///
32
- contentsListHTMLNode = HTMLNode.fromChildNodes(ContentsListHTMLNode, childNodes);
31
+ childHTMLNodes = contentsItemHTMLNodes, ///
32
+ contentsListHTMLNode = HTMLNode.fromChildHTMLNodes(ContentsListHTMLNode, childHTMLNodes);
33
33
 
34
34
  return contentsListHTMLNode;
35
35
  }
@@ -51,8 +51,8 @@ export default class FootnotesListHTMLNode extends HTMLNode {
51
51
 
52
52
  return footnoteItemHTMLNode;
53
53
  }),
54
- childNodes = footnoteItemHTMLNodes, ///
55
- footnotesListHTMLNode = HTMLNode.fromChildNodes(FootnotesListHTMLNode, childNodes, start);
54
+ childNHTMLodes = footnoteItemHTMLNodes, ///
55
+ footnotesListHTMLNode = HTMLNode.fromChildHTMLNodes(FootnotesListHTMLNode, childNHTMLodes, start);
56
56
 
57
57
  return footnotesListHTMLNode;
58
58
  }
@@ -28,8 +28,8 @@ export default class IndexListHTMLNode extends HTMLNode {
28
28
 
29
29
  return indexListHTMLNode;
30
30
  }),
31
- childNodes = indexItemHTMLNodes,
32
- indexListHTMLNode = HTMLNode.fromChildNodes(IndexListHTMLNode, childNodes);
31
+ childHTMLNodes = indexItemHTMLNodes,
32
+ indexListHTMLNode = HTMLNode.fromChildHTMLNodes(IndexListHTMLNode, childHTMLNodes);
33
33
 
34
34
  return indexListHTMLNode;
35
35
  }
@@ -46,7 +46,7 @@ export default class PageNumberHTMLNode extends HTMLNode {
46
46
  return siblingDOMElement;
47
47
  }
48
48
 
49
- unmount(parentDOMElement, context) {
49
+ unmount(parentDOMElement) {
50
50
  {
51
51
  let domElement;
52
52
 
@@ -60,7 +60,7 @@ export default class PageNumberHTMLNode extends HTMLNode {
60
60
  remove(domElement, parentDOMElement);
61
61
  }
62
62
 
63
- super.unmount(parentDOMElement, context);
63
+ super.unmount(parentDOMElement);
64
64
  }
65
65
 
66
66
  asPlainText(context) {
@@ -13,9 +13,9 @@ export default class InlineTextHTMLNode extends HTMLNode {
13
13
  return siblingDOMElement;
14
14
  }
15
15
 
16
- unmount(parentDOMElement, context) {
16
+ unmount(parentDOMElement) {
17
17
  this.childNodes.forEach((childNode) => {
18
- childNode.unmount(parentDOMElement, context);
18
+ childNode.unmount(parentDOMElement);
19
19
  });
20
20
  }
21
21
 
@@ -55,7 +55,7 @@ export default class StronglyEmphasisedTextHTMLNode extends HTMLNode {
55
55
  return siblingDOMElement;
56
56
  }
57
57
 
58
- unmount(parentDOMElement, context) {
58
+ unmount(parentDOMElement) {
59
59
  let domElement;
60
60
 
61
61
  domElement = this.getDOMElement();
@@ -19,9 +19,9 @@ export default class TopmostHTMLNode extends HTMLNode {
19
19
  return siblingDOMElement;
20
20
  }
21
21
 
22
- unmount(parentDOMElement, context) {
22
+ unmount(parentDOMElement) {
23
23
  this.childNodes.forEach((childNode) => {
24
- childNode.unmount(parentDOMElement, context);
24
+ childNode.unmount(parentDOMElement);
25
25
  });
26
26
  }
27
27
 
package/src/node/html.js CHANGED
@@ -287,12 +287,12 @@ class HTMLNode extends Node {
287
287
  return siblingDOMElement;
288
288
  }
289
289
 
290
- unmount(parentDOMElement, context) {
290
+ unmount(parentDOMElement) {
291
291
  {
292
292
  const parentDOMElement = this.domElement; ///
293
293
 
294
294
  this.childNodes.forEach((childNode) => {
295
- childNode.unmount(parentDOMElement, context);
295
+ childNode.unmount(parentDOMElement);
296
296
  });
297
297
  }
298
298
 
@@ -390,14 +390,15 @@ ${childNodePlainText}`;
390
390
  return node;
391
391
  }
392
392
 
393
- static fromChildNodes(Class, childNodes, ...remainingArguments) {
394
- if (childNodes === undefined) {
395
- childNodes = Class; ///
393
+ static fromChildHTMLNodes(Class, childHTMLNodes, ...remainingArguments) {
394
+ if (childHTMLNodes === undefined) {
395
+ childHTMLNodes = Class; ///
396
396
 
397
397
  Class = HTMLNode; ///
398
398
  }
399
399
 
400
- const domElement = null,
400
+ const childNodes = childHTMLNodes, ///
401
+ domElement = null,
401
402
  node = Node.fromChildNodes(Class, childNodes, domElement, ...remainingArguments);
402
403
 
403
404
  return node;