Invisible-character references: follow-ups from the #176 review

Open
#61 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
backend

Research direction

Start with Chars.JoinsEmoji, Chars.IsInvisible, and AttributeBlock.cs, then inspect the spec list and relevant unit tests. Add coverage for the listed Unicode cases and extend ModelGenerator's character pool for round-trip fuzzing. Done means the implementation and spec agree, the requested cases are tested, and round-trip checks cover the new paths.

Written by the indexing model from the issue text.

Description

textediting

Leftover review findings from sillsdev/SIL.TextEditing#176 (invisible characters as references). None loses data; all round-trip.

  1. Chars.JoinsEmoji ranges are approximate. 🙂‍↔️ (U+1F642 ZWJ U+2194 FE0F) gets ‍ because U+2194 is outside the ranges; ⌀‍⌀ (U+2300 ZWJ U+2300) stays literal because 2300–23FF is included. Use the Extended_Pictographic property (a generated table) instead of block ranges.
  2. Completeness of Chars.IsInvisible. Consider U+206A–206F (deprecated format), U+FFF9–FFFB (interlinear annotation), U+17B4/17B5 (Khmer inherent vowels), the Hangul fillers U+115F, U+1160, U+3164, U+FFA0, and the Mongolian free variation selectors U+180B–180D. Spec list and code must change together.
  3. Attribute values and destinations keep invisibles literal, and NBSP there is still   (only a leading white-space character is a reference, AttributeBlock.cs). Decide whether attribute values follow the text rule.
  4. Tests: unit tests for JoinsEmoji (ZWJ at either end, lone surrogates, skin tone and FE0F before ZWJ, a ZWJ between emoji split across two runs); invisibles and NBSP in a table cell and a heading and next to */_; numeric mode; and add ZWSP, ZWJ, SHY, bidi marks and an emoji ZWJ sequence to ModelGenerator's character pool so the round-trip fuzz reaches the new paths.
  5. Design note: Persian and Indic text with many ZWNJ/ZWJ will now show many ‌/‍. Intentional (owner decision, sillsdev/motif#58); revisit if users find it noisy, for example with a "show invisibles" view in the source pane.

🤖 Generated with Claude Code

Dominant language
C#
Stars
1
Forks
0
Avg merge
3h 55m
Merged PRs (30d)
36

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sillsdev/motif

All issues in sillsdev/motif

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.