From 806ff17755c90579afc68914b251b80e2f8c4b77 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 4 Sep 2014 18:56:52 +0200 Subject: Rename block literals --- src/html/html.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/html') diff --git a/src/html/html.c b/src/html/html.c index 6041fde..758ec80 100644 --- a/src/html/html.c +++ b/src/html/html.c @@ -39,11 +39,11 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) while(b != NULL) { switch(b->tag) { - case document: + case BLOCK_DOCUMENT: blocks_to_html(html, b->children, false); break; - case paragraph: + case BLOCK_PARAGRAPH: if (tight) { inlines_to_html(html, b->inline_content); } else { @@ -54,14 +54,14 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) } break; - case block_quote: + case BLOCK_BQUOTE: cr(html); strbuf_puts(html, "
\n"); blocks_to_html(html, b->children, false); strbuf_puts(html, "
\n"); break; - case list_item: + case BLOCK_LIST_ITEM: cr(html); strbuf_puts(html, "
  • "); blocks_to_html(html, b->children, tight); @@ -69,7 +69,7 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) strbuf_puts(html, "
  • \n"); break; - case list: + case BLOCK_LIST: // make sure a list starts at the beginning of the line: cr(html); data = &(b->attributes.list_data); @@ -87,21 +87,21 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) strbuf_putc(html, '\n'); break; - case atx_header: - case setext_header: + case BLOCK_ATX_HEADER: + case BLOCK_SETEXT_HEADER: cr(html); strbuf_printf(html, "", b->attributes.header_level); inlines_to_html(html, b->inline_content); strbuf_printf(html, "\n", b->attributes.header_level); break; - case indented_code: - case fenced_code: + case BLOCK_INDENTED_CODE: + case BLOCK_FENCED_CODE: cr(html); strbuf_puts(html, "tag == fenced_code) { + if (b->tag == BLOCK_FENCED_CODE) { strbuf *info = &b->attributes.fenced_code_data.info; if (strbuf_len(info) > 0) { @@ -121,15 +121,15 @@ void blocks_to_html(strbuf *html, node_block *b, bool tight) strbuf_puts(html, "\n"); break; - case html_block: + case BLOCK_HTML: strbuf_put(html, b->string_content.ptr, b->string_content.size); break; - case hrule: + case BLOCK_HRULE: strbuf_puts(html, "
    \n"); break; - case reference_def: + case BLOCK_REFERENCE_DEF: break; default: -- cgit v1.2.3