Skip to content

Fix MarkdownString false negatives on template 88: derender site URLs, fold typographic quotes - #52

Open
nk3750 wants to merge 2 commits into
ServiceNow:mainfrom
nk3750:fix-markdown-site-text
Open

nk3750 wants to merge 2 commits into
ServiceNow:mainfrom
nk3750:fix-markdown-site-text

Conversation

@nk3750

@nk3750 nk3750 commented Oct 20, 2026

Copy link
Copy Markdown

Tasks 562-566 check the committed README with MarkdownString, and on 1.2.3 a correct README cannot match:

  1. MarkdownString._normalize_string skips the URL derendering that the base class does first. The expected links are __REDDIT__/f/DIY/... and a committed README's are http://localhost:9999/f/DIY/..., so they never compare equal.
  2. The forum renders "GE Water Heater Pilot Light Won’t Stay Lit" with U+2019, and the expected README writes "Won't". NormalizedString already folds this through unidecode, but MarkdownString keeps U+2019.

One commit each: derender as the base class does, and fold U+2018, U+2019, U+201C and U+201D to ASCII. Five new tests in test_markdown_string.py, built from READMEs my runs committed for 564 and 562, fail before and pass after.

pytest -m "not docker" with CI's ignores: 5680 passed before, 5685 after, 6391 skipped. Ruff, ty and actionlint pass.

566 still fails for a separate reason (its two checks want different repository paths); issue to follow.

MarkdownString overrides _normalize_string to keep Unicode and case, and the
override also dropped the URL derendering that the base class does first. The
expected README of template 88 (tasks 562 to 566) writes its links with the
site template (__REDDIT__/f/DIY/...), while a committed README holds the
site's address (http://localhost:9999/f/DIY/...), so the content check could
not match a real commit. Derender the same way the base class does.
The forum renders the title "GE Water Heater Pilot Light Won't Stay Lit" with
a typographic apostrophe (U+2019), and an agent that copies the title from the
page commits it so; the expected README of tasks 562, 563, 565 and 566 writes
a straight one. MarkdownString keeps Unicode as is, so the content check fails
on that one character. Fold the four typographic quotes and apostrophes to
their ASCII forms, as NormalizedString already does through unidecode.

This branch has not been deployed

No deployments
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.

1 participant