Skip to content

fix(kiritan): keep front matter first in the fallback sidecar, and match kiritan:hash strictly - #55

Merged
otnc merged 1 commit into
mainfrom
fix/kiritan-sidecar-marker-after-frontmatter
Sep 19, 2026
Merged

otnc merged 1 commit into
mainfrom
fix/kiritan-sidecar-marker-after-frontmatter

Conversation

@otnc

@otnc otnc commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix bug(s)
  • New feature(s)
  • Others

Follow-up to #49 and #50, from Copilot's review of #49 plus my own re-review.

  • The missing-sidecar fallback prepended <!-- kiritan:untranslated ... --> before the source, so a source starting with front matter was no longer parsed as front matter and its metadata could be interpolated/reformatted. The marker now goes after the front matter. There is an integration test through build.
  • After feat(kiritan): resolve a renderer per source and wire plugins.renderers #50, extractHashComment matched kiritan:hash <hex> anywhere, so the same words in prose or a code sample could be read as a marker and flag a translation as stale. The pattern is now derived from the renderer's own comment (HTML comment for Markdown, {/* */} for MDX), and check/translate pass it in.

Why?

Both are regressions that came in with the front matter and renderer work.

Related issue(s)

closes

Check

  • Check if duplicate PR(s) already exist.
  • Read CONTRIBUTING.md (rules)
  • Run npm run check (lint & format)
  • Run npm run typecheck
  • Run npm run test (functions test)
  • Run npm run build (dist/)
  • (optional) Run npm run test:coverage and check nothing new went uncovered

…atch kiritan:hash only in the renderer's own comment syntax
@otnc
otnc merged commit a861a30 into main Sep 19, 2026
4 checks passed
@otnc
otnc deleted the fix/kiritan-sidecar-marker-after-frontmatter branch September 19, 2026 11:20
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