Skip to content

Commit

Permalink
fix: 🐛 list borken on android
Browse files Browse the repository at this point in the history
Closes: #688
  • Loading branch information
Saul-Mirone committed Sep 10, 2022
1 parent 19e5128 commit 1f8c345
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 74 deletions.
12 changes: 11 additions & 1 deletion packages/preset-commonmark/src/node/list-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,17 @@ export const listItem = createNode<Keys>((utils) => ({
spread: dom.dataset['spread'],
};
},
contentElement: 'div.list-item_body',
contentElement: (dom) => {
if (!(dom instanceof HTMLElement)) {
throw expectDomTypeError(dom);
}

const body = dom.querySelector<HTMLElement>('.list-item_body');
if (!body) {
return dom;
}
return body;
},
},
{ tag: 'li' },
],
Expand Down
12 changes: 6 additions & 6 deletions packages/prose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@
],
"dependencies": {
"@milkdown/exception": "workspace:*",
"prosemirror-commands": "^1.3.0",
"prosemirror-commands": "^1.3.1",
"prosemirror-dropcursor": "^1.5.0",
"prosemirror-gapcursor": "^1.3.1",
"prosemirror-history": "^1.3.0",
"prosemirror-inputrules": "^1.2.0",
"prosemirror-keymap": "^1.2.0",
"prosemirror-model": "^1.18.0",
"prosemirror-schema-list": "^1.2.0",
"prosemirror-state": "^1.4.0",
"prosemirror-transform": "^1.6.0",
"prosemirror-view": "^1.26.0",
"prosemirror-model": "^1.18.1",
"prosemirror-schema-list": "^1.2.2",
"prosemirror-state": "^1.4.1",
"prosemirror-transform": "^1.7.0",
"prosemirror-view": "^1.28.0",
"tslib": "^2.4.0"
},
"nx": {
Expand Down
134 changes: 67 additions & 67 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 1f8c345

@vercel
Copy link

@vercel vercel bot commented on 1f8c345 Sep 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.