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.cjs 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
  */
@@ -887,6 +887,10 @@ class _Tokenizer {
887
887
  lastItem.raw = lastItem.raw.trimEnd();
888
888
  lastItem.text = lastItem.text.trimEnd();
889
889
  }
890
+ else {
891
+ // not a list since there were no items
892
+ return;
893
+ }
890
894
  list.raw = list.raw.trimEnd();
891
895
  // Item child tokens handled here at end because we needed to have the final item to trim it first
892
896
  for (let i = 0; i < list.items.length; i++) {