feat: add HWPX fragment paste support#950
Open
dragonnite1221-lgtm wants to merge 2 commits into
Open
Conversation
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.
Adds HWPX fragment paste support, WASM bridge APIs, rhwp-studio insertion UI, bundled example yangsik fragments, and regression tests.
This is a follow-up to closed PR #880 and addresses the review feedback there.
Architecture note
This PR intentionally keeps two paste boundaries because they serve different safety contracts.
pasteHwpxFragmentRaw/fragment_paste.rsis the raw XML primitive. It performs byte-preserving section/header edits and owns HWPX ID remapping for raw snippets.pasteHwpxFragmentInDocument/fragment_paste_in_document.rsis the editor-facing bridge. It reuses the raw XML primitive, then reparses the updated section back intoDocumentCoreso rendering and later edit commands stay in sync.cross_document_migrate.rsis the IR migration primitive for future structured cross-document copy/paste. It stays separate from the raw HWPX fragment path because it operates onDocument/DocInfoIR, not byte-preserved HWPX XML. The convergence point is the command/API layer: raw HWPX fragments use the byte-preserving path now; structured IR copy/paste can use the migration primitive when that workflow is exposed.Review follow-up
origin/devel.as anycall by using the generated WASM binding type forpasteHwpxFragmentInDocument.saved/04-blank_hwpx_empty.hwpx.saved/04-blank_hwpx_empty.hwpx.build_occupied_setshelper.rhwp-studio/public/yangsik-fragments/so the dialog is non-empty and end-to-end testable by maintainers.양식 부품command to HWPX documents; HWP5 documents do not expose this unsupported XML-fragment operation.Validation
cargo test --test fragment_paste_integration --test fragment_paste_in_documentcargo test fragment_pastecd rhwp-studio && npm run buildgitleaks detect --source . --log-opts origin/devel..HEAD --redact --no-banner --verbosebasic-two-cell-table.xmlreturns200404