Skip to content

fix(submit): handle emoji sequences, ?!, .git.git and ### in descriptions - #203

Merged
jamesconwaydev merged 1 commit into
devstreamhq:mainfrom
foothillsdigital:fix/description-edge-cases
Nov 6, 2026
Merged

jamesconwaydev merged 1 commit into
devstreamhq:mainfrom
foothillsdigital:fix/description-edge-cases

Conversation

@foothillsdigital

Copy link
Copy Markdown
Collaborator

What and why

Closes #48. One fix per bullet in the issue:

  • ZWJ family emoji. _strip_invisible keeps a U+200D that sits between two emoji (a variation selector before it is fine). The run check counts a joined emoji as part of the one before it, so 👨‍👩‍👧 is one emoji, not three. A ZWJ anywhere else is still stripped, so it can't split a blocked word. The stored text re-cleans to itself, so validate_data agrees.
  • ?!?! at the end. A trailing punctuation run that has a ? now ends in a single ?, and anything else still ends in .. So "Why write YAML by hand?!?!" becomes "Why write YAML by hand?", and "Toolkit!!!" still becomes "Toolkit.". This also changes a plain trailing ?, which used to become .. Say if you'd rather keep the full stop everywhere and just collapse the run.
  • owner/repo.git.git is rejected as a bad link. The first .git is now stripped case-insensitively, and a second one fails, since GitHub never names a repo that way.
  • ### Repository in a description. In the form, ### Checklist always comes right after ### Description. If any other heading comes first, it was typed into the answer, and the submitter now gets "Your description has a line starting with ###, which cuts it short." Extra headings after the checklist are still ignored, as test_extra_and_duplicate_headings expects. Reports are unchanged.

Every new test fails on main and passes here.

Checks

  • The PR title follows Conventional Commits
  • python3 -m unittest discover -s scripts -t . passes
  • npm --prefix site test passes (if you touched site/)
  • npx prettier --check . passes
  • This doesn't edit data/entries.json by hand (submissions go through the form)

…ions

A zero-width joiner between two emoji now survives the invisible-
character strip and the joined sequence counts as one emoji, so a
family emoji no longer counts as three in a row.

A trailing run of punctuation that has a question mark now ends in
one ?, so a question stays a question. Anything else still ends in a
full stop.

A repo link ending in .git.git is rejected; GitHub never names a repo
that way.

A ### line typed into the description used to cut it short without a
word. The submitter now gets an error that says so.

@jamesconwaydev jamesconwaydev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Keeping the ZWJ only between two emoji means it still can't split a blocked word. I'm happy for a trailing question mark to stay a question mark.

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.

Tidy the description cleaner's edge cases

2 participants