bedazzlr 0.2.1 → 0.2.2

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 (2) hide show
  1. package/lib/index.js +4 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  buildReferenceMatcher,
17
17
  } from '@bablr/helpers/builders';
18
18
  import { buildEmbeddedMatcher } from '@bablr/agast-vm-helpers/builders';
19
+ import { hoistTrivia } from '@bablr/agast-helpers/stream';
19
20
 
20
21
  let anchorStyle =
21
22
  'display: inline-block; position: relative; vertical-align: top; pointer-events: none;';
@@ -114,9 +115,9 @@ export const removeDocumentListeners = () => {
114
115
  };
115
116
 
116
117
  export const highlightCode = (el, language, matcher = language.defaultMatcher) => {
117
- let tags = streamParse(language, matcher, el.innerText, null, { holdShiftedNodes: true })[
118
- Symbol.iterator
119
- ]();
118
+ let tags = hoistTrivia(
119
+ streamParse(language, matcher, el.innerText, null, { holdShiftedNodes: true }),
120
+ )[Symbol.iterator]();
120
121
 
121
122
  let open;
122
123
  let referenceTag = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bedazzlr",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Code block syntax highlighting using BABLR",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",