Sha256: 158ae470be43040c20b2268143b59a5406354b3894fd9c666b399683d00e39e0

Contents?: true

Size: 1.63 KB

Versions: 51

Compression:

Stored size: 1.63 KB

Contents

#ifndef CMARK_RENDER_H
#define CMARK_RENDER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h>
#include "buffer.h"
#include "chunk.h"

typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping;

struct cmark_renderer {
  cmark_mem *mem;
  cmark_strbuf *buffer;
  cmark_strbuf *prefix;
  int column;
  int width;
  int need_cr;
  bufsize_t last_breakable;
  bool begin_line;
  bool begin_content;
  bool no_linebreaks;
  bool in_tight_list_item;
  void (*outc)(struct cmark_renderer *, cmark_node *, cmark_escaping, int32_t, unsigned char);
  void (*cr)(struct cmark_renderer *);
  void (*blankline)(struct cmark_renderer *);
  void (*out)(struct cmark_renderer *, cmark_node *, const char *, bool, cmark_escaping);
  unsigned int footnote_ix;
};

typedef struct cmark_renderer cmark_renderer;

struct cmark_html_renderer {
  cmark_strbuf *html;
  cmark_node *plain;
  cmark_llist *filter_extensions;
  unsigned int footnote_ix;
  unsigned int written_footnote_ix;
  void *opaque;
};

typedef struct cmark_html_renderer cmark_html_renderer;

void cmark_render_ascii(cmark_renderer *renderer, const char *s);

void cmark_render_code_point(cmark_renderer *renderer, uint32_t c);

char *cmark_render(cmark_mem *mem, cmark_node *root, int options, int width,
                   void (*outc)(cmark_renderer *, cmark_node *,
                                cmark_escaping, int32_t,
                                unsigned char),
                   int (*render_node)(cmark_renderer *renderer,
                                      cmark_node *node,
                                      cmark_event_type ev_type, int options));

#ifdef __cplusplus
}
#endif

#endif

Version data entries

51 entries across 51 versions & 5 rubygems

Version Path
commonmarker-0.23.11 ext/commonmarker/render.h
markly-0.12.1 ext/markly/render.h
markly-0.12.0 ext/markly/render.h
markly-0.11.0 ext/markly/render.h
markly-0.10.0 ext/markly/render.h
markly-0.9.1 ext/markly/render.h
commonmarker-0.23.10 ext/commonmarker/render.h
markly-0.9.0 ext/markly/render.h
markly-0.8.1 ext/markly/render.h
markly-0.8.0 ext/markly/render.h
qiita_marker-0.23.9.0 ext/qiita_marker/render.h
commonmarker-0.23.9 ext/commonmarker/render.h
commonmarker-0.23.8 ext/commonmarker/render.h
commonmarker-0.23.7 ext/commonmarker/render.h
qiita_marker-0.23.6.2 ext/qiita_marker/render.h
commonmarker-0.23.7.pre1 ext/commonmarker/render.h
qiita_marker-0.23.6.1 ext/qiita_marker/render.h
qiita_marker-0.23.6.0 ext/qiita_marker/render.h
commonmarker-0.23.6 ext/commonmarker/render.h
qiita_marker-0.23.5.1 ext/qiita_marker/render.h