Skip to content

Conversation

@elijah-potter
Copy link
Collaborator

Issues

Fixes #2098

Description

When Harper's core engine (Rust) needs to interact with the ProseMirror editor embedded inside Obsidian, it needs to convert between Unicode scalar values and UTF-16 code points. The spans did not go along with this properly. I've gone ahead and reworked the conversion.

How Has This Been Tested?

Manually + additional unit tests.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@elijah-potter elijah-potter added the obsidian-plugin Related to the Harper Obsidian integration label Oct 23, 2025
@elijah-potter
Copy link
Collaborator Author

After further consideration, I've come to the conclusion that bug resides deeper, inside harper-wasm, and therefore also affects the Chrome extension. I've made fixes accordingly.

@elijah-potter elijah-potter merged commit aeb303b into master Oct 24, 2025
17 checks passed
@elijah-potter elijah-potter deleted the fix-obsidian-indexing branch October 24, 2025 14:26
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.68.0` -> `v0.70.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>Automattic/harper (Automattic/harper/harper-ls)</summary>

### [`v0.70.0`](https://github.com/Automattic/harper/releases/tag/v0.70.0)

[Compare Source](Automattic/harper@v0.69.0...v0.70.0)

#### What's Changed

- fix(chrome-ext): use Harper-specific HTML tag to avoid CSS conflicts by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2101](Automattic/harper#2101)
- feat(ls): add lint origin tags to the diagnostics by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2102](Automattic/harper#2102)
- fix(chrome-ext): don't override with activation from WordPress page by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2103](Automattic/harper#2103)
- fix(obsidian): problems when converting from Rust char indexes by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2104](Automattic/harper#2104)
- fix(obsidian): store user dictionary in sorted order by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2106](Automattic/harper#2106)
- feat(obsidian): add method to ignore all errors in file by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2105](Automattic/harper#2105)

**Full Changelog**: <Automattic/harper@v0.69.0...v0.70.0>

### [`v0.69.0`](https://github.com/Automattic/harper/releases/tag/v0.69.0)

[Compare Source](Automattic/harper@v0.68.0...v0.69.0)

#### What's Changed

- feat(core): create new rule for detecting missing nouns by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2023](Automattic/harper#2023)
- docs(integrations): fix `ignoredLintsPath` and add `excludePatterns` in sample configs by [@&#8203;mcecode](https://github.com/mcecode) in [#&#8203;2097](Automattic/harper#2097)
- build(deps): bump lru from 0.16.1 to 0.16.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2092](Automattic/harper#2092)
- build(deps): bump indexmap from 2.11.4 to 2.12.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2095](Automattic/harper#2095)
- build(deps): bump bitflags from 2.9.4 to 2.10.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2093](Automattic/harper#2093)
- feat: add jjdescription parser by [@&#8203;Tijs-B](https://github.com/Tijs-B) in [#&#8203;2082](Automattic/harper#2082)
- build(deps): bump tokio from 1.47.1 to 1.48.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2091](Automattic/harper#2091)
- build(deps): bump globset from 0.4.16 to 0.4.17 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2094](Automattic/harper#2094)
- feat(core): add `threw` as a suggestion by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2088](Automattic/harper#2088)
- refactor(web): build out feedback mechanisms  by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2069](Automattic/harper#2069)
- feat(core): more rules by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2090](Automattic/harper#2090)

#### New Contributors

- [@&#8203;Tijs-B](https://github.com/Tijs-B) made their first contribution in [#&#8203;2082](Automattic/harper#2082)

**Full Changelog**: <Automattic/harper@v0.68.0...v0.69.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTcuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE1Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

obsidian-plugin Related to the Harper Obsidian integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emojis in notes cause Obsidian plugin spell checker to mis-replace misspelled words due to incorrect text offset calculation

2 participants