Skip to content

[pull] main from Milkdown:main#208

Merged
pull[bot] merged 1 commit into
code:mainfrom
Milkdown:main
May 11, 2026
Merged

[pull] main from Milkdown:main#208
pull[bot] merged 1 commit into
code:mainfrom
Milkdown:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 11, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

#2359)

* fix(crepe): preserve marks in AI selection for single-paragraph ranges

When the user selected text inside a single paragraph and ran an AI
action (e.g. Translate), the selection passed to the provider lost its
bold / italic / link marks. `topNodeType.createAndFill` rejects inline
content as direct doc children, so the code fell through to
`doc.textBetween`, which returns plain text. Multi-block selections
were unaffected because the slice content is block-level and wraps
cleanly into a doc node.

Wrap inline-only slice content in a paragraph node before serializing,
so the markdown serializer can emit `**bold**`, `*italic*`, links, etc.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators May 11, 2026
@pull pull Bot added the ⤵️ pull label May 11, 2026
@pull pull Bot merged commit 1806ea6 into code:main May 11, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant