diff --git a/.gitignore b/.gitignore index a63124cafe2..0cc25632e99 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,10 @@ jspm_packages # macOS finder cache file .DS_Store +# Intellij +.idea +*.iml + # VS Code settings .vscode diff --git a/packages/@sanity/block-tools/src/HtmlDeserializer/rules/html.ts b/packages/@sanity/block-tools/src/HtmlDeserializer/rules/html.ts index 7dac81f02bc..71851e4a35d 100644 --- a/packages/@sanity/block-tools/src/HtmlDeserializer/rules/html.ts +++ b/packages/@sanity/block-tools/src/HtmlDeserializer/rules/html.ts @@ -91,7 +91,7 @@ export default function createHTMLRules(blockContentType, options: any = {}) { return undefined } // Don't add blocks into list items - if (el.parentNode && tagName(el) === 'li') { + if (el.parentNode && tagName(el.parentNode) === 'li') { return next(el.childNodes) } // If style is not supported, return a defaultBlockType diff --git a/packages/@sanity/block-tools/test/tests/HtmlDeserializer/lists/input.html b/packages/@sanity/block-tools/test/tests/HtmlDeserializer/lists/input.html index 9898b0379c5..7b2fa783bdb 100644 --- a/packages/@sanity/block-tools/test/tests/HtmlDeserializer/lists/input.html +++ b/packages/@sanity/block-tools/test/tests/HtmlDeserializer/lists/input.html @@ -22,6 +22,10 @@
p in li.
+