Browse Source
The regular, indented-by-four-spaces, code blocks do not nest nor should they. But they were nesting if they were located inside a list. Fix this by hashifying them and not unhashifying them until the very end. Also there's a kludge in the code that says: # Turn double returns into triple returns, so that we can make a # paragraph for the last item in a list, if necessary Unfortunately that perverts blank lines inside a code block. Fix this by changing the perversion so that it accomplishes the same thing but has an exact inverse and apply that inverse before formatting code blocks. Code blocks inside lists should now format correctly (and this does fix the example in the README that was previously formatted incorrectly). Finally, a code block at the very beginning of the file preceded by a single blank line would not have been recognized (but if it were preceded by none or two or more it would have). Now it will be recognized properly. And one more thing. Since we're in there tweaking code blocks, wrap the output in a <div>...</div> section and insert a null <dl></dl> right after the opening <div> tag. This makes sure the displayed code block will not end up getting mashed up against something it shouldn't be mashed up against. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>master
Kyle J. McKay
8 years ago
1 changed files with 15 additions and 18 deletions
Loading…
Reference in new issue