feat: resolve Ghostwriter richtext-evidence divs to inline images#4
Open
TheGr3atJosh wants to merge 2 commits into
Open
feat: resolve Ghostwriter richtext-evidence divs to inline images#4TheGr3atJosh wants to merge 2 commits into
TheGr3atJosh wants to merge 2 commits into
Conversation
Ghostwriter's TinyMCE stores inline evidence as:
<div class="richtext-evidence" data-evidence-id="N"></div>
The previous resolver only handled the older {{.friendly_name}} tag
syntax, which is not emitted by current Ghostwriter versions. This
caused inline evidence to silently disappear from rendered PDFs.
Changes:
- _build_evidence_index now returns two indexes: by friendly_name and
by numeric id, built in a single JSON walk
- _resolve_richtext_evidence replaces richtext-evidence divs with
<figure><img><figcaption> using the id-based index
- Both resolvers run sequentially per field in make_vue_data; the
{{.name}} resolver is kept for backwards compatibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<div class="richtext-evidence" data-evidence-id="N"></div>(numeric ID), not the older{{.friendly_name}}tag syntax — causing inline evidence to silently disappear from rendered PDFs_build_evidence_indexnow returns two indexes in a single JSON walk: byfriendly_name(for legacy{{.name}}tags) and by numericid(for richtext-evidence divs)_resolve_richtext_evidencereplaces richtext-evidence divs with<figure><img><figcaption>using the id-based index; the existing{{.name}}resolver is kept for backwards compatibilitymake_vue_dataTest plan
🤖 Generated with Claude Code