Skip to content

Render entities in wikilink titles#680

Merged
srid merged 1 commit intomasterfrom
fix-wikilink-html-entities
Apr 27, 2026
Merged

Render entities in wikilink titles#680
srid merged 1 commit intomasterfrom
fix-wikilink-html-entities

Conversation

@srid
Copy link
Copy Markdown
Owner

@srid srid commented Apr 27, 2026

Wikilink custom titles now decode HTML entities the same way regular Markdown link labels do. This fixes cases like [[note|Spivak (2014)]], which previously rendered the entity text literally in the visible title. Closes #441.

The parser fix landed upstream in commonmark-wikilink via srid/commonmark-wikilink#9, and this branch now pins Emanote to the merged master commit e47ba49. The upstream package was prepared as 0.3.0.0, and vira ci passed there on the final PR head.

The changelog records the user-visible bug fix, and the smoke fixture now exercises both live and static rendering paths for the entity-bearing wikilink title.

Generated by /do on Codex (model gpt-5).

Try it locally

nix run github:srid/emanote/fix-wikilink-html-entities

@srid
Copy link
Copy Markdown
Owner Author

srid commented Apr 27, 2026

Hickey/Lowy Analysis

No findings.

Hickey: The change keeps the Emanote side simple: it pins the parser dependency, adds one narrow fixture, and checks the rendered link HTML without adding a parallel parsing path or extra abstraction.

Lowy: The volatility boundary remains in the right place. Entity decoding behavior belongs to commonmark-wikilink; Emanote only consumes the fixed parser and records the user-facing regression.

@srid
Copy link
Copy Markdown
Owner Author

srid commented Apr 27, 2026

Evidence

Wikilink entities rendering

This demonstrates wikilink-entities.html rendering the wikilink title as Spivak (2014) with the non-breaking space preserved.

@srid srid marked this pull request as ready for review April 27, 2026 01:51
@srid srid force-pushed the fix-wikilink-html-entities branch from 8018d56 to 9a2fd47 Compare April 27, 2026 01:56
@srid srid merged commit a5fcedd into master Apr 27, 2026
5 checks passed
@srid srid deleted the fix-wikilink-html-entities branch April 27, 2026 01:59
@srid
Copy link
Copy Markdown
Owner Author

srid commented Apr 27, 2026

/do results

Step Status Duration Verification
sync 0s git fetch ok; forge=github; noGit=false
research 5m 30s Issue #441 traced to commonmark-wikilink pWikilink using untokenize for titles and token-level # splitting for references; Emanote consumes commonmark-wikilink via flake.nix input and haskell-flake package source override.
branch 18s Created feature branch fix-wikilink-html-entities from origin/master.
implement 5m 58s Merged commonmark-wikilink PR #9 upstream, locked Emanote to merged commonmark-wikilink master commit e47ba49, and added an e2e smoke regression for wiki link custom title entities.
check 1m 18s nix develop -c cabal build all completed successfully against merged commonmark-wikilink 0.3.0.0 input e47ba49.
docs 22s Updated emanote/CHANGELOG.md Unreleased bug fixes; README.md and docs/ did not need changes for this parser bug.
fmt 15s just fmt completed: cabal-fmt, fourmolu, hlint, and nixpkgs-fmt passed.
commit 11s Final commit 9a2fd47 created and pushed to origin/fix-wikilink-html-entities.
hickey+lowy 2m 41s Hickey and Lowy sub-agents both produced reviews; no actions or deferrals.
police 1m 12s code-police pass clean: rules, fact-check, and elegance found no issues.
test 1m 21s just e2e-live, just e2e-static, and just e2e-morph were rerun in parallel on final HEAD 9a2fd47 and all passed; the wikilink entities regression scenario passed in all modes.
create-pr 33s Created draft PR #680, updated it after dependency PR merge, and posted Hickey/Lowy no-findings analysis comment.
ci 16m 35s Emanote vira ci passed for final HEAD 9a2fd47 with x86_64-linux and aarch64-darwin signoffs. just e2e-live, just e2e-static, and just e2e-morph passed in parallel on final HEAD.
evidence 11s Posted Evidence comment to #680 (comment) with uploaded screenshot https://github.com/srid/emanote/releases/download/evidence-assets/emanote-evidence-wikilink-entities.png.
dependency-pr 0s Dependency PR srid/commonmark-wikilink#9 was updated with a one-line PR-linked changelog and cabal version 0.3.0.0, had Hickey/Lowy and Code Police no-findings comments posted, was merged into master as e47ba49, and had vira ci passing on final branch head ea1e594.
Total 38m 38s

Slowest step: ci (16m 35s)

Optimization suggestions

  • CI dominated the run; for follow-up-only changes on this PR, restart from the CI/e2e part instead of replaying the earlier research and implementation steps.
  • The dependency PR changed after the Emanote PR was already opened, which forced a relock and another CI pass. For future dependency-backed fixes, finish dependency changelog/version/review/CI before opening the downstream PR.
  • Keep the three e2e modes parallelized as in the final rerun; that kept the full e2e verification to roughly the slowest single mode instead of the sum of all three.

Workflow completed at 2026-04-27T02:01:10Z.

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.

HTML entities do not work in wiki link custom title

1 participant