@scrider/formatter 1.10.9 → 1.10.10
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/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -548,6 +548,9 @@ var LIST_WRAPPER_TAGS = {
|
|
|
548
548
|
checked: "ul",
|
|
549
549
|
unchecked: "ul"
|
|
550
550
|
};
|
|
551
|
+
function listWrapperFamily(listType) {
|
|
552
|
+
return LIST_WRAPPER_TAGS[listType] || "ul";
|
|
553
|
+
}
|
|
551
554
|
var EMBED_RENDERERS = {
|
|
552
555
|
image: (value, attrs) => {
|
|
553
556
|
const src = typeof value === "string" ? value : "";
|
|
@@ -3973,7 +3976,7 @@ function handleListOpen(stack, listType, indent, pretty, resolvedDocumentPresent
|
|
|
3973
3976
|
}
|
|
3974
3977
|
}
|
|
3975
3978
|
const top = stack[stack.length - 1];
|
|
3976
|
-
if (top && top.indent === indent && top.type !== listType) {
|
|
3979
|
+
if (top && top.indent === indent && listWrapperFamily(top.type) !== listWrapperFamily(listType)) {
|
|
3977
3980
|
const closed = stack.pop();
|
|
3978
3981
|
if (closed) {
|
|
3979
3982
|
const closeTag = LIST_WRAPPER_TAGS[closed.type] || "ul";
|