Skip to content

feat(convert): integrate md4c for bidirectional markdown sync (Phase 1)#2945

Open
mandeepsingh2007 wants to merge 2 commits intoMoganLab:mainfrom
mandeepsingh2007:feature/markdown-md4c-integration
Open

feat(convert): integrate md4c for bidirectional markdown sync (Phase 1)#2945
mandeepsingh2007 wants to merge 2 commits intoMoganLab:mainfrom
mandeepsingh2007:feature/markdown-md4c-integration

Conversation

@mandeepsingh2007
Copy link

Description

This Pull Request introduces the foundational Phase 1 integration for the Advanced Markdown-to-TMU Bidirectional Sync feature, utilizing the highly performant md4c library.

As discussed, this initial PR focuses strictly on the build system integration and basic C++ plumbing to keep the review process focused and incremental.

Changes Made

  • Build System: Added md4c (C Markdown parser with GFM support) as a 3rd-party dependency in xmake.lua.
  • C++ Bindings: Created placeholder files markdown.hpp and markdown.cpp inside src/Data/Convert/Markdown/.
  • Input Pipeline Workflow: Updated texmacs_input_rep::markdown_flush in src/Data/Convert/Generic/input.cpp to call the native C++ markdown_to_tree adapter, successfully bypassing the legacy Scheme fallback layer.
  • Compatibility: Added a small patch to 3rdparty/s7/s7.h to fix a MSVC bool macro redefinition error affecting modern compilers during C builds.

Testing

  • Locally compiled on Windows using xmake.
  • Since the C parser is just a placeholder returning the raw text string wrapped in a document node, logic-heavy TMU mapping will be introduced in the upcoming (Phase 2) PR.

@mandeepsingh2007
Copy link
Author

@JackYansongLi please review this

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