Skip to content

normalize eol for monaco client as well.#195

Open
jonah-iden wants to merge 1 commit intomainfrom
jiden/fix-monaco-client-eol-issue
Open

normalize eol for monaco client as well.#195
jonah-iden wants to merge 1 commit intomainfrom
jiden/fix-monaco-client-eol-issue

Conversation

@jonah-iden
Copy link
Copy Markdown
Contributor

Same as we are doing in the vscode extension

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Normalizes end-of-line sequences when resyncing Yjs text into a Monaco ITextModel, aligning Monaco client behavior with the existing VS Code extension approach and preventing spurious full-document updates caused solely by EOL differences.

Changes:

  • Apply EOL normalization when computing resync content from yjsText.toString() for Monaco models.
  • Introduce a small adjustEol helper to map text to the model’s EndOfLineSequence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@jbicker jbicker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants