-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
kramdown converter: Add list_indent option #753
Conversation
Some markdown dialects need to have nested lists indented by 4 spaces. The kramdown converter writes the 2 spaces needed by kramdown. The option list_indent allows setting this to 4 so that other markdown readers can use the output.
Have you tested whether such output can successfully be parsed by kramdown again? Could you add test files? Generally, I'm not against such an option as long as the output is something kramdown can parse again. |
You already have |
Yeah, that test case is working but is rather simple. When using an indentation of four, you might get wrong results, e.g.:
-> <ul>
<li>
<p>list with implicit indentation of 2</p>
<pre><code> code block with 8 spaces in front
</code></pre>
</li>
</ul> Note the two spaces at the start of the To use special options for some test cases, create an |
OK, I added a {list_indent: 4} version to test_files.rb:
But I can't use run_tests.rb without getting the equivalent of
(appears to trigger on I can do a |
Well, maybe not, but I still had to manually install it to get rid of 5 errors. (I still get 19 Failures around rouge.) |
Good point on the codeblock indentation, apart from that I also got an unrecognized header. I like how running the test for list_indent=4 uncovered these additional problems, so I committed the somewhat redundant test code. I can of course refactor that, but that will lose the symmetry. |
28c3334
to
5051f73
Compare
@cabo Thanks for the changes! I have squashed your commits together and merged the result. |
Some markdown dialects need to have nested lists indented by 4 spaces.
The kramdown converter writes the 2 spaces needed by kramdown.
The option list_indent allows setting this to 4 so that other markdown
readers can use the output.