diff --git a/src/html.c b/src/html.c index faf0d99..1ff4cc1 100755 --- a/src/html.c +++ b/src/html.c @@ -104,35 +104,10 @@ rndr_blockcode(hoedown_buffer *ob, const hoedown_buffer *text, const hoedown_buf if (ob->size) hoedown_buffer_putc(ob, '\n'); - if (lang && lang->size) { - size_t i, cls = 0; - if (state->flags & HOEDOWN_HTML_PRETTIFY) { - HOEDOWN_BUFPUTSL(ob, "
size; ++i, ++cls) {
- while (i < lang->size && isspace(lang->data[i]))
- i++;
-
- if (i < lang->size) {
- size_t org = i;
- while (i < lang->size && !isspace(lang->data[i]))
- i++;
-
- if (lang->data[org] == '.')
- org++;
-
- if (cls) hoedown_buffer_putc(ob, ' ');
- escape_html(ob, lang->data + org, i - org);
- }
- }
-
+ if (lang) {
+ HOEDOWN_BUFPUTSL(ob, "data, lang->size);
HOEDOWN_BUFPUTSL(ob, "\">");
- } else if (state->flags & HOEDOWN_HTML_PRETTIFY) {
- HOEDOWN_BUFPUTSL(ob, "");
} else {
HOEDOWN_BUFPUTSL(ob, "");
}
@@ -156,10 +131,7 @@ static int
rndr_codespan(hoedown_buffer *ob, const hoedown_buffer *text, void *opaque)
{
hoedown_html_renderer_state *state = opaque;
- if (state->flags & HOEDOWN_HTML_PRETTIFY)
- HOEDOWN_BUFPUTSL(ob, "");
- else
- HOEDOWN_BUFPUTSL(ob, "");
+ HOEDOWN_BUFPUTSL(ob, "");
if (text) escape_html(ob, text->data, text->size);
HOEDOWN_BUFPUTSL(ob, "
");
return 1;
diff --git a/src/html.h b/src/html.h
index ff83cd4..7660788 100644
--- a/src/html.h
+++ b/src/html.h
@@ -21,8 +21,7 @@ typedef enum {
HOEDOWN_HTML_TOC = (1 << 6),
HOEDOWN_HTML_HARD_WRAP = (1 << 7),
HOEDOWN_HTML_USE_XHTML = (1 << 8),
- HOEDOWN_HTML_ESCAPE = (1 << 9),
- HOEDOWN_HTML_PRETTIFY = (1 << 10)
+ HOEDOWN_HTML_ESCAPE = (1 << 9)
} hoedown_html_render_mode;
typedef enum {