-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeMirror implementation of GraphNodeComment #11585
Conversation
Also: - Separate parser for our flavor of Markdown from the CodeMirror integration; move the parser into ydoc-shared and use for Markdown line-wrapping. - Introduce our own version of yCollab extension; initially just the upstream version translated to Typescript and our code style. - Refactor CodeEditor.
Also a little refactoring in preparation for new implementation.
Eliminates Lexical dependency. Stacked on #11575 and #31607.
This reverts commit 7431384.
This reverts commit 7431384.
{ | ||
markdown: '[Link text](<https://www.example.com/index.html>)', | ||
expectedLinks: [ | ||
{ | ||
text: 'Link text', | ||
href: 'https://www.example.com/index.html', | ||
}, | ||
], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may consider adding cases for:
- Link with spaces and <>
- Link with spaces without <> (invalid case)
Or we may assume that those cases in image are sufficient. But then I would consider moving them here, as "link" seems to me more basic that images.
'(a@b.cd)', | ||
], | ||
neither: [ | ||
'https://💩.la/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
@@ -48,7 +49,7 @@ export function AssetDocsContent(props: AssetDocsContentProps) { | |||
|
|||
for (const statement of module.statements()) { | |||
if (statement instanceof ast.MutableFunctionDef && statement.name.code() === 'main') { | |||
return statement.documentationText() ?? '' | |||
return normalizedMarkdownToStandard(statement.mutableDocumentationMarkdown().toJSON()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we turn this into a json? We expect a md string to parse it and display
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toJSON
method of Y.Text
returns the unformatted text content as a string
.
Pull Request Description
CodeMirror-based implementation of GraphNodeComment; removes Lexical dependency.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.