Skip to content

Preserve node metadata when duplicating - #28

Merged
samuel-williams-shopify merged 2 commits into
mainfrom
fix-node-dup
Sep 9, 2026
Merged

samuel-williams-shopify merged 2 commits into
mainfrom
fix-node-dup

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the serialize-and-reparse implementation of Markly::Node#dup with native structural cloning. This preserves inline code language information, source metadata, table extension state, and other node properties while producing an independent tree.

Uses the cloning support merged in socketry/cmarkly#3.

Testing

  • COVERAGE=PartialSummary bundle exec bake test
  • bundle exec bake decode:index:coverage lib
  • git ls-files "*.rb" | rg -v "^cmark-gfm/" | xargs bundle exec rubocop
  • make test in cmark-gfm

Assisted-By: devx/7ef83274-928f-499d-b668-48449b1ff60e
Assisted-By: devx/7ef83274-928f-499d-b668-48449b1ff60e
@samuel-williams-shopify
samuel-williams-shopify merged commit ace3656 into main Sep 9, 2026
24 of 28 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the fix-node-dup branch September 9, 2026 05:01
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