marked 15.0.3 → 15.0.4

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/lib/marked.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v15.0.3 - a markdown parser
2
+ * marked v15.0.4 - a markdown parser
3
3
  * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
@@ -885,6 +885,10 @@ class _Tokenizer {
885
885
  lastItem.raw = lastItem.raw.trimEnd();
886
886
  lastItem.text = lastItem.text.trimEnd();
887
887
  }
888
+ else {
889
+ // not a list since there were no items
890
+ return;
891
+ }
888
892
  list.raw = list.raw.trimEnd();
889
893
  // Item child tokens handled here at end because we needed to have the final item to trim it first
890
894
  for (let i = 0; i < list.items.length; i++) {