Make automatic quote substitution configurable - #174
Closed
davidwkeith wants to merge 2 commits into
Closed
davidwkeith wants to merge 2 commits into
davidwkeith wants to merge 2 commits into
Conversation
Adds SpellCheckingPolicy.automaticQuoteSubstitution (default true — behavior unchanged for existing embedders). Markdown-source embedders can now keep straight quotes; previously isAutomaticQuoteSubstitutionEnabled was hard-coded on in NativeTextViewWrapper and the autocorrect suppress-zone restore path.
Add default-value and custom-init coverage, and a CHANGELOG entry, for the automaticQuoteSubstitution toggle.
This was referenced Sep 3, 2026
davidwkeith
added a commit
to Anglesite/Anglesite
that referenced
this pull request
Sep 3, 2026
…1841) The comment only documented one of the fork's two patches on top of v0.10.0. Records both, the upstream PR for the quote-substitution patch (nodes-app/swift-markdown-engine#174), the drop condition, and the deliberate-bump rebase policy. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks done
Member
|
Closing in favour of #189, which adds the same |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
SpellCheckingPolicy.automaticQuoteSubstitution, mirroringNSTextView.isAutomaticQuoteSubstitutionEnabledalongside the existingcontinuousSpellChecking/grammarChecking/automaticSpellingCorrectiontoggles. Previously
isAutomaticQuoteSubstitutionEnabledwas hard-coded totrueinNativeTextViewWrapperand in the autocorrect suppress-zonerestore path, with no way for an embedder to turn it off.
Some Markdown sources need straight quotes preserved throughout — frontmatter,
code-adjacent prose, anywhere automatic curly-quote substitution would
silently corrupt the source text. This came up integrating the engine into
an app that edits Markdown files directly on disk.
Defaults to
true, so existing embedders see no behavior change.Test plan
swift buildswift test --filter SpellCheckingPolicyTests— new coverage for thedefault value and for setting it independently of the other toggles
CHANGELOG.mdentry under[Unreleased]