-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Docs cleanup #3759
Docs cleanup #3759
Conversation
I'd rather see "consistently use indented code blocks". It's a waste of 2 lines every time otherwise :/ |
@BlaXpirit indented code block are not being processed by formatter tool. |
I think I've also found a bug in markdown parser. It's visible in the docs for String#new, String#encode or String#to_f methods, where final code block is being chopped. It always happens when code block is placed immediately after a list. Below is failing test showing buggy behaviour: diff --git a/spec/std/markdown/markdown_spec.cr b/spec/std/markdown/markdown_spec.cr
index 33fea905e..270ea324f 100644
--- a/spec/std/markdown/markdown_spec.cr
+++ b/spec/std/markdown/markdown_spec.cr
@@ -79,6 +79,7 @@ describe Markdown do
assert_render "* Level1\n * Level2\n * Level2", "<ul><li>Level1</li><ul><li>Level2</li><li>Level2</li></ul></ul>"
assert_render "* Hello\nWorld", "<ul><li>Hello\nWorld</li></ul>"
assert_render "Params:\n* Foo\n* Bar", "<p>Params:</p>\n\n<ul><li>Foo</li><li>Bar</li></ul>"
+ assert_render "* Hello\n* World\n\n```\nHello World\n```", "<ul><li>Hello</li><li>World</li></ul>\n\n<pre><code>Hello World</code></pre>"
assert_render "+ Hello", "<ul><li>Hello</li></ul>"
assert_render "- Hello", "<ul><li>Hello</li></ul>" |
31166fa
to
aa0b7b7
Compare
@asterite WDYT about it? |
@Sija This is huge, and excellent! I liked it so much the first time I saw it that I thought I already merged this... sorry! 😊 |
@asterite I was wondering wouldn't it be nice to have dedicated flag for see also notes? Maybe |
Every commit fixes different, albeit small issue, I've found with docs :)