bedazzlr 0.2.2 → 0.2.3

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 +5 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -70,9 +70,11 @@ const countIndents = (root) => {
70
70
  let indents = 0;
71
71
  while (el) {
72
72
  if (el.classList.contains('trivia')) {
73
- let leftOffset = el.firstElementChild;
73
+ if (el?.getAttribute('name') !== 'LeftOffset') {
74
+ return Infinity;
75
+ }
74
76
 
75
- if (leftOffset?.getAttribute('name') !== 'LeftOffset') return Infinity;
77
+ let leftOffset = el;
76
78
 
77
79
  el = leftOffset.firstElementChild;
78
80
 
@@ -82,6 +84,7 @@ const countIndents = (root) => {
82
84
  }
83
85
  return indents;
84
86
  } else {
87
+ if (el.tagName === 'A') debugger;
85
88
  el =
86
89
  el.previousElementSibling ||
87
90
  (el.parentElement.tagName === 'NODE' ? el.parentElement : null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bedazzlr",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Code block syntax highlighting using BABLR",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",