-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
3.0.0 AstRender is gone? #349
Comments
I guess you're in your rights to remove a class from your library, but at the very least that documentation is confusing. If someone wants the AST, passing None to the renderer and getting back an HTML string is not a similar solution, it is a unrelated solution to an unrelated problem. If all I have is an HTML string, I'd have to run it through Beautiful Soup or the like to get an AST again. Mistune used to be a library where you could get an Abstract Syntax Tree, as compared to libraries that go directly from markdown to HTML. Is the intention that the AST is to be a 3rd party plugin? |
@matthewdeanmartin If you pass >>> import mistune
>>> md = mistune.create_markdown(renderer=None)
>>> md('hello **world**')
[{'type': 'paragraph', 'children': [{'type': 'text', 'raw': 'hello '}, {'type': 'strong', 'children': [{'type': 'text', 'raw': 'world'}]}]}] |
Would you mind if I created a merge request to make "ast" a synonym for None? I can't easily explain why, but Also, if |
@matthewdeanmartin yeah. It would be ok to alias |
If I set the renderer to "ast", it will attempt to treat the string "ast" as a class.
If I set renderer to None as shown here I get an HTML Render.
The 3.0.0 documentation still mentions the AstRenderer/"ast" parameter.
The text was updated successfully, but these errors were encountered: