diff --git a/client/src/curriculum/index.scss b/client/src/curriculum/index.scss index 5c6d2df369b6..207526d3f148 100644 --- a/client/src/curriculum/index.scss +++ b/client/src/curriculum/index.scss @@ -192,6 +192,13 @@ color: var(--text-visited); } } + + ol, + ul { + li > p { + margin: 0; + } + } } &.with-sidebar { diff --git a/client/src/document/index.scss b/client/src/document/index.scss index bcd950a33b2a..58835bce2110 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -110,6 +110,10 @@ li { margin: 0.5rem 0; + + > p { + margin: 0; + } } } diff --git a/markdown/m2h/handlers/index.ts b/markdown/m2h/handlers/index.ts index 2e4a1a224850..f1d433546994 100644 --- a/markdown/m2h/handlers/index.ts +++ b/markdown/m2h/handlers/index.ts @@ -191,8 +191,10 @@ export function buildLocalizedHandlers(locale: Locale): Handlers { children: "children" in item ? item.children.flatMap((child) => - "tagName" in child && child.tagName == "p" - ? child.children + "tagName" in child && + child.tagName == "p" && + child.children?.length === 0 + ? [] : [child] ) : [],