serialize missing marks to plain text #122

Closed
BrianHung wants to merge 1 commit from missing-marks-plain-text into master
BrianHung commented 2024-05-18 09:49:48 +02:00 (Migrated from github.com)

I have some custom marks that don't have a good markdown equivalent (textColor, fontFamily, etc).

Instead of manually creating an empty string open and close for each of them, it would be easier to assume that for missing marks, we have that as the default instead of erroring.

I have some custom marks that don't have a good markdown equivalent (textColor, fontFamily, etc). Instead of manually creating an empty string open and close for each of them, it would be easier to assume that for missing marks, we have that as the default instead of erroring.
marijnh commented 2024-05-18 10:38:46 +02:00 (Migrated from github.com)

See discussion in #123

See discussion in #123
BrianHung commented 2024-05-18 11:37:54 +02:00 (Migrated from github.com)

Should maybe intentionally throw an error here if mark is missing, like with nodes. Right now it throws

Uncaught TypeError: Cannot read properties of undefined (reading 'escape')

https://github.com/ProseMirror/prosemirror-markdown/pull/122/files#diff-acb372925fbae965051b46d463f48d21b25b28aab81f74d458cf5ce355b8c154L317-R318

Should maybe intentionally throw an error here if mark is missing, like with nodes. Right now it throws ``` Uncaught TypeError: Cannot read properties of undefined (reading 'escape') ``` https://github.com/ProseMirror/prosemirror-markdown/pull/122/files#diff-acb372925fbae965051b46d463f48d21b25b28aab81f74d458cf5ce355b8c154L317-R318

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-markdown!122
No description provided.