Skip to content
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

Move Markdown to inside the compiler. #8115

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

asterite
Copy link
Member

The Markdown module is buggy and not feature complete. We shouldn't expose it in the standard library. For the compiler's purposes (crystal doc) it might be good but users should be encouraged to use a better library. Eventually the crystal doc tool should somehow use a different, better markdown library.

If with time we decide to improve it and make it feature complete and without bugs we could consider re-exposing it again. But right now this can't go like this in 1.0.

Related to #7463, #7009, #4613, #8113

The Markdown module is buggy and not feature complete.
We shouldn't expose it in the standard library. For the compiler's
purposes (`crystal doc`) it might be good but users should be encouraged
to use a better library. Eventually the `crystal doc` tool should
somehow use a different, better markdown library.
@asterite asterite added this to the 0.31.0 milestone Aug 26, 2019
@asterite asterite merged commit 491f26b into crystal-lang:master Aug 26, 2019
@asterite asterite deleted the hide-markdown branch August 26, 2019 12:04
@drujensen
Copy link
Contributor

This light markdown is very useful for simple cases i.e. doc generation. It's being used by Amber's html helpers. The reason given for hiding this was to encourage use of better libraries but the only one I see available is https://github.com/icyleaf/markd. It is a full featured common markdown but it is slow. What is the recommended replacement?

@asterite
Copy link
Member Author

asterite commented Sep 7, 2019

I would recommend trying to optimize markd. You can also use the internal. Markdown type, it will still work but it's not recommended.

@asterite
Copy link
Member Author

asterite commented Sep 7, 2019

Also if you tell me how it's slow I can try to optimize it because I like those problems.

@drujensen
Copy link
Contributor

drujensen commented Sep 7, 2019 via email

@asterite
Copy link
Member Author

asterite commented Sep 7, 2019

@drujensen I'm currently optimizing markd, it's fun :-)

So far I went from 11.21 times slower than std's Markdown to 5.40 times slower. It's still slower, but the gap is getting smaller. And I plan to continue optimizing. Of course it won't reach std's performance because std is incomplete and has bugs and implementing the missing stuff will make it slower.

In fact maybe we should eventually just move markd into the standard library somehow and use it for the docs.

@straight-shoota
Copy link
Member

In fact maybe we should eventually just move markd into the standard library somehow and use it for the docs.

-> #4613

bcardiff pushed a commit that referenced this pull request Sep 7, 2019
bcardiff pushed a commit that referenced this pull request Sep 10, 2019
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
omarroth pushed a commit to iv-org/invidious that referenced this pull request Sep 24, 2019
…te dependencies (#764)

* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
dnamsons pushed a commit to dnamsons/crystal that referenced this pull request Jan 10, 2020
The Markdown module is buggy and not feature complete.
We shouldn't expose it in the standard library. For the compiler's
purposes (`crystal doc`) it might be good but users should be encouraged
to use a better library. Eventually the `crystal doc` tool should
somehow use a different, better markdown library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants