-
Notifications
You must be signed in to change notification settings - Fork 326
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
Documentation editor: Code block support and block format status #12406
Conversation
🧪 Storybook is successfully deployed!📊 Dashboard:
|
/* | ||
{ // FIXME | ||
source: '# *Formatted header*', | ||
expected: [ | ||
'Document', | ||
[ | ||
'ATXHeading1', | ||
['HeaderMark', '# '], | ||
['Emphasis', ['EmphasisMark', '*'], ['EmphasisMark', '*']], | ||
], | ||
], | ||
}, | ||
*/ |
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.
What is to be fixed here? Do we have a task for it?
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.
Fixed it.
* selected range. | ||
*/ | ||
export function canInsertCodeBlock(_state: EditorState): boolean { | ||
// TODO: Disable button when the cursor is already inside an unformattable block. |
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.
TODO left - when we would fix that?
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.
Implemented a solution that covers most cases.
app/gui/src/project-view/components/MarkdownEditor/codemirror/formatting/inline.ts
Show resolved
Hide resolved
New features: - New button: Insert code block. Inserts a code block after the cursor, or converts the selected text to a code block. - Block type menu now shows current type. Bug fixes: - Fix: In a multiline block quote, the space was not included as part of the delimiter except when parsing the first line. - Fix: Fenced code block delimiters were not shown when the cursor was inside the block. - Fix: Inline formatting now respects block-formatting delimiters. - Fix: Formatting controls were enabled inside code blocks. - Fix: Inline-formatted text within list items was not rendered.
6f72e6b
to
689435b
Compare
New features:
Gravacao.do.ecra.2025-03-03.as.15.45.12.mov
Bug fixes:
Fixes #11970
Pull Request Description
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.