Sha256: 16f4f3d19a9ef411ae14664b49d5c02b48e696f2baaf5aa8740357e90c98166e

Contents?: true

Size: 722 Bytes

Versions: 97

Compression:

Stored size: 722 Bytes

Contents

#ifndef CMARK_HTML_H
#define CMARK_HTML_H

#include "buffer.h"
#include "node.h"

CMARK_INLINE
static void cmark_html_render_cr(cmark_strbuf *html) {
  if (html->size && html->ptr[html->size - 1] != '\n')
    cmark_strbuf_putc(html, '\n');
}

#define BUFFER_SIZE 100

CMARK_INLINE 
static void cmark_html_render_sourcepos(cmark_node *node, cmark_strbuf *html, int options) {
  char buffer[BUFFER_SIZE];
  if (CMARK_OPT_SOURCEPOS & options) {
    snprintf(buffer, BUFFER_SIZE, " data-sourcepos=\"%d:%d-%d:%d\"",
             cmark_node_get_start_line(node), cmark_node_get_start_column(node),
             cmark_node_get_end_line(node), cmark_node_get_end_column(node));
    cmark_strbuf_puts(html, buffer);
  }
}


#endif

Version data entries

97 entries across 96 versions & 5 rubygems

Version Path
markly-0.5.0 ext/markly/html.h
markly-0.4.0 ext/markly/html.h
markly-0.3.0 ext/markly/html.h
markly-0.2.2 ext/markly/html.h
markly-0.2.1 ext/markly/html.h
markly-0.2.0 ext/markly/html.h
markly-0.1.0 ext/markly/html.h
commonmarker-0.21.0 ext/commonmarker/html.h
commonmarker-0.20.2 ext/commonmarker/html.h
commonmarker-0.20.1 ext/commonmarker/html.h
commonmarker-0.20.0 ext/commonmarker/html.h
commonmarker-0.19.0 ext/commonmarker/html.h
commonmarker-0.18.2 ext/commonmarker/html.h
commonmarker-0.18.1 ext/commonmarker/html.h
commonmarker-0.18.0 ext/commonmarker/html.h
commonmarker-0.17.13 ext/commonmarker/html.h
commonmarker-0.17.12 ext/commonmarker/html.h
commonmarker-0.17.11 ext/commonmarker/html.h
commonmarker-0.17.10 ext/commonmarker/html.h
tdiary-5.0.8 vendor/bundle/gems/commonmarker-0.17.9/ext/commonmarker/html.h