-
Notifications
You must be signed in to change notification settings - Fork 55
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
Public API for accessing the generated AST #109
base: master
Are you sure you want to change the base?
Conversation
I'll have to review this and see if I want to merge (at the risk of making it more difficult to stay in sync with the original peg-markdown), or leave this is a separate fork? It's definitely a valuable feature for some developers |
This prevents compiler issues in Xcode 4.4
Signed-off-by: Max Seelemann <[email protected]>
Signed-off-by: Max Seelemann <[email protected]>
Signed-off-by: Max Seelemann <[email protected]>
Signed-off-by: Max Seelemann <[email protected]>
I would love to see this implemented. Writing scientific papers with multimarkdown is fantastic, but there are some features that are desperately needed, like multiple images in a figure, or equation labeling. However, I understand that not enough people need them to be added to the standard language. Recently Pandoc moved from exposing the AST to exporting a JSON document. Maybe this could be a simpler path for Multimarkdown as well. |
I suspect most of these things can be done via a latex-include file that redefines some of the standard commands. Right now I'm working on an iOS version of Composer and a complete rewrite of the Mac version. Adding something this big to MMD, and doing the testing it would take is not something I'm going to have time to do for quite a while. I'm not ruling it out entirely, but I've got too much else going on to do this right now. |
Signed-off-by: Götz Fabian <[email protected]>
Signed-off-by: Max Seelemann <[email protected]>
Conflicts: MultiMarkdown.xcodeproj/project.pbxproj markdown_lib.c markdown_lib.h markdown_output.c markdown_peg.h utility_functions.c
Updates To Table Parsing
Improve Handling Of Natural Cell Alignment
Convert to Universal Framework
Allow use of $ and $$ for math
ULYSSES-17280 Fix: Markdown: Ignore equation tags containing whitespace
Parse comments and deletions
For several applications, it is useful to operate directly on the AST instead of only generating a string output.
I've created a fork that has an API "markdown_to_ast" that allows to access the generated AST. This API is accessible through a separate header "markdown_parser_lib.h" that exposes the AST data structures to the public. A further API "markdown_free_ast" can be used to clean up the operations. For compatibility reasons, I've left out the "typedef struct Link link", thus it becomes easier to use your library in UNIX systems.
I've also adapted "markdown_lib.c" such that "markdown_to_gstring" utilizes the "markdown_to_ast" function.
(I've also did some minor changes to remove warnings and updated the XCode project for XCode 4.3)