Skip to content

implement parser_fork.c #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Lakr233
Copy link

@Lakr233 Lakr233 commented May 27, 2025

This pull request introduces a new feature to enable deep copying of a cmark_parser object, allowing the creation of independent parser forks.

@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 11:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements a new feature to deep copy a cmark_parser object, allowing independent parser forks.

  • Adds a new header (parser_fork.h) and source (parser_fork.c) file with functionality to duplicate parser state.
  • Registers the new fork API in the public header (cmark-gfm.h) for use in streaming mode.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/parser_fork.h Introduces the fork API with proper C/C++ extern wrappers.
src/parser_fork.c Implements deep copying of parser trees, reference maps, and associated buffers.
src/cmark-gfm.h Exposes cmark_parser_fork in the public API.

@Lakr233 Lakr233 force-pushed the add-parser-fork-gfm branch from 188e9e5 to babf7e7 Compare May 27, 2025 12:04
Lakr233 and others added 2 commits May 27, 2025 20:05
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