-
Notifications
You must be signed in to change notification settings - Fork 1
fix: formatting buttons applies to entire paragraph #338
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
Merged
vitonsky
merged 24 commits into
master
from
337-formatting-buttons-applies-to-entire-paragraph
Jul 6, 2026
Merged
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ffd5bb9
test: organize tests
vitonsky 45bc10e
fix: use native formatting
vitonsky c46fa9f
feat: normalize ast
vitonsky 1577447
test: formatting in table cell
vitonsky a8d05d0
refactor: universal formatting lifter
vitonsky 6cf63a3
refactor: move remark plugins
vitonsky a25ef10
refactor: organize nodes lifting
vitonsky 092c237
test: cases for format lifting
vitonsky 007d282
test: formatting in blocks
vitonsky b281ecb
fix: group all siblings with the equal formatting
vitonsky 22ca247
test: update rich editor tests
vitonsky 784b4a7
chore: move rich editor tests
vitonsky 709e3de
chore: organize tests
vitonsky b7cd3d0
chore: organize tests
vitonsky 76ae1da
chore: organize tests
vitonsky 179447c
test: query correct element
vitonsky 54f4300
chore: remove FormattingNode plugin
vitonsky ba4ce15
feat: support inline code with formatting
vitonsky e2fda43
test: cases for sync context
vitonsky f2e941b
test: add example for async context
vitonsky 3dd23ff
fix: nested formatting
vitonsky b39d1c4
chore: add await
vitonsky 17857e2
chore: clean code
vitonsky 17a409a
fix: optimize AST for heading
vitonsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...p/src/features/NoteEditor/RichEditor/plugins/Markdown/__tests__/markdown-samples/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/app/src/features/NoteEditor/RichEditor/plugins/Markdown/createSyncContext.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| export const createSyncContext = <T>(defaultValue: T) => { | ||
| let context: { current: T } | null = null; | ||
|
|
||
| const get = () => (context ? context.current : defaultValue); | ||
| const use = <R = void>(value: T, callback: () => R) => { | ||
| // Set context | ||
| const currentContext = context; | ||
| context = { current: value }; | ||
| try { | ||
| return callback(); | ||
| } finally { | ||
| // Restore previous context | ||
| context = currentContext; | ||
| } | ||
| }; | ||
|
|
||
| return { get, use }; | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.