ProseMirror / prosemirror-markdown

ProseMirror Markdown integration
https://prosemirror.net
MIT License
345 stars 81 forks source link

Update docs for how `getAttrs` works in the code #55

Closed Zoramite closed 1 year ago

Zoramite commented 3 years ago

In the code, the getAttrs is passed the token, tokens, and index, but the docs only specify the token as a valid argument.

https://github.com/ProseMirror/prosemirror-markdown/blob/master/src/from_markdown.js#L84

marijnh commented 3 years ago

These are intended to be internal. Did you need them for something specific in your code?

Zoramite commented 3 years ago

I am trying to do something like the ordered lists. I use typescript and the type definition will not allow 'unofficial' argument definitions for methods, only the official documented function calls. So I wanted to update the docs to match what is actually happening with the argument list.

marijnh commented 3 years ago

So you have a different kind of list, which needs a custom serializer, but you do need to implement markdown-style list tightness for it?