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
commonmarker-0.23.11 ext/commonmarker/html.h
markly-0.12.1 ext/markly/html.h
markly-0.12.0 ext/markly/html.h
markly-0.11.0 ext/markly/html.h
markly-0.10.0 ext/markly/html.h
markly-0.9.1 ext/markly/html.h
commonmarker-0.23.10 ext/commonmarker/html.h
markly-0.9.0 ext/markly/html.h
markly-0.8.1 ext/markly/html.h
markly-0.8.0 ext/markly/html.h
qiita_marker-0.23.9.0 ext/qiita_marker/html.h
commonmarker-0.23.9 ext/commonmarker/html.h
commonmarker-0.23.8 ext/commonmarker/html.h
commonmarker-0.23.7 ext/commonmarker/html.h
qiita_marker-0.23.6.2 ext/qiita_marker/html.h
commonmarker-0.23.7.pre1 ext/commonmarker/html.h
qiita_marker-0.23.6.1 ext/qiita_marker/html.h
qiita_marker-0.23.6.0 ext/qiita_marker/html.h
commonmarker-0.23.6 ext/commonmarker/html.h
qiita_marker-0.23.5.1 ext/qiita_marker/html.h