Skip to content
Snippets Groups Projects
Commit 46b76885 authored by Seth Falcon's avatar Seth Falcon
Browse files

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 (&gt;, &lt;).

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.
parent ab5e421f
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment