highmark-markdown 0.0.142 → 0.0.145

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.
@@ -124,11 +124,7 @@ class View extends Element {
124
124
  this.update();
125
125
  }
126
126
 
127
- static initialMarkdown = `|asdf|
128
- ------
129
- |asdf|
130
-
131
-
127
+ static initialMarkdown = `@import cover.mds
132
128
  `;
133
129
 
134
130
  static tagName = "div";
@@ -78,7 +78,7 @@ const bnf = `
78
78
  blockListing ::= blockListingStart blockText blockListingEnd ;
79
79
 
80
80
 
81
- import ::= "@"<NO_WHITESPACE>"import" [string-literal] <END_OF_LINE> ;
81
+ import ::= "@"<NO_WHITESPACE>"import" [path] <END_OF_LINE> ;
82
82
 
83
83
 
84
84
  tableHead ::= tableHeadRow ;
@@ -151,16 +151,16 @@ const bnf = `
151
151
  image. ::= "![" inlineText... "]"<NO_WHITESPACE>"(" [path] ")" ;
152
152
 
153
153
 
154
- emailLink. ::= "[" inlineText... "]"<NO_WHITESPACE>"(" address ")"
154
+ emailLink. ::= "[" inlineText... "]"<NO_WHITESPACE>"(" [email-address] ")"
155
155
 
156
- | address
156
+ | [email-address]
157
157
 
158
158
  ;
159
159
 
160
160
 
161
- hyperlink. ::= "[" inlineText... "]"<NO_WHITESPACE>"(" url ")"
161
+ hyperlink. ::= "[" inlineText... "]"<NO_WHITESPACE>"(" [url] ")"
162
162
 
163
- | url
163
+ | [url]
164
164
 
165
165
  ;
166
166
 
@@ -180,11 +180,7 @@ const bnf = `
180
180
  inlineText ::= plainText+ ;
181
181
 
182
182
 
183
- plainText ::= [regular-expression]
184
-
185
- | [string-literal]
186
-
187
- | [escaped]
183
+ plainText ::= [escaped]
188
184
 
189
185
  | [triple-asterisk]
190
186
 
@@ -233,12 +229,6 @@ const bnf = `
233
229
  anchor ::= [number] ;
234
230
 
235
231
 
236
- url ::= [scheme]? [domain] [path]? ;
237
-
238
-
239
- address ::= [domain]<NO_WHITESPACE>"@"<NO_WHITESPACE>[domain] ;
240
-
241
-
242
232
  className ::= <NO_WHITESPACE>[identifier] ;
243
233
 
244
234
 
@@ -47,13 +47,13 @@ const entries = [
47
47
  "number": "^[1-9][0-9]*"
48
48
  },
49
49
  {
50
- "path": "^(?:\\/(?:[A-Za-z_\\-.]|%..)+)+\\/?"
50
+ "email-address": "^[a-z0-9\\-_]+(?:\\.[a-z0-9\\-_]+)*@[a-z0-9\\-_]+(?:\\.[a-z0-9\\-_]+)+"
51
51
  },
52
52
  {
53
- "domain": "^[a-z]+(?:-[a-z]+)*(?:\\.[a-z]+(?:-[a-z]+)*)+"
53
+ "url": "^[a-z]+:\\/\\/[a-z\\-]+(?:\\.[a-z\\-]+)+(?:\\/(?:[A-Za-z0-9\\-_]|%..)*)*(?:\\.(?:[A-Za-z0-9\\-_]|%..)+)?"
54
54
  },
55
55
  {
56
- "scheme": "^[a-z]+:\\/\\/"
56
+ "path": "^[a-z0-9\\-_]+(?:\\/[a-z0-9\\-_]+)*\\.[a-z0-9\\-_]+"
57
57
  },
58
58
  {
59
59
  "identifier": "^[a-z]+(?:-[a-z]+)*"
@@ -4,7 +4,6 @@ import { CommonLexer } from "occam-lexers";
4
4
  import { WhitespaceToken,
5
5
  EndOfLineSignificantToken,
6
6
  CStyleSingleLineCommentToken,
7
- DoublyQuotedStringLiteralToken,
8
7
  EndOfLineCommentSignificantToken,
9
8
  CStyleEndOfMultiLineCommentToken,
10
9
  CStyleStartOfMultiLineCommentToken,
@@ -33,7 +32,7 @@ export default class MarkdownLexer extends CommonLexer {
33
32
 
34
33
  static SinglyQuotedStringLiteralToken = null;
35
34
 
36
- static DoublyQuotedStringLiteralToken = DoublyQuotedStringLiteralToken;
35
+ static DoublyQuotedStringLiteralToken = null;
37
36
 
38
37
  static fromNothing(Class) {
39
38
  if (Class === undefined) {
@@ -3,36 +3,62 @@
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
5
  import MarkdownNode from "../../node/markdown";
6
+ import contentMixins from "../../mixins/content";
6
7
 
7
8
  import { HREF_ATTRIBUTE_NAME } from "../../attributeNames";
8
9
 
9
10
  const { first, second, secondLast } = arrayUtilities;
10
11
 
11
- export default class EmailLinkMarkdownNode extends MarkdownNode {
12
- attributeName(context) {
13
- const attributeName = HREF_ATTRIBUTE_NAME;
12
+ class EmailLinkMarkdownNode extends MarkdownNode {
13
+ inlineText(context) {
14
+ let inlineText = null;
14
15
 
15
- return attributeName;
16
+ const childNodes = this.getChildNodes(),
17
+ childNodesLength = childNodes.length;
18
+
19
+ if (childNodesLength !== 1) {
20
+ const indent = null,
21
+ secondChildNode = second(childNodes),
22
+ inlineTextMarkdownNode = secondChildNode, ///
23
+ inlineTextMarkdownNodeHTML = inlineTextMarkdownNode.asHTML(indent, context);
24
+
25
+ inlineText = inlineTextMarkdownNodeHTML; ///
26
+ }
27
+
28
+ return inlineText;
16
29
  }
17
30
 
18
- attributeValue(context) {
31
+ emailAddress(context) {
19
32
  const childNodes = this.getChildNodes(),
20
33
  childNodesLength = childNodes.length;
21
34
 
22
- let addressMarkdownNode;
35
+ let emailAddressTerminalNode;
23
36
 
24
37
  if (childNodesLength === 1) {
25
38
  const firstChildNode = first(childNodes);
26
39
 
27
- addressMarkdownNode = firstChildNode; ///
40
+ emailAddressTerminalNode = firstChildNode; ///
28
41
  } else {
29
42
  const secondLastChildNode = secondLast(childNodes);
30
43
 
31
- addressMarkdownNode = secondLastChildNode; ///
44
+ emailAddressTerminalNode = secondLastChildNode; ///
32
45
  }
33
46
 
34
- const addressMarkdownNodeContent = addressMarkdownNode.content(context),
35
- attributeValue = `mailto:${addressMarkdownNodeContent}`;
47
+ const emailAddressTerminalNodeContent = emailAddressTerminalNode.getContent(),
48
+ emailAddress = emailAddressTerminalNodeContent; ///
49
+
50
+ return emailAddress;
51
+ }
52
+
53
+ attributeName(context) {
54
+ const attributeName = HREF_ATTRIBUTE_NAME;
55
+
56
+ return attributeName;
57
+ }
58
+
59
+ attributeValue(context) {
60
+ const emailAddress = this.emailAddress(context),
61
+ attributeValue = `mailto:${emailAddress}`;
36
62
 
37
63
  return attributeValue;
38
64
  }
@@ -40,44 +66,33 @@ export default class EmailLinkMarkdownNode extends MarkdownNode {
40
66
  childNodesAsHTML(indent, context) {
41
67
  let childNodesHTML;
42
68
 
43
- const childNodes = this.getChildNodes(),
44
- childNodesLength = childNodes.length;
69
+ const inlineText = this.inlineText(context);
45
70
 
46
- if (childNodesLength === 1) {
47
- const firstChildNode = first(childNodes),
48
- addressMarkdownNode = firstChildNode,
49
- addressMarkdownNodeHTML = addressMarkdownNode.asHTML(indent, context);
50
-
51
- childNodesHTML = addressMarkdownNodeHTML; ///
71
+ if (inlineText !== null) {
72
+ childNodesHTML = inlineText; ///
52
73
  } else {
53
- const secondChildNode = second(childNodes),
54
- inlineTextMarkdownNode = secondChildNode, ///
55
- inlineTextMarkdownNodeHTML = inlineTextMarkdownNode.asHTML(indent, context);
74
+ const content = this.content(context);
56
75
 
57
- childNodesHTML = inlineTextMarkdownNodeHTML; ///
76
+ childNodesHTML = content; ///
58
77
  }
59
78
 
60
79
  return childNodesHTML;
61
80
  }
62
81
 
63
82
  createChildNodeDOMElements(context) {
64
- const childNodes = this.getChildNodes(),
65
- childNodesLength = childNodes.length;
83
+ const inlineText = this.inlineText(context),
84
+ content = (inlineText !== null) ?
85
+ inlineText :
86
+ this.content(context);
66
87
 
67
- if (childNodesLength === 1) {
68
- const firstChildNode = first(childNodes),
69
- addressMarkdownNode = firstChildNode, ///
70
- addressMarkdownNodeDOMElement = addressMarkdownNode.createDOMElement(context);
88
+ const childNodeDOMElement = document.createTextNode(content);
71
89
 
72
- this.insertDOMElement(addressMarkdownNodeDOMElement);
73
- } else {
74
- const secondChildNode = second(childNodes),
75
- inlineTextMarkdownNode = secondChildNode, ///
76
- inlineTextMarkdownNodeDOMElement = inlineTextMarkdownNode.createDOMElement(context);
77
-
78
- this.insertDOMElement(inlineTextMarkdownNodeDOMElement);
79
- }
90
+ this.insertDOMElement(childNodeDOMElement);
80
91
  }
81
92
 
82
93
  static fromRuleNameChildNodesAndOpacity(ruleName, childNodes, opacity) { return MarkdownNode.fromRuleNameChildNodesAndOpacity(EmailLinkMarkdownNode, ruleName, childNodes, opacity); }
83
94
  }
95
+
96
+ Object.assign(EmailLinkMarkdownNode.prototype, contentMixins);
97
+
98
+ export default EmailLinkMarkdownNode;
@@ -3,81 +3,96 @@
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
5
  import MarkdownNode from "../../node/markdown";
6
+ import contentMixins from "../../mixins/content";
6
7
 
7
8
  import { HREF_ATTRIBUTE_NAME } from "../../attributeNames";
8
9
 
9
10
  const { first, second, secondLast } = arrayUtilities;
10
11
 
11
- export default class HyperlinkMarkdownNode extends MarkdownNode {
12
- attributeName(context) {
13
- const attributeName = HREF_ATTRIBUTE_NAME;
14
-
15
- return attributeName;
16
- }
17
-
18
- attributeValue(context) {
12
+ class HyperlinkLinkMarkdownNode extends MarkdownNode {
13
+ url(context) {
19
14
  const childNodes = this.getChildNodes(),
20
15
  childNodesLength = childNodes.length;
21
16
 
22
- let urlMarkdownNode;
17
+ let urlTerminalNode;
23
18
 
24
19
  if (childNodesLength === 1) {
25
20
  const firstChildNode = first(childNodes);
26
21
 
27
- urlMarkdownNode = firstChildNode; ///
22
+ urlTerminalNode = firstChildNode; ///
28
23
  } else {
29
24
  const secondLastChildNode = secondLast(childNodes);
30
25
 
31
- urlMarkdownNode = secondLastChildNode; ///
26
+ urlTerminalNode = secondLastChildNode; ///
32
27
  }
33
28
 
34
- const urlMarkdownNodeContent = urlMarkdownNode.content(context),
35
- attributeValue = urlMarkdownNodeContent; ///
29
+ const urlTerminalNodeContent = urlTerminalNode.getContent(),
30
+ url = urlTerminalNodeContent; ///
36
31
 
37
- return attributeValue;
32
+ return url;
38
33
  }
39
34
 
40
- childNodesAsHTML(indent, context) {
41
- let childNodesHTML;
35
+ inlineText(context) {
36
+ let inlineText = null;
42
37
 
43
38
  const childNodes = this.getChildNodes(),
44
39
  childNodesLength = childNodes.length;
45
40
 
46
- if (childNodesLength === 1) {
47
- const firstChildNode = first(childNodes),
48
- urlMarkdownNode = firstChildNode,
49
- urlMarkdownNodeHTML = urlMarkdownNode.asHTML(indent, context);
50
-
51
- childNodesHTML = urlMarkdownNodeHTML; ///
52
- } else {
53
- const secondChildNode = second(childNodes),
41
+ if (childNodesLength !== 1) {
42
+ const indent = null,
43
+ secondChildNode = second(childNodes),
54
44
  inlineTextMarkdownNode = secondChildNode, ///
55
45
  inlineTextMarkdownNodeHTML = inlineTextMarkdownNode.asHTML(indent, context);
56
46
 
57
- childNodesHTML = inlineTextMarkdownNodeHTML; ///
47
+ inlineText = inlineTextMarkdownNodeHTML; ///
58
48
  }
59
49
 
60
- return childNodesHTML;
50
+ return inlineText;
61
51
  }
62
52
 
63
- createChildNodeDOMElements(context) {
64
- const childNodes = this.getChildNodes(),
65
- childNodesLength = childNodes.length;
53
+ attributeName(context) {
54
+ const attributeName = HREF_ATTRIBUTE_NAME;
66
55
 
67
- if (childNodesLength === 1) {
68
- const firstChildNode = first(childNodes),
69
- urlMarkdownNode = firstChildNode, ///
70
- urlMarkdownNodeDOMElement = urlMarkdownNode.createDOMElement(context);
56
+ return attributeName;
57
+ }
58
+
59
+ attributeValue(context) {
60
+ const url = this.url(context),
61
+ attributeValue = url; ///
62
+
63
+ return attributeValue;
64
+ }
65
+
66
+ childNodesAsHTML(indent, context) {
67
+ let childNodesHTML;
68
+
69
+ const inlineText = this.inlineText(context);
71
70
 
72
- this.insertDOMElement(urlMarkdownNodeDOMElement);
71
+ if (inlineText !== null) {
72
+ childNodesHTML = inlineText; ///
73
73
  } else {
74
- const secondChildNode = second(childNodes),
75
- inlineTextMarkdownNode = secondChildNode, ///
76
- inlineTextMarkdownNodeDOMElement = inlineTextMarkdownNode.createDOMElement(context);
74
+ const content = this.content(context);
77
75
 
78
- this.insertDOMElement(inlineTextMarkdownNodeDOMElement);
76
+ childNodesHTML = content; ///
79
77
  }
78
+
79
+ return childNodesHTML;
80
+ }
81
+
82
+ createChildNodeDOMElements(context) {
83
+ const inlineText = this.inlineText(context),
84
+ content = (inlineText !== null) ?
85
+ inlineText :
86
+ this.content(context);
87
+
88
+ const childNodeDOMElement = document.createTextNode(content);
89
+
90
+ this.insertDOMElement(childNodeDOMElement);
80
91
  }
81
92
 
82
- static fromRuleNameChildNodesAndOpacity(ruleName, childNodes, opacity) { return MarkdownNode.fromRuleNameChildNodesAndOpacity(HyperlinkMarkdownNode, ruleName, childNodes, opacity); }
93
+ static fromRuleNameChildNodesAndOpacity(ruleName, childNodes, opacity) { return MarkdownNode.fromRuleNameChildNodesAndOpacity(HyperlinkLinkMarkdownNode, ruleName, childNodes, opacity); }
83
94
  }
95
+
96
+ Object.assign(HyperlinkLinkMarkdownNode.prototype, contentMixins);
97
+
98
+ export default HyperlinkLinkMarkdownNode;
@@ -4,50 +4,101 @@ import { arrayUtilities } from "necessary";
4
4
 
5
5
  import MarkdownNode from "../../node/markdown";
6
6
 
7
- import { SRC_ATTRIBUTE_NAME } from "../../attributeNames";
7
+ import { ALT_ATTRIBUTE_NAME, SRC_ATTRIBUTE_NAME} from "../../attributeNames";
8
8
 
9
9
  const { second, secondLast } = arrayUtilities;
10
10
 
11
11
  export default class ImageMarkdownNode extends MarkdownNode {
12
- attributeName(context) {
13
- const attributeName = SRC_ATTRIBUTE_NAME;
12
+ alt(context) {
13
+ const childNodes = this.getChildNodes(),
14
+ secondChildNode = second(childNodes),
15
+ inlineTextMarkdownNode = secondChildNode, ///
16
+ inlineTextMarkdownNodeContent = inlineTextMarkdownNode.content(context),
17
+ alt = inlineTextMarkdownNodeContent; ///
14
18
 
15
- return attributeName;
19
+ return alt;
16
20
  }
17
21
 
18
- attributeValue(context) {
22
+ src(context) {
19
23
  const { pathToURL = null } = context,
20
24
  childNodes = this.getChildNodes(),
21
25
  secondLastChildNode = secondLast(childNodes),
22
26
  pathTerminalNode = secondLastChildNode, ///
23
27
  pathTerminalNodeContent = pathTerminalNode.getContent(),
24
28
  path = pathTerminalNodeContent, ///
25
- imageURL = (pathToURL === null) ?
26
- path : ///
27
- pathToURL(path),
28
- attributeValue = imageURL; ///
29
+ src = (pathToURL === null) ?
30
+ path : ///
31
+ pathToURL(path); ///
29
32
 
30
- return attributeValue;
33
+ return src;
31
34
  }
32
35
 
33
- childNodesAsHTML(indent, context) {
34
- const childNodes = this.getChildNodes(),
35
- secondChildNode = second(childNodes),
36
- inlineTextMarkdownNode = secondChildNode, ///
37
- content = inlineTextMarkdownNode.content(context),
38
- childNodesHTML = content; ///
36
+ asHTML(indent, context) {
37
+ indent = this.adjustIndent(indent);
38
+
39
+ const selfClosingTag = this.selfClosingTag(context),
40
+ html = (indent === null) ?
41
+ selfClosingTag : ///
42
+ `${indent}${selfClosingTag}
43
+ `;
39
44
 
40
- return childNodesHTML;
45
+ return html;
41
46
  }
42
47
 
43
- createChildNodeDOMElements(context) {
44
- const childNodes = this.getChildNodes(),
45
- secondChildNode = second(childNodes),
46
- inlineTextMarkdownNode = secondChildNode, ///
47
- content = inlineTextMarkdownNode.content(context),
48
- childNodeDOMElement = document.createTextNode(content);
48
+ createDOMElement(context) {
49
+ const tagName = this.tagName(context),
50
+ domElement = document.createElement(tagName),
51
+ attributeNames = this.attributeNames(context),
52
+ attributeValues = this.attributeValues(context);
53
+
54
+ attributeNames.forEach((attributeName, index) => {
55
+ const attributeValue = attributeValues[index];
56
+
57
+ domElement.setAttribute(attributeName, attributeValue);
58
+ });
59
+
60
+ this.setDOMElement(domElement);
61
+
62
+ return domElement;
63
+ }
64
+
65
+ selfClosingTag(context) {
66
+ const tagName = this.tagName(context),
67
+ attributeNames = this.attributeNames(context),
68
+ attributeValues = this.attributeValues(context),
69
+ attributesHTML = attributeNames.reduce((attributesHML, attributeName, index) => {
70
+ const attributeValue = attributeValues[index];
71
+
72
+ attributesHML = (attributesHML === null) ?
73
+ `${attributeName}="${attributeValue}"` :
74
+ `${attributesHML} ${attributeName}="${attributeValue}"`;
75
+
76
+ return attributesHML;
77
+
78
+ }, null),
79
+ selfClosingTag = `<${tagName} ${attributesHTML}/?`;
80
+
81
+ return selfClosingTag;
82
+ }
83
+
84
+ attributeNames(context) {
85
+ const attributeNames = [
86
+ ALT_ATTRIBUTE_NAME,
87
+ SRC_ATTRIBUTE_NAME
88
+ ];
89
+
90
+ return attributeNames;
91
+ }
92
+
93
+ attributeValues(context) {
94
+ const alt = this.alt(context),
95
+ src = this.src(context),
96
+ attributeValues = [
97
+ alt,
98
+ src
99
+ ];
49
100
 
50
- this.insertDOMElement(childNodeDOMElement);
101
+ return attributeValues;
51
102
  }
52
103
 
53
104
  static fromRuleNameChildNodesAndOpacity(ruleName, childNodes, opacity) { return MarkdownNode.fromRuleNameChildNodesAndOpacity(ImageMarkdownNode, ruleName, childNodes, opacity); }
@@ -4,8 +4,6 @@ import { arrayUtilities } from "necessary";
4
4
 
5
5
  import MarkdownNode from "../../node/markdown";
6
6
 
7
- import { trim } from "../../utilities/string";
8
-
9
7
  const { fourth } = arrayUtilities;
10
8
 
11
9
  export default class ImportMarkdownNode extends MarkdownNode {
@@ -34,20 +32,12 @@ export default class ImportMarkdownNode extends MarkdownNode {
34
32
  filePath(context) {
35
33
  const childNodes = this.getChildNodes(),
36
34
  fourthChildNode = fourth(childNodes),
37
- doublyQuotedStringLiteralTerminalNode = fourthChildNode,
38
- content = doublyQuotedStringLiteralTerminalNode.getContent(),
39
- filePath = filePathFromContent(content);
35
+ pathTerminalNode = fourthChildNode, ///
36
+ pathTerminalNodeContent = pathTerminalNode.getContent(),
37
+ filePath = pathTerminalNodeContent; ///
40
38
 
41
39
  return filePath;
42
40
  }
43
41
 
44
42
  static fromRuleNameChildNodesAndOpacity(ruleName, childNodes, opacity) { return MarkdownNode.fromRuleNameChildNodesAndOpacity(ImportMarkdownNode, ruleName, childNodes, opacity); }
45
43
  }
46
-
47
- function filePathFromContent(content) {
48
- content = trim(content); ///
49
-
50
- const filePath = content;
51
-
52
- return filePath;
53
- }
package/src/nodeMap.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- import URLMarkdownNode from "./node/markdown/url";
4
3
  import LinkMarkdownNode from "./node/markdown/link";
5
4
  import LineMarkdownNode from "./node/markdown/line";
6
5
  import ImageMarkdownNode from "./node/markdown/image";
@@ -9,7 +8,6 @@ import ErrorMarkdownNode from "./node/markdown/error";
9
8
  import AnchorMarkdownNode from "./node/markdown/anchor";
10
9
  import HeaderMarkdownNode from "./node/markdown/header";
11
10
  import ImportMarkdownNode from "./node/markdown/import";
12
- import AddressMarkdownNode from "./node/markdown/address";
13
11
  import DivisionMarkdownNode from "./node/markdown/division";
14
12
  import FootnoteMarkdownNode from "./node/markdown/footnote";
15
13
  import ReferenceMarkdownNode from "./node/markdown/reference";
@@ -52,7 +50,6 @@ import UnorderedListItemMarkdownNode from "./node/markdown/unorderedListItem";
52
50
  import StronglyEmphasisedTextMarkdownNode from "./node/markdown/stronglyEmphasisedText";
53
51
 
54
52
  import {
55
- URL_RULE_NAME,
56
53
  LINK_RULE_NAME,
57
54
  LINE_RULE_NAME,
58
55
  IMAGE_RULE_NAME,
@@ -61,7 +58,6 @@ import {
61
58
  ANCHOR_RULE_NAME,
62
59
  HEADER_RULE_NAME,
63
60
  IMPORT_RULE_NAME,
64
- ADDRESS_RULE_NAME,
65
61
  FOOTNOTE_RULE_NAME,
66
62
  DIVISION_RULE_NAME,
67
63
  REFERENCE_RULE_NAME,
@@ -104,7 +100,6 @@ import {
104
100
  STRONGLY_EMPHASISED_TEXT_RULE_NAME } from "./ruleNames";
105
101
 
106
102
  const nodeMap = {
107
- [URL_RULE_NAME]: URLMarkdownNode,
108
103
  [LINK_RULE_NAME]: LinkMarkdownNode,
109
104
  [LINE_RULE_NAME]: LineMarkdownNode,
110
105
  [IMAGE_RULE_NAME]: ImageMarkdownNode,
@@ -113,7 +108,6 @@ const nodeMap = {
113
108
  [ANCHOR_RULE_NAME]: AnchorMarkdownNode,
114
109
  [HEADER_RULE_NAME]: HeaderMarkdownNode,
115
110
  [IMPORT_RULE_NAME]: ImportMarkdownNode,
116
- [ADDRESS_RULE_NAME]: AddressMarkdownNode,
117
111
  [FOOTNOTE_RULE_NAME]: FootnoteMarkdownNode,
118
112
  [DIVISION_RULE_NAME]: DivisionMarkdownNode,
119
113
  [REFERENCE_RULE_NAME]: ReferenceMarkdownNode,
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { URL_RULE_NAME,
4
- LINK_RULE_NAME,
3
+ import { LINK_RULE_NAME,
5
4
  LINE_RULE_NAME,
6
5
  IMAGE_RULE_NAME,
7
6
  TABLE_RULE_NAME,
@@ -9,7 +8,6 @@ import { URL_RULE_NAME,
9
8
  ANCHOR_RULE_NAME,
10
9
  HEADER_RULE_NAME,
11
10
  IMPORT_RULE_NAME,
12
- ADDRESS_RULE_NAME,
13
11
  FOOTNOTE_RULE_NAME,
14
12
  DIVISION_RULE_NAME,
15
13
  REFERENCE_RULE_NAME,
@@ -51,10 +49,6 @@ import { URL_RULE_NAME,
51
49
  STRONGLY_EMPHASISED_TEXT_RULE_NAME } from "./ruleNames";
52
50
 
53
51
  const ruleNameToHTMLMap = {
54
- [URL_RULE_NAME]: {
55
- tagName: null,
56
- className: null
57
- },
58
52
  [LINK_RULE_NAME]: {
59
53
  tagName: "a",
60
54
  className: "link"
@@ -87,10 +81,6 @@ const ruleNameToHTMLMap = {
87
81
  tagName: null,
88
82
  className: null
89
83
  },
90
- [ADDRESS_RULE_NAME]: {
91
- tagName: null,
92
- className: null
93
- },
94
84
  [FOOTNOTE_RULE_NAME]: {
95
85
  tagName: null,
96
86
  className: null
package/src/ruleNames.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- export const URL_RULE_NAME = "url";
4
3
  export const LINK_RULE_NAME = "link";
5
4
  export const LINE_RULE_NAME = "line";
6
5
  export const IMAGE_RULE_NAME = "image";
@@ -9,7 +8,6 @@ export const ERROR_RULE_NAME = "error";
9
8
  export const ANCHOR_RULE_NAME = "anchor";
10
9
  export const HEADER_RULE_NAME = "header";
11
10
  export const IMPORT_RULE_NAME = "import";
12
- export const ADDRESS_RULE_NAME = "address";
13
11
  export const FOOTNOTE_RULE_NAME = "footnote";
14
12
  export const DIVISION_RULE_NAME = "division";
15
13
  export const REFERENCE_RULE_NAME = "reference";
@@ -52,7 +50,6 @@ export const UNORDERED_LIST_ITEM_RULE_NAME = "unorderedListItem";
52
50
  export const STRONGLY_EMPHASISED_TEXT_RULE_NAME = "stronglyEmphasisedText";
53
51
 
54
52
  const ruleNames = {
55
- URL_RULE_NAME,
56
53
  LINK_RULE_NAME,
57
54
  LINE_RULE_NAME,
58
55
  IMAGE_RULE_NAME,
@@ -61,7 +58,6 @@ const ruleNames = {
61
58
  ANCHOR_RULE_NAME,
62
59
  HEADER_RULE_NAME,
63
60
  IMPORT_RULE_NAME,
64
- ADDRESS_RULE_NAME,
65
61
  FOOTNOTE_RULE_NAME,
66
62
  DIVISION_RULE_NAME,
67
63
  REFERENCE_RULE_NAME,