Skip to content

Commit ef6c4a0

Browse files
authored
Fix: unordered lists styles
This PR fixes a bug where unordered lists don't get their styles unless styles are present for _ordered lists_.
1 parent ce3d95b commit ef6c4a0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/utils.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,14 @@ export const initRenderer = ({
172172
list(body, ordered, start) {
173173
const type = ordered ? "ol" : "ul";
174174
const startatt = ordered && start !== 1 ? ' start="' + start + '"' : "";
175+
const styles = parseCssInJsToInlineCss(
176+
finalStyles[ordered ? "ol" : "ul"]
177+
);
175178
return (
176179
"<" +
177180
type +
178181
startatt +
179-
`${
180-
parseCssInJsToInlineCss(finalStyles.ol) !== ""
181-
? ` style="${parseCssInJsToInlineCss(
182-
finalStyles[ordered ? "ol" : "ul"]
183-
)}"`
184-
: ""
185-
} >\n` +
182+
`${styles !== "" ? ` style="${styles}"` : ""} >\n` +
186183
body +
187184
"</" +
188185
type +

0 commit comments

Comments
 (0)