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

Docs cleanup #3759

Merged
merged 10 commits into from Dec 27, 2016
Merged

Docs cleanup #3759

merged 10 commits into from Dec 27, 2016

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Dec 23, 2016

Every commit fixes different, albeit small issue, I've found with docs :)

@oprypin
Copy link
Member

oprypin commented Dec 23, 2016

I'd rather see "consistently use indented code blocks". It's a waste of 2 lines every time otherwise :/

@Sija
Copy link
Contributor Author

Sija commented Dec 23, 2016

@BlaXpirit indented code block are not being processed by formatter tool.

@Sija
Copy link
Contributor Author

Sija commented Dec 23, 2016

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>"

@Sija
Copy link
Contributor Author

Sija commented Dec 27, 2016

@asterite WDYT about it?

@asterite
Copy link
Member

@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 asterite merged commit 7a0676b into crystal-lang:master Dec 27, 2016
@asterite asterite added this to the 0.20.4 milestone Dec 27, 2016
@Sija
Copy link
Contributor Author

Sija commented Dec 27, 2016

@asterite I was wondering wouldn't it be nice to have dedicated flag for see also notes? Maybe SEE to stay coherent with the rest of 'em (like NOTE or FIXME)?

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.

None yet

3 participants