Expose English isolation in harper.js and browser extension - #3669
Merged
elijah-potter merged 1 commit intoJun 29, 2026
Merged
Conversation
Collaborator
|
Would you please use our PR description template? Thank you! |
Contributor
Author
|
sorry ! its updated now. |
Contributor
Author
elijah-potter
approved these changes
Jun 29, 2026
elijah-potter
left a comment
Collaborator
There was a problem hiding this comment.
I apologize for the time it took for me to get to reviewing this.
This looks great! I, surprisingly, have no notes. Thank you!
For those reading this, please note that our isolation of English is somewhat untested and likely to have issues. Please let us know if you encounter any.
| pub fn organized_lints( | ||
| &mut self, | ||
| text: String, | ||
| fn create_lint_parser( |
Comment on lines
+568
to
+573
| fn create_lint(lint: harper_core::linting::Lint, source: &[char], language: Language) -> Lint { | ||
| let problem_text = lint.get_str(source); | ||
| let span = Into::<Span>::into(lint.span).to_js_indices(source); | ||
|
|
||
| Lint::new(lint, span, problem_text, language) | ||
| } |
|
@elijah-potter this PR resolves both #3271 and #2915. Could you please close them to avoid confusion? |
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.

Issues
Closes #3364
Description
This exposes Harper's existing English-isolation/language-detection behavior to
harper.jsand the browser extension.It adds an
isolateEnglishlint option, wires it through the wasm lint paths, and adds a browser extension setting so users can skip text Harper detects as non-English. The extension also includes the option in lint caching so toggling the setting produces fresh results.Demo
No demo attached. The UI change is a small checkbox in the extension options page.
How Has This Been Tested?
harper.jslinter tests: 200 tests passed.harper.js,components,lint-framework, and the Chrome extension.just formatstill fails on pre-existing Chrome fixture a11y issues unrelated to this change.AI Disclosure
If Your PR Implements or Enhances a Linter
N/A; this exposes an existing language-isolation behavior rather than adding or changing a linter.
Checklist