forked from uwiger/edown
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle explicit code blocks separately from edoc generated blocks
Explicit code blocks (e.g. ```CODE''' in edoc) use an intermediate 'pre' tag and are now rendered using Github Flavored Markdown "fenced" code block style. Using the markdown code block as opposed to 'pre' tags avoids needing to escape content in the block and slightly improves the readability of the generated markdown. The edoc generated function and type spec descriptions use a 'pre_pre' tag. The code now assumes that the pre_pre elements contain code with anchor tags for linking, but no other HTML tags. Special processing is added to wrap the 'pre_pre' blocks in '<pre><code>' tags and to translate angle brackets in the body of such tags to the appropriate HTML entity (>, <). This patch also adjusts newline behavior for generated markdown. Paragraphs now begin/end with a single \n. As a result, the formatting of ol and ul lists in markdown is improved.
- Loading branch information
Seth Falcon
committed
Feb 10, 2013
1 parent
ab5e421
commit 46b7688
Showing
1 changed file
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters