highmark-yapp 2.0.177 → 2.0.180

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/README.md CHANGED
@@ -73,20 +73,21 @@ renderYappStyles();
73
73
  ...
74
74
  ```
75
75
 
76
- Next, to create a node from some Markdown content, use the `tokensFromContent()` and `nodeFromTokens()` utility functions:
76
+ Next, to create a node from some Markdown content, use the `tokensFromMarkdown()`, `markdownNodeFromTokens()` and `topmostHTMLNodeFromMarkdownNode()` utility functions:
77
77
 
78
78
  ```
79
79
  import { markdownUtilities } from "highmark-yapp";
80
80
 
81
- const { tokensFromContent, nodeFromTokens } = markdownUtilities;
81
+ const { tokensFromMarkdown, markdownNodeFromTokens } = markdownUtilities;
82
82
 
83
- const content = `
83
+ const markdown = `
84
84
 
85
85
  ...
86
86
 
87
87
  `,
88
- tokens = tokensFromContent(node),
89
- node = nodeFromTokens(tokens);
88
+ tokens = tokensFromMarkdown(markdown),
89
+ markdownNode = markdownNodeFromTokens(tokens),
90
+ topmostHTMLNode = topmostHTMLNodeFromMarkdownNode(markdownNode);
90
91
 
91
92
  ```
92
93
 
@@ -101,15 +102,12 @@ const body = document.querySelector("body"),
101
102
  tokens
102
103
  };
103
104
 
104
- node.mount(parentDOMElement, siblingDOMElement, context);
105
+ topmostHTMLNode.mount(parentDOMElement, siblingDOMElement, context);
105
106
  ```
106
107
 
107
- Note the use of the tokens in a `context` plain old JavaScript object that must be padded to the node's `mount()` method along with the parent and sibling DOM elements.
108
+ Note the use of the tokens in a `context` plain old JavaScript object that must be passed to the topmost HTML node's `mount()` method along with the parent and sibling DOM elements.
108
109
  This is why there are two utility functions to create the node in two stages.
109
- By the way, the sibling DOM element, if not null, must be a child of the parent DOM element, in which case the node will be mounted immediately *before* it.
110
-
111
- Note also that the usual delimiters for block listings consisting of three backticks have been replaced with three single quotes `'''`.
112
- This generally makes things easier when working inside string template literals that use backticks for delimiters.
110
+ By the way, the sibling DOM element, if not null, must be a child of the parent DOM element, in which case the node will be mounted immediately after it.
113
111
 
114
112
  ## Building
115
113