Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/node.h | #ifndef CMARK_NODE_H
#define CMARK_NODE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdint.h>
#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"
#include "buffer.h"
#include "chunk.h"
typedef struct {
cmark_list_type list_type;
int marker_offset;
int padding;
int start;
cmark_delim_type delimiter;
unsigned char bullet_char;
bool tight;
bool checked; // For task list extension
} cmark_list;
typedef struct {
cmark_chunk info;
cmark_chunk literal;
uint8_t fence_length;
uint8_t fence_offset;
unsigned char fence_char;
int8_t fenced;
} cmark_code;
typedef struct {
int level;
bool setext;
} cmark_heading;
typedef struct {
cmark_chunk url;
cmark_chunk title;
} cmark_link;
typedef struct {
cmark_chunk on_enter;
cmark_chunk on_exit;
} cmark_custom;
enum cmark_node__internal_flags {
CMARK_NODE__OPEN = (1 << 0),
CMARK_NODE__LAST_LINE_BLANK = (1 << 1),
CMARK_NODE__LAST_LINE_CHECKED = (1 << 2),
};
struct cmark_node {
cmark_strbuf content;
struct cmark_node *next;
struct cmark_node *prev;
struct cmark_node *parent;
struct cmark_node *first_child;
struct cmark_node *last_child;
void *user_data;
cmark_free_func user_data_free_func;
int start_line;
int start_column;
int end_line;
int end_column;
int internal_offset;
uint16_t type;
uint16_t flags;
cmark_syntax_extension *extension;
union {
cmark_chunk literal;
cmark_list list;
cmark_code code;
cmark_heading heading;
cmark_link link;
cmark_custom custom;
int html_block_type;
void *opaque;
} as;
};
static CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) {
return node->content.mem;
}
CMARK_GFM_EXPORT int cmark_node_check(cmark_node *node, FILE *out);
static CMARK_INLINE bool CMARK_NODE_TYPE_BLOCK_P(cmark_node_type node_type) {
return (node_type & CMARK_NODE_TYPE_MASK) == CMARK_NODE_TYPE_BLOCK;
}
static CMARK_INLINE bool CMARK_NODE_BLOCK_P(cmark_node *node) {
return node != NULL && CMARK_NODE_TYPE_BLOCK_P((cmark_node_type) node->type);
}
static CMARK_INLINE bool CMARK_NODE_TYPE_INLINE_P(cmark_node_type node_type) {
return (node_type & CMARK_NODE_TYPE_MASK) == CMARK_NODE_TYPE_INLINE;
}
static CMARK_INLINE bool CMARK_NODE_INLINE_P(cmark_node *node) {
return node != NULL && CMARK_NODE_TYPE_INLINE_P((cmark_node_type) node->type);
}
CMARK_GFM_EXPORT bool cmark_node_can_contain_type(cmark_node *node, cmark_node_type child_type);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/cmark.c | #include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include "registry.h"
#include "node.h"
#include "houdini.h"
#include "cmark-gfm.h"
#include "buffer.h"
cmark_node_type CMARK_NODE_LAST_BLOCK = CMARK_NODE_FOOTNOTE_DEFINITION;
cmark_node_type CMARK_NODE_LAST_INLINE = CMARK_NODE_FOOTNOTE_REFERENCE;
int cmark_version() { return CMARK_GFM_VERSION; }
const char *cmark_version_string() { return CMARK_GFM_VERSION_STRING; }
static void *xcalloc(size_t nmem, size_t size) {
void *ptr = calloc(nmem, size);
if (!ptr) {
fprintf(stderr, "[cmark] calloc returned null pointer, aborting\n");
abort();
}
return ptr;
}
static void *xrealloc(void *ptr, size_t size) {
void *new_ptr = realloc(ptr, size);
if (!new_ptr) {
fprintf(stderr, "[cmark] realloc returned null pointer, aborting\n");
abort();
}
return new_ptr;
}
static void xfree(void *ptr) {
free(ptr);
}
cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, xfree};
cmark_mem *cmark_get_default_mem_allocator() {
return &CMARK_DEFAULT_MEM_ALLOCATOR;
}
char *cmark_markdown_to_html(const char *text, size_t len, int options) {
cmark_node *doc;
char *result;
doc = cmark_parse_document(text, len, options);
result = cmark_render_html(doc, options, NULL);
cmark_node_free(doc);
return result;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/arena.c | #include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"
static struct arena_chunk {
size_t sz, used;
uint8_t push_point;
void *ptr;
struct arena_chunk *prev;
} *A = NULL;
static struct arena_chunk *alloc_arena_chunk(size_t sz, struct arena_chunk *prev) {
struct arena_chunk *c = (struct arena_chunk *)calloc(1, sizeof(*c));
if (!c)
abort();
c->sz = sz;
c->ptr = calloc(1, sz);
if (!c->ptr)
abort();
c->prev = prev;
return c;
}
void cmark_arena_push(void) {
if (!A)
return;
A->push_point = 1;
A = alloc_arena_chunk(10240, A);
}
int cmark_arena_pop(void) {
if (!A)
return 0;
while (A && !A->push_point) {
free(A->ptr);
struct arena_chunk *n = A->prev;
free(A);
A = n;
}
if (A)
A->push_point = 0;
return 1;
}
static void init_arena(void) {
A = alloc_arena_chunk(4 * 1048576, NULL);
}
void cmark_arena_reset(void) {
while (A) {
free(A->ptr);
struct arena_chunk *n = A->prev;
free(A);
A = n;
}
}
static void *arena_calloc(size_t nmem, size_t size) {
if (!A)
init_arena();
size_t sz = nmem * size + sizeof(size_t);
// Round allocation sizes to largest integer size to
// ensure returned memory is correctly aligned
const size_t align = sizeof(size_t) - 1;
sz = (sz + align) & ~align;
if (sz > A->sz) {
A->prev = alloc_arena_chunk(sz, A->prev);
return (uint8_t *) A->prev->ptr + sizeof(size_t);
}
if (sz > A->sz - A->used) {
A = alloc_arena_chunk(A->sz + A->sz / 2, A);
}
void *ptr = (uint8_t *) A->ptr + A->used;
A->used += sz;
*((size_t *) ptr) = sz - sizeof(size_t);
return (uint8_t *) ptr + sizeof(size_t);
}
static void *arena_realloc(void *ptr, size_t size) {
if (!A)
init_arena();
void *new_ptr = arena_calloc(1, size);
if (ptr)
memcpy(new_ptr, ptr, ((size_t *) ptr)[-1]);
return new_ptr;
}
static void arena_free(void *ptr) {
(void) ptr;
/* no-op */
}
cmark_mem CMARK_ARENA_MEM_ALLOCATOR = {arena_calloc, arena_realloc, arena_free};
cmark_mem *cmark_get_arena_mem_allocator() {
return &CMARK_ARENA_MEM_ALLOCATOR;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/man.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "config.h"
#include "cmark-gfm.h"
#include "node.h"
#include "buffer.h"
#include "utf8.h"
#include "render.h"
#include "syntax_extension.h"
#define OUT(s, wrap, escaping) renderer->out(renderer, node, s, wrap, escaping)
#define LIT(s) renderer->out(renderer, node, s, false, LITERAL)
#define CR() renderer->cr(renderer)
#define BLANKLINE() renderer->blankline(renderer)
#define LIST_NUMBER_SIZE 20
// Functions to convert cmark_nodes to groff man strings.
static void S_outc(cmark_renderer *renderer, cmark_node *node,
cmark_escaping escape, int32_t c,
unsigned char nextc) {
(void)(nextc);
if (escape == LITERAL) {
cmark_render_code_point(renderer, c);
return;
}
switch (c) {
case 46:
if (renderer->begin_line) {
cmark_render_ascii(renderer, "\\&.");
} else {
cmark_render_code_point(renderer, c);
}
break;
case 39:
if (renderer->begin_line) {
cmark_render_ascii(renderer, "\\&'");
} else {
cmark_render_code_point(renderer, c);
}
break;
case 45:
cmark_render_ascii(renderer, "\\-");
break;
case 92:
cmark_render_ascii(renderer, "\\e");
break;
case 8216: // left single quote
cmark_render_ascii(renderer, "\\[oq]");
break;
case 8217: // right single quote
cmark_render_ascii(renderer, "\\[cq]");
break;
case 8220: // left double quote
cmark_render_ascii(renderer, "\\[lq]");
break;
case 8221: // right double quote
cmark_render_ascii(renderer, "\\[rq]");
break;
case 8212: // em dash
cmark_render_ascii(renderer, "\\[em]");
break;
case 8211: // en dash
cmark_render_ascii(renderer, "\\[en]");
break;
default:
cmark_render_code_point(renderer, c);
}
}
static int S_render_node(cmark_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
cmark_node *tmp;
int list_number;
bool entering = (ev_type == CMARK_EVENT_ENTER);
bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options);
if (node->extension && node->extension->man_render_func) {
node->extension->man_render_func(node->extension, renderer, node, ev_type, options);
return 1;
}
switch (node->type) {
case CMARK_NODE_DOCUMENT:
if (entering) {
/* Define a strikethrough macro */
/* Commenting out because this makes tests fail
LIT(".de ST");
CR();
LIT(".nr ww \\w'\\\\$1'");
CR();
LIT("\\Z@\\v'-.25m'\\l'\\\\n[ww]u'@\\\\$1");
CR();
LIT("..");
CR();
*/
}
break;
case CMARK_NODE_BLOCK_QUOTE:
if (entering) {
CR();
LIT(".RS");
CR();
} else {
CR();
LIT(".RE");
CR();
}
break;
case CMARK_NODE_LIST:
break;
case CMARK_NODE_ITEM:
if (entering) {
CR();
LIT(".IP ");
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
LIT("\\[bu] 2");
} else {
list_number = cmark_node_get_list_start(node->parent);
tmp = node;
while (tmp->prev) {
tmp = tmp->prev;
list_number += 1;
}
char list_number_s[LIST_NUMBER_SIZE];
snprintf(list_number_s, LIST_NUMBER_SIZE, "\"%d.\" 4", list_number);
LIT(list_number_s);
}
CR();
} else {
CR();
}
break;
case CMARK_NODE_HEADING:
if (entering) {
CR();
LIT(cmark_node_get_heading_level(node) == 1 ? ".SH" : ".SS");
CR();
} else {
CR();
}
break;
case CMARK_NODE_CODE_BLOCK:
CR();
LIT(".IP\n.nf\n\\f[C]\n");
OUT(cmark_node_get_literal(node), false, NORMAL);
CR();
LIT("\\f[]\n.fi");
CR();
break;
case CMARK_NODE_HTML_BLOCK:
break;
case CMARK_NODE_CUSTOM_BLOCK:
CR();
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
false, LITERAL);
CR();
break;
case CMARK_NODE_THEMATIC_BREAK:
CR();
LIT(".PP\n * * * * *");
CR();
break;
case CMARK_NODE_PARAGRAPH:
if (entering) {
// no blank line if first paragraph in list:
if (node->parent && node->parent->type == CMARK_NODE_ITEM &&
node->prev == NULL) {
// no blank line or .PP
} else {
CR();
LIT(".PP");
CR();
}
} else {
CR();
}
break;
case CMARK_NODE_TEXT:
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
break;
case CMARK_NODE_LINEBREAK:
LIT(".PD 0\n.P\n.PD");
CR();
break;
case CMARK_NODE_SOFTBREAK:
if (options & CMARK_OPT_HARDBREAKS) {
LIT(".PD 0\n.P\n.PD");
CR();
} else if (renderer->width == 0 && !(CMARK_OPT_NOBREAKS & options)) {
CR();
} else {
OUT(" ", allow_wrap, LITERAL);
}
break;
case CMARK_NODE_CODE:
LIT("\\f[C]");
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
LIT("\\f[]");
break;
case CMARK_NODE_HTML_INLINE:
break;
case CMARK_NODE_CUSTOM_INLINE:
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
false, LITERAL);
break;
case CMARK_NODE_STRONG:
if (entering) {
LIT("\\f[B]");
} else {
LIT("\\f[]");
}
break;
case CMARK_NODE_EMPH:
if (entering) {
LIT("\\f[I]");
} else {
LIT("\\f[]");
}
break;
case CMARK_NODE_LINK:
if (!entering) {
LIT(" (");
OUT(cmark_node_get_url(node), allow_wrap, URL);
LIT(")");
}
break;
case CMARK_NODE_IMAGE:
if (entering) {
LIT("[IMAGE: ");
} else {
LIT("]");
}
break;
case CMARK_NODE_FOOTNOTE_DEFINITION:
case CMARK_NODE_FOOTNOTE_REFERENCE:
// TODO
break;
default:
assert(false);
break;
}
return 1;
}
char *cmark_render_man(cmark_node *root, int options, int width) {
return cmark_render_man_with_mem(root, options, width, cmark_node_mem(root));
}
char *cmark_render_man_with_mem(cmark_node *root, int options, int width, cmark_mem *mem) {
return cmark_render(mem, root, options, width, S_outc, S_render_node);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/CMakeLists.txt | if(${CMAKE_VERSION} VERSION_GREATER "3.3")
cmake_policy(SET CMP0063 NEW)
endif()
include(GNUInstallDirs)
set(LIBRARY "libcmark-gfm")
set(STATICLIBRARY "libcmark-gfm_static")
set(HEADERS
cmark-gfm.h
cmark-gfm-extension_api.h
parser.h
buffer.h
node.h
iterator.h
chunk.h
references.h
footnotes.h
map.h
utf8.h
scanners.h
inlines.h
houdini.h
cmark_ctype.h
render.h
registry.h
syntax_extension.h
plugin.h
)
set(LIBRARY_SOURCES
cmark.c
node.c
iterator.c
blocks.c
inlines.c
scanners.c
scanners.re
utf8.c
buffer.c
references.c
footnotes.c
map.c
render.c
man.c
xml.c
html.c
commonmark.c
plaintext.c
latex.c
houdini_href_e.c
houdini_html_e.c
houdini_html_u.c
cmark_ctype.c
arena.c
linked_list.c
syntax_extension.c
registry.c
plugin.c
${HEADERS}
)
set(PROGRAM "cmark-gfm")
set(PROGRAM_SOURCES main.c)
include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
include_directories(
${PROJECT_BINARY_DIR}/extensions
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark-gfm_version.h.in
${CMAKE_CURRENT_BINARY_DIR}/cmark-gfm_version.h)
include (GenerateExportHeader)
include("../CheckFileOffsetBits.cmake")
CHECK_FILE_OFFSET_BITS()
add_executable(${PROGRAM} ${PROGRAM_SOURCES})
if(CMARK_SHARED)
target_link_libraries(${PROGRAM} libcmark-gfm-extensions libcmark-gfm)
elseif(CMARK_STATIC)
target_link_libraries(${PROGRAM} libcmark-gfm-extensions_static libcmark-gfm_static)
endif()
# Disable the PUBLIC declarations when compiling the executable:
set_target_properties(${PROGRAM} PROPERTIES
COMPILE_FLAGS "-DCMARK_GFM_STATIC_DEFINE -DCMARK_GFM_EXTENSIONS_STATIC_DEFINE")
# Check integrity of node structure when compiled as debug:
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES -DDEBUG")
set(CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg")
set(CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg")
# -fvisibility=hidden
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
if (CMARK_SHARED)
add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})
# Include minor version and patch level in soname for now.
set_target_properties(${LIBRARY} PROPERTIES
OUTPUT_NAME "cmark-gfm"
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM}
VERSION ${PROJECT_VERSION})
set_property(TARGET ${LIBRARY}
APPEND PROPERTY MACOSX_RPATH true)
# Avoid name clash between PROGRAM and LIBRARY pdb files.
set_target_properties(${LIBRARY} PROPERTIES PDB_NAME cmark-gfm_dll)
generate_export_header(${LIBRARY}
BASE_NAME ${PROJECT_NAME})
list(APPEND CMARK_INSTALL ${LIBRARY})
endif()
if (CMARK_STATIC)
add_library(${STATICLIBRARY} STATIC ${LIBRARY_SOURCES})
set_target_properties(${STATICLIBRARY} PROPERTIES
COMPILE_FLAGS -DCMARK_GFM_STATIC_DEFINE
POSITION_INDEPENDENT_CODE ON)
if (MSVC)
set_target_properties(${STATICLIBRARY} PROPERTIES
OUTPUT_NAME "cmark-gfm_static"
VERSION ${PROJECT_VERSION})
else()
set_target_properties(${STATICLIBRARY} PROPERTIES
OUTPUT_NAME "cmark-gfm"
VERSION ${PROJECT_VERSION})
endif(MSVC)
if (NOT CMARK_SHARED)
generate_export_header(${STATICLIBRARY}
BASE_NAME ${PROJECT_NAME})
endif()
list(APPEND CMARK_INSTALL ${STATICLIBRARY})
endif()
if (MSVC)
set_property(TARGET ${PROGRAM}
APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO)
endif(MSVC)
if(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
include(InstallRequiredSystemLibraries)
endif()
set(libdir lib${LIB_SUFFIX})
install(TARGETS ${PROGRAM} ${CMARK_INSTALL}
EXPORT cmark-gfm
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${libdir}
ARCHIVE DESTINATION ${libdir}
)
if(CMARK_SHARED OR CMARK_STATIC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark-gfm.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libcmark-gfm.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark-gfm.pc
DESTINATION ${libdir}/pkgconfig)
install(FILES
cmark-gfm.h
cmark-gfm-extension_api.h
${CMAKE_CURRENT_BINARY_DIR}/cmark-gfm_export.h
${CMAKE_CURRENT_BINARY_DIR}/cmark-gfm_version.h
DESTINATION include
)
install(EXPORT cmark-gfm DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
endif()
# Feature tests
include(CheckIncludeFile)
include(CheckCSourceCompiles)
include(CheckCSourceRuns)
include(CheckSymbolExists)
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
CHECK_C_SOURCE_COMPILES(
"int main() { __builtin_expect(0,0); return 0; }"
HAVE___BUILTIN_EXPECT)
CHECK_C_SOURCE_COMPILES("
int f(void) __attribute__ (());
int main() { return 0; }
" HAVE___ATTRIBUTE__)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
# Always compile with warnings
if(MSVC)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX /wd4706 /wd4204 /wd4221 /wd4100 /D_CRT_SECURE_NO_WARNINGS")
elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic")
endif()
# Compile as C++ under MSVC older than 12.0
if(MSVC AND MSVC_VERSION LESS 1800)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Ubsan")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined")
endif()
if(CMARK_LIB_FUZZER)
set(FUZZ_HARNESS "cmark-fuzz")
add_executable(${FUZZ_HARNESS} ../test/cmark-fuzz.c ${LIBRARY_SOURCES})
target_link_libraries(${FUZZ_HARNESS} "${CMAKE_LIB_FUZZER_PATH}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-coverage=trace-pc-guard")
# cmark is written in C but the libFuzzer runtime is written in C++ which
# needs to link against the C++ runtime. Explicitly link it into cmark-fuzz
set_target_properties(${FUZZ_HARNESS} PROPERTIES LINK_FLAGS "-lstdc++")
endif()
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/html.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "cmark_ctype.h"
#include "config.h"
#include "cmark-gfm.h"
#include "houdini.h"
#include "scanners.h"
#include "syntax_extension.h"
#include "html.h"
#include "render.h"
// Functions to convert cmark_nodes to HTML strings.
static void escape_html(cmark_strbuf *dest, const unsigned char *source,
bufsize_t length) {
houdini_escape_html0(dest, source, length, 0);
}
static void filter_html_block(cmark_html_renderer *renderer, uint8_t *data, size_t len) {
cmark_strbuf *html = renderer->html;
cmark_llist *it;
cmark_syntax_extension *ext;
bool filtered;
uint8_t *match;
while (len) {
match = (uint8_t *) memchr(data, '<', len);
if (!match)
break;
if (match != data) {
cmark_strbuf_put(html, data, (bufsize_t)(match - data));
len -= (match - data);
data = match;
}
filtered = false;
for (it = renderer->filter_extensions; it; it = it->next) {
ext = ((cmark_syntax_extension *) it->data);
if (!ext->html_filter_func(ext, data, len)) {
filtered = true;
break;
}
}
if (!filtered) {
cmark_strbuf_putc(html, '<');
} else {
cmark_strbuf_puts(html, "<");
}
++data;
--len;
}
if (len)
cmark_strbuf_put(html, data, (bufsize_t)len);
}
static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *html) {
if (renderer->written_footnote_ix >= renderer->footnote_ix)
return false;
renderer->written_footnote_ix = renderer->footnote_ix;
cmark_strbuf_puts(html, "<a href=\"#fnref");
char n[32];
snprintf(n, sizeof(n), "%d", renderer->footnote_ix);
cmark_strbuf_puts(html, n);
cmark_strbuf_puts(html, "\" class=\"footnote-backref\">↩</a>");
return true;
}
static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
cmark_node *parent;
cmark_node *grandparent;
cmark_strbuf *html = renderer->html;
cmark_llist *it;
cmark_syntax_extension *ext;
char start_heading[] = "<h0";
char end_heading[] = "</h0";
bool tight;
bool filtered;
char buffer[BUFFER_SIZE];
bool entering = (ev_type == CMARK_EVENT_ENTER);
if (renderer->plain == node) { // back at original node
renderer->plain = NULL;
}
if (renderer->plain != NULL) {
switch (node->type) {
case CMARK_NODE_TEXT:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML_INLINE:
escape_html(html, node->as.literal.data, node->as.literal.len);
break;
case CMARK_NODE_LINEBREAK:
case CMARK_NODE_SOFTBREAK:
cmark_strbuf_putc(html, ' ');
break;
default:
break;
}
return 1;
}
if (node->extension && node->extension->html_render_func) {
node->extension->html_render_func(node->extension, renderer, node, ev_type, options);
return 1;
}
switch (node->type) {
case CMARK_NODE_DOCUMENT:
break;
case CMARK_NODE_BLOCK_QUOTE:
if (entering) {
cmark_html_render_cr(html);
cmark_strbuf_puts(html, "<blockquote");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, ">\n");
} else {
cmark_html_render_cr(html);
cmark_strbuf_puts(html, "</blockquote>\n");
}
break;
case CMARK_NODE_LIST: {
cmark_list_type list_type = node->as.list.list_type;
int start = node->as.list.start;
if (entering) {
cmark_html_render_cr(html);
if (list_type == CMARK_BULLET_LIST) {
cmark_strbuf_puts(html, "<ul");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, ">\n");
} else if (start == 1) {
cmark_strbuf_puts(html, "<ol");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, ">\n");
} else {
snprintf(buffer, BUFFER_SIZE, "<ol start=\"%d\"", start);
cmark_strbuf_puts(html, buffer);
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, ">\n");
}
} else {
cmark_strbuf_puts(html,
list_type == CMARK_BULLET_LIST ? "</ul>\n" : "</ol>\n");
}
break;
}
case CMARK_NODE_ITEM:
if (entering) {
cmark_html_render_cr(html);
cmark_strbuf_puts(html, "<li");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_putc(html, '>');
} else {
cmark_strbuf_puts(html, "</li>\n");
}
break;
case CMARK_NODE_HEADING:
if (entering) {
cmark_html_render_cr(html);
start_heading[2] = (char)('0' + node->as.heading.level);
cmark_strbuf_puts(html, start_heading);
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_putc(html, '>');
} else {
end_heading[3] = (char)('0' + node->as.heading.level);
cmark_strbuf_puts(html, end_heading);
cmark_strbuf_puts(html, ">\n");
}
break;
case CMARK_NODE_CODE_BLOCK:
cmark_html_render_cr(html);
if (node->as.code.info.len == 0) {
cmark_strbuf_puts(html, "<pre");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, "><code>");
} else {
bufsize_t first_tag = 0;
while (first_tag < node->as.code.info.len &&
!cmark_isspace(node->as.code.info.data[first_tag])) {
first_tag += 1;
}
if (options & CMARK_OPT_GITHUB_PRE_LANG) {
cmark_strbuf_puts(html, "<pre");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, " lang=\"");
escape_html(html, node->as.code.info.data, first_tag);
if (first_tag < node->as.code.info.len && (options & CMARK_OPT_FULL_INFO_STRING)) {
cmark_strbuf_puts(html, "\" data-meta=\"");
escape_html(html, node->as.code.info.data + first_tag + 1, node->as.code.info.len - first_tag - 1);
}
cmark_strbuf_puts(html, "\"><code>");
} else {
cmark_strbuf_puts(html, "<pre");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, "><code class=\"language-");
escape_html(html, node->as.code.info.data, first_tag);
if (first_tag < node->as.code.info.len && (options & CMARK_OPT_FULL_INFO_STRING)) {
cmark_strbuf_puts(html, "\" data-meta=\"");
escape_html(html, node->as.code.info.data + first_tag + 1, node->as.code.info.len - first_tag - 1);
}
cmark_strbuf_puts(html, "\">");
}
}
escape_html(html, node->as.code.literal.data, node->as.code.literal.len);
cmark_strbuf_puts(html, "</code></pre>\n");
break;
case CMARK_NODE_HTML_BLOCK:
cmark_html_render_cr(html);
if (!(options & CMARK_OPT_UNSAFE)) {
cmark_strbuf_puts(html, "<!-- raw HTML omitted -->");
} else if (renderer->filter_extensions) {
filter_html_block(renderer, node->as.literal.data, node->as.literal.len);
} else {
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
}
cmark_html_render_cr(html);
break;
case CMARK_NODE_CUSTOM_BLOCK:
cmark_html_render_cr(html);
if (entering) {
cmark_strbuf_put(html, node->as.custom.on_enter.data,
node->as.custom.on_enter.len);
} else {
cmark_strbuf_put(html, node->as.custom.on_exit.data,
node->as.custom.on_exit.len);
}
cmark_html_render_cr(html);
break;
case CMARK_NODE_THEMATIC_BREAK:
cmark_html_render_cr(html);
cmark_strbuf_puts(html, "<hr");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, " />\n");
break;
case CMARK_NODE_PARAGRAPH:
parent = cmark_node_parent(node);
grandparent = cmark_node_parent(parent);
if (grandparent != NULL && grandparent->type == CMARK_NODE_LIST) {
tight = grandparent->as.list.tight;
} else {
tight = false;
}
if (!tight) {
if (entering) {
cmark_html_render_cr(html);
cmark_strbuf_puts(html, "<p");
cmark_html_render_sourcepos(node, html, options);
cmark_strbuf_putc(html, '>');
} else {
if (parent->type == CMARK_NODE_FOOTNOTE_DEFINITION && node->next == NULL) {
cmark_strbuf_putc(html, ' ');
S_put_footnote_backref(renderer, html);
}
cmark_strbuf_puts(html, "</p>\n");
}
}
break;
case CMARK_NODE_TEXT:
escape_html(html, node->as.literal.data, node->as.literal.len);
break;
case CMARK_NODE_LINEBREAK:
cmark_strbuf_puts(html, "<br />\n");
break;
case CMARK_NODE_SOFTBREAK:
if (options & CMARK_OPT_HARDBREAKS) {
cmark_strbuf_puts(html, "<br />\n");
} else if (options & CMARK_OPT_NOBREAKS) {
cmark_strbuf_putc(html, ' ');
} else {
cmark_strbuf_putc(html, '\n');
}
break;
case CMARK_NODE_CODE:
cmark_strbuf_puts(html, "<code>");
escape_html(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, "</code>");
break;
case CMARK_NODE_HTML_INLINE:
if (!(options & CMARK_OPT_UNSAFE)) {
cmark_strbuf_puts(html, "<!-- raw HTML omitted -->");
} else {
filtered = false;
for (it = renderer->filter_extensions; it; it = it->next) {
ext = (cmark_syntax_extension *) it->data;
if (!ext->html_filter_func(ext, node->as.literal.data, node->as.literal.len)) {
filtered = true;
break;
}
}
if (!filtered) {
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
} else {
cmark_strbuf_puts(html, "<");
cmark_strbuf_put(html, node->as.literal.data + 1, node->as.literal.len - 1);
}
}
break;
case CMARK_NODE_CUSTOM_INLINE:
if (entering) {
cmark_strbuf_put(html, node->as.custom.on_enter.data,
node->as.custom.on_enter.len);
} else {
cmark_strbuf_put(html, node->as.custom.on_exit.data,
node->as.custom.on_exit.len);
}
break;
case CMARK_NODE_STRONG:
if (entering) {
cmark_strbuf_puts(html, "<strong>");
} else {
cmark_strbuf_puts(html, "</strong>");
}
break;
case CMARK_NODE_EMPH:
if (entering) {
cmark_strbuf_puts(html, "<em>");
} else {
cmark_strbuf_puts(html, "</em>");
}
break;
case CMARK_NODE_LINK:
if (entering) {
cmark_strbuf_puts(html, "<a href=\"");
if ((options & CMARK_OPT_UNSAFE) ||
!(scan_dangerous_url(&node->as.link.url, 0))) {
houdini_escape_href(html, node->as.link.url.data,
node->as.link.url.len);
}
if (node->as.link.title.len) {
cmark_strbuf_puts(html, "\" title=\"");
escape_html(html, node->as.link.title.data, node->as.link.title.len);
}
cmark_strbuf_puts(html, "\">");
} else {
cmark_strbuf_puts(html, "</a>");
}
break;
case CMARK_NODE_IMAGE:
if (entering) {
cmark_strbuf_puts(html, "<img src=\"");
if ((options & CMARK_OPT_UNSAFE) ||
!(scan_dangerous_url(&node->as.link.url, 0))) {
houdini_escape_href(html, node->as.link.url.data,
node->as.link.url.len);
}
cmark_strbuf_puts(html, "\" alt=\"");
renderer->plain = node;
} else {
if (node->as.link.title.len) {
cmark_strbuf_puts(html, "\" title=\"");
escape_html(html, node->as.link.title.data, node->as.link.title.len);
}
cmark_strbuf_puts(html, "\" />");
}
break;
case CMARK_NODE_FOOTNOTE_DEFINITION:
if (entering) {
if (renderer->footnote_ix == 0) {
cmark_strbuf_puts(html, "<section class=\"footnotes\">\n<ol>\n");
}
++renderer->footnote_ix;
cmark_strbuf_puts(html, "<li id=\"fn");
char n[32];
snprintf(n, sizeof(n), "%d", renderer->footnote_ix);
cmark_strbuf_puts(html, n);
cmark_strbuf_puts(html, "\">\n");
} else {
if (S_put_footnote_backref(renderer, html)) {
cmark_strbuf_putc(html, '\n');
}
cmark_strbuf_puts(html, "</li>\n");
}
break;
case CMARK_NODE_FOOTNOTE_REFERENCE:
if (entering) {
cmark_strbuf_puts(html, "<sup class=\"footnote-ref\"><a href=\"#fn");
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, "\" id=\"fnref");
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, "\">");
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, "</a></sup>");
}
break;
default:
assert(false);
break;
}
return 1;
}
char *cmark_render_html(cmark_node *root, int options, cmark_llist *extensions) {
return cmark_render_html_with_mem(root, options, extensions, cmark_node_mem(root));
}
char *cmark_render_html_with_mem(cmark_node *root, int options, cmark_llist *extensions, cmark_mem *mem) {
char *result;
cmark_strbuf html = CMARK_BUF_INIT(mem);
cmark_event_type ev_type;
cmark_node *cur;
cmark_html_renderer renderer = {&html, NULL, NULL, 0, 0, NULL};
cmark_iter *iter = cmark_iter_new(root);
for (; extensions; extensions = extensions->next)
if (((cmark_syntax_extension *) extensions->data)->html_filter_func)
renderer.filter_extensions = cmark_llist_append(
mem,
renderer.filter_extensions,
(cmark_syntax_extension *) extensions->data);
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
S_render_node(&renderer, cur, ev_type, options);
}
if (renderer.footnote_ix) {
cmark_strbuf_puts(&html, "</ol>\n</section>\n");
}
result = (char *)cmark_strbuf_detach(&html);
cmark_llist_free(mem, renderer.filter_extensions);
cmark_iter_free(iter);
return result;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/iterator.c | #include <assert.h>
#include <stdlib.h>
#include "config.h"
#include "node.h"
#include "cmark-gfm.h"
#include "iterator.h"
cmark_iter *cmark_iter_new(cmark_node *root) {
if (root == NULL) {
return NULL;
}
cmark_mem *mem = root->content.mem;
cmark_iter *iter = (cmark_iter *)mem->calloc(1, sizeof(cmark_iter));
iter->mem = mem;
iter->root = root;
iter->cur.ev_type = CMARK_EVENT_NONE;
iter->cur.node = NULL;
iter->next.ev_type = CMARK_EVENT_ENTER;
iter->next.node = root;
return iter;
}
void cmark_iter_free(cmark_iter *iter) { iter->mem->free(iter); }
static bool S_is_leaf(cmark_node *node) {
switch (node->type) {
case CMARK_NODE_HTML_BLOCK:
case CMARK_NODE_THEMATIC_BREAK:
case CMARK_NODE_CODE_BLOCK:
case CMARK_NODE_TEXT:
case CMARK_NODE_SOFTBREAK:
case CMARK_NODE_LINEBREAK:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML_INLINE:
return 1;
}
return 0;
}
cmark_event_type cmark_iter_next(cmark_iter *iter) {
cmark_event_type ev_type = iter->next.ev_type;
cmark_node *node = iter->next.node;
iter->cur.ev_type = ev_type;
iter->cur.node = node;
if (ev_type == CMARK_EVENT_DONE) {
return ev_type;
}
/* roll forward to next item, setting both fields */
if (ev_type == CMARK_EVENT_ENTER && !S_is_leaf(node)) {
if (node->first_child == NULL) {
/* stay on this node but exit */
iter->next.ev_type = CMARK_EVENT_EXIT;
} else {
iter->next.ev_type = CMARK_EVENT_ENTER;
iter->next.node = node->first_child;
}
} else if (node == iter->root) {
/* don't move past root */
iter->next.ev_type = CMARK_EVENT_DONE;
iter->next.node = NULL;
} else if (node->next) {
iter->next.ev_type = CMARK_EVENT_ENTER;
iter->next.node = node->next;
} else if (node->parent) {
iter->next.ev_type = CMARK_EVENT_EXIT;
iter->next.node = node->parent;
} else {
assert(false);
iter->next.ev_type = CMARK_EVENT_DONE;
iter->next.node = NULL;
}
return ev_type;
}
void cmark_iter_reset(cmark_iter *iter, cmark_node *current,
cmark_event_type event_type) {
iter->next.ev_type = event_type;
iter->next.node = current;
cmark_iter_next(iter);
}
cmark_node *cmark_iter_get_node(cmark_iter *iter) { return iter->cur.node; }
cmark_event_type cmark_iter_get_event_type(cmark_iter *iter) {
return iter->cur.ev_type;
}
cmark_node *cmark_iter_get_root(cmark_iter *iter) { return iter->root; }
void cmark_consolidate_text_nodes(cmark_node *root) {
if (root == NULL) {
return;
}
cmark_iter *iter = cmark_iter_new(root);
cmark_strbuf buf = CMARK_BUF_INIT(iter->mem);
cmark_event_type ev_type;
cmark_node *cur, *tmp, *next;
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
if (ev_type == CMARK_EVENT_ENTER && cur->type == CMARK_NODE_TEXT &&
cur->next && cur->next->type == CMARK_NODE_TEXT) {
cmark_strbuf_clear(&buf);
cmark_strbuf_put(&buf, cur->as.literal.data, cur->as.literal.len);
tmp = cur->next;
while (tmp && tmp->type == CMARK_NODE_TEXT) {
cmark_iter_next(iter); // advance pointer
cmark_strbuf_put(&buf, tmp->as.literal.data, tmp->as.literal.len);
cur->end_column = tmp->end_column;
next = tmp->next;
cmark_node_free(tmp);
tmp = next;
}
cmark_chunk_free(iter->mem, &cur->as.literal);
cur->as.literal = cmark_chunk_buf_detach(&buf);
}
}
cmark_strbuf_free(&buf);
cmark_iter_free(iter);
}
void cmark_node_own(cmark_node *root) {
if (root == NULL) {
return;
}
cmark_iter *iter = cmark_iter_new(root);
cmark_event_type ev_type;
cmark_node *cur;
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
if (ev_type == CMARK_EVENT_ENTER) {
switch (cur->type) {
case CMARK_NODE_TEXT:
case CMARK_NODE_HTML_INLINE:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML_BLOCK:
cmark_chunk_to_cstr(iter->mem, &cur->as.literal);
break;
case CMARK_NODE_LINK:
cmark_chunk_to_cstr(iter->mem, &cur->as.link.url);
cmark_chunk_to_cstr(iter->mem, &cur->as.link.title);
break;
case CMARK_NODE_CUSTOM_INLINE:
cmark_chunk_to_cstr(iter->mem, &cur->as.custom.on_enter);
cmark_chunk_to_cstr(iter->mem, &cur->as.custom.on_exit);
break;
}
}
}
cmark_iter_free(iter);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/parser.h | #ifndef CMARK_PARSER_H
#define CMARK_PARSER_H
#include <stdio.h>
#include "references.h"
#include "node.h"
#include "buffer.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_LINK_LABEL_LENGTH 1000
struct cmark_parser {
struct cmark_mem *mem;
/* A hashtable of urls in the current document for cross-references */
struct cmark_map *refmap;
/* The root node of the parser, always a CMARK_NODE_DOCUMENT */
struct cmark_node *root;
/* The last open block after a line is fully processed */
struct cmark_node *current;
/* See the documentation for cmark_parser_get_line_number() in cmark.h */
int line_number;
/* See the documentation for cmark_parser_get_offset() in cmark.h */
bufsize_t offset;
/* See the documentation for cmark_parser_get_column() in cmark.h */
bufsize_t column;
/* See the documentation for cmark_parser_get_first_nonspace() in cmark.h */
bufsize_t first_nonspace;
/* See the documentation for cmark_parser_get_first_nonspace_column() in cmark.h */
bufsize_t first_nonspace_column;
bufsize_t thematic_break_kill_pos;
/* See the documentation for cmark_parser_get_indent() in cmark.h */
int indent;
/* See the documentation for cmark_parser_is_blank() in cmark.h */
bool blank;
/* See the documentation for cmark_parser_has_partially_consumed_tab() in cmark.h */
bool partially_consumed_tab;
/* Contains the currently processed line */
cmark_strbuf curline;
/* See the documentation for cmark_parser_get_last_line_length() in cmark.h */
bufsize_t last_line_length;
/* FIXME: not sure about the difference with curline */
cmark_strbuf linebuf;
/* Options set by the user, see the Options section in cmark.h */
int options;
bool last_buffer_ended_with_cr;
cmark_llist *syntax_extensions;
cmark_llist *inline_syntax_extensions;
cmark_ispunct_func backslash_ispunct;
};
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/buffer.h | #ifndef CMARK_BUFFER_H
#define CMARK_BUFFER_H
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#include <stdint.h>
#include "config.h"
#include "cmark-gfm.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
cmark_mem *mem;
unsigned char *ptr;
bufsize_t asize, size;
} cmark_strbuf;
extern unsigned char cmark_strbuf__initbuf[];
#define CMARK_BUF_INIT(mem) \
{ mem, cmark_strbuf__initbuf, 0, 0 }
/**
* Initialize a cmark_strbuf structure.
*
* For the cases where CMARK_BUF_INIT cannot be used to do static
* initialization.
*/
CMARK_GFM_EXPORT
void cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf,
bufsize_t initial_size);
/**
* Grow the buffer to hold at least `target_size` bytes.
*/
CMARK_GFM_EXPORT
void cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size);
CMARK_GFM_EXPORT
void cmark_strbuf_free(cmark_strbuf *buf);
CMARK_GFM_EXPORT
void cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b);
CMARK_GFM_EXPORT
bufsize_t cmark_strbuf_len(const cmark_strbuf *buf);
CMARK_GFM_EXPORT
int cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b);
CMARK_GFM_EXPORT
unsigned char *cmark_strbuf_detach(cmark_strbuf *buf);
CMARK_GFM_EXPORT
void cmark_strbuf_copy_cstr(char *data, bufsize_t datasize,
const cmark_strbuf *buf);
static CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) {
return (char *)buf->ptr;
}
#define cmark_strbuf_at(buf, n) ((buf)->ptr[n])
CMARK_GFM_EXPORT
void cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data,
bufsize_t len);
CMARK_GFM_EXPORT
void cmark_strbuf_sets(cmark_strbuf *buf, const char *string);
CMARK_GFM_EXPORT
void cmark_strbuf_putc(cmark_strbuf *buf, int c);
CMARK_GFM_EXPORT
void cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data,
bufsize_t len);
CMARK_GFM_EXPORT
void cmark_strbuf_puts(cmark_strbuf *buf, const char *string);
CMARK_GFM_EXPORT
void cmark_strbuf_clear(cmark_strbuf *buf);
CMARK_GFM_EXPORT
bufsize_t cmark_strbuf_strchr(const cmark_strbuf *buf, int c, bufsize_t pos);
CMARK_GFM_EXPORT
bufsize_t cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, bufsize_t pos);
CMARK_GFM_EXPORT
void cmark_strbuf_drop(cmark_strbuf *buf, bufsize_t n);
CMARK_GFM_EXPORT
void cmark_strbuf_truncate(cmark_strbuf *buf, bufsize_t len);
CMARK_GFM_EXPORT
void cmark_strbuf_rtrim(cmark_strbuf *buf);
CMARK_GFM_EXPORT
void cmark_strbuf_trim(cmark_strbuf *buf);
CMARK_GFM_EXPORT
void cmark_strbuf_normalize_whitespace(cmark_strbuf *s);
CMARK_GFM_EXPORT
void cmark_strbuf_unescape(cmark_strbuf *s);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/cmark_ctype.c | #include <stdint.h>
#include "cmark_ctype.h"
/** 1 = space, 2 = punct, 3 = digit, 4 = alpha, 0 = other
*/
static const uint8_t cmark_ctype_class[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
/* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 2 */ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
/* 3 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
/* 4 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 5 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2,
/* 6 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 7 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0,
/* 8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* a */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* b */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* c */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* d */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* e */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/**
* Returns 1 if c is a "whitespace" character as defined by the spec.
*/
int cmark_isspace(char c) { return cmark_ctype_class[(uint8_t)c] == 1; }
/**
* Returns 1 if c is an ascii punctuation character.
*/
int cmark_ispunct(char c) { return cmark_ctype_class[(uint8_t)c] == 2; }
int cmark_isalnum(char c) {
uint8_t result;
result = cmark_ctype_class[(uint8_t)c];
return (result == 3 || result == 4);
}
int cmark_isdigit(char c) { return cmark_ctype_class[(uint8_t)c] == 3; }
int cmark_isalpha(char c) { return cmark_ctype_class[(uint8_t)c] == 4; }
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/map.c | #include "map.h"
#include "utf8.h"
#include "parser.h"
// normalize map label: collapse internal whitespace to single space,
// remove leading/trailing whitespace, case fold
// Return NULL if the label is actually empty (i.e. composed solely from
// whitespace)
unsigned char *normalize_map_label(cmark_mem *mem, cmark_chunk *ref) {
cmark_strbuf normalized = CMARK_BUF_INIT(mem);
unsigned char *result;
if (ref == NULL)
return NULL;
if (ref->len == 0)
return NULL;
cmark_utf8proc_case_fold(&normalized, ref->data, ref->len);
cmark_strbuf_trim(&normalized);
cmark_strbuf_normalize_whitespace(&normalized);
result = cmark_strbuf_detach(&normalized);
assert(result);
if (result[0] == '\0') {
mem->free(result);
return NULL;
}
return result;
}
static int
labelcmp(const unsigned char *a, const unsigned char *b) {
return strcmp((const char *)a, (const char *)b);
}
static int
refcmp(const void *p1, const void *p2) {
cmark_map_entry *r1 = *(cmark_map_entry **)p1;
cmark_map_entry *r2 = *(cmark_map_entry **)p2;
int res = labelcmp(r1->label, r2->label);
return res ? res : ((int)r1->age - (int)r2->age);
}
static int
refsearch(const void *label, const void *p2) {
cmark_map_entry *ref = *(cmark_map_entry **)p2;
return labelcmp((const unsigned char *)label, ref->label);
}
static void sort_map(cmark_map *map) {
unsigned int i = 0, last = 0, size = map->size;
cmark_map_entry *r = map->refs, **sorted = NULL;
sorted = (cmark_map_entry **)map->mem->calloc(size, sizeof(cmark_map_entry *));
while (r) {
sorted[i++] = r;
r = r->next;
}
qsort(sorted, size, sizeof(cmark_map_entry *), refcmp);
for (i = 1; i < size; i++) {
if (labelcmp(sorted[i]->label, sorted[last]->label) != 0)
sorted[++last] = sorted[i];
}
map->sorted = sorted;
map->size = last + 1;
}
cmark_map_entry *cmark_map_lookup(cmark_map *map, cmark_chunk *label) {
cmark_map_entry **ref = NULL;
unsigned char *norm;
if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH)
return NULL;
if (map == NULL || !map->size)
return NULL;
norm = normalize_map_label(map->mem, label);
if (norm == NULL)
return NULL;
if (!map->sorted)
sort_map(map);
ref = (cmark_map_entry **)bsearch(norm, map->sorted, map->size, sizeof(cmark_map_entry *), refsearch);
map->mem->free(norm);
if (!ref)
return NULL;
return ref[0];
}
void cmark_map_free(cmark_map *map) {
cmark_map_entry *ref;
if (map == NULL)
return;
ref = map->refs;
while (ref) {
cmark_map_entry *next = ref->next;
map->free(map, ref);
ref = next;
}
map->mem->free(map->sorted);
map->mem->free(map);
}
cmark_map *cmark_map_new(cmark_mem *mem, cmark_map_free_f free) {
cmark_map *map = (cmark_map *)mem->calloc(1, sizeof(cmark_map));
map->mem = mem;
map->free = free;
return map;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/registry.c | #include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "cmark-gfm.h"
#include "syntax_extension.h"
#include "registry.h"
#include "plugin.h"
extern cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR;
static cmark_llist *syntax_extensions = NULL;
void cmark_register_plugin(cmark_plugin_init_func reg_fn) {
cmark_plugin *plugin = cmark_plugin_new();
if (!reg_fn(plugin)) {
cmark_plugin_free(plugin);
return;
}
cmark_llist *syntax_extensions_list = cmark_plugin_steal_syntax_extensions(plugin),
*it;
for (it = syntax_extensions_list; it; it = it->next) {
syntax_extensions = cmark_llist_append(&CMARK_DEFAULT_MEM_ALLOCATOR, syntax_extensions, it->data);
}
cmark_llist_free(&CMARK_DEFAULT_MEM_ALLOCATOR, syntax_extensions_list);
cmark_plugin_free(plugin);
}
void cmark_release_plugins(void) {
if (syntax_extensions) {
cmark_llist_free_full(
&CMARK_DEFAULT_MEM_ALLOCATOR,
syntax_extensions,
(cmark_free_func) cmark_syntax_extension_free);
syntax_extensions = NULL;
}
}
cmark_llist *cmark_list_syntax_extensions(cmark_mem *mem) {
cmark_llist *it;
cmark_llist *res = NULL;
for (it = syntax_extensions; it; it = it->next) {
res = cmark_llist_append(mem, res, it->data);
}
return res;
}
cmark_syntax_extension *cmark_find_syntax_extension(const char *name) {
cmark_llist *tmp;
for (tmp = syntax_extensions; tmp; tmp = tmp->next) {
cmark_syntax_extension *ext = (cmark_syntax_extension *) tmp->data;
if (!strcmp(ext->name, name))
return ext;
}
return NULL;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/inlines.h | #ifndef CMARK_INLINES_H
#define CMARK_INLINES_H
#ifdef __cplusplus
extern "C" {
#endif
#include "references.h"
cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url);
cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title);
CMARK_GFM_EXPORT
void cmark_parse_inlines(cmark_parser *parser,
cmark_node *parent,
cmark_map *refmap,
int options);
bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
cmark_map *refmap);
void cmark_inlines_add_special_character(unsigned char c, bool emphasis);
void cmark_inlines_remove_special_character(unsigned char c, bool emphasis);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/houdini_html_e.c | #include <assert.h>
#include <stdio.h>
#include <string.h>
#include "houdini.h"
/**
* According to the OWASP rules:
*
* & --> &
* < --> <
* > --> >
* " --> "
* ' --> ' ' is not recommended
* / --> / forward slash is included as it helps end an HTML entity
*
*/
static const char HTML_ESCAPE_TABLE[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 4,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static const char *HTML_ESCAPES[] = {"", """, "&", "'",
"/", "<", ">"};
int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, bufsize_t size,
int secure) {
bufsize_t i = 0, org, esc = 0;
while (i < size) {
org = i;
while (i < size && (esc = HTML_ESCAPE_TABLE[src[i]]) == 0)
i++;
if (i > org)
cmark_strbuf_put(ob, src + org, i - org);
/* escaping */
if (unlikely(i >= size))
break;
/* The forward slash and single quote are only escaped in secure mode */
if ((src[i] == '/' || src[i] == '\'') && !secure) {
cmark_strbuf_putc(ob, src[i]);
} else {
cmark_strbuf_puts(ob, HTML_ESCAPES[esc]);
}
i++;
}
return 1;
}
int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) {
return houdini_escape_html0(ob, src, size, 1);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/houdini_html_u.c | #include <assert.h>
#include <stdio.h>
#include <string.h>
#include "buffer.h"
#include "houdini.h"
#include "utf8.h"
#include "entities.inc"
/* Binary tree lookup code for entities added by JGM */
static const unsigned char *S_lookup(int i, int low, int hi,
const unsigned char *s, int len) {
int j;
int cmp =
strncmp((const char *)s, (const char *)cmark_entities[i].entity, len);
if (cmp == 0 && cmark_entities[i].entity[len] == 0) {
return (const unsigned char *)cmark_entities[i].bytes;
} else if (cmp <= 0 && i > low) {
j = i - ((i - low) / 2);
if (j == i)
j -= 1;
return S_lookup(j, low, i - 1, s, len);
} else if (cmp > 0 && i < hi) {
j = i + ((hi - i) / 2);
if (j == i)
j += 1;
return S_lookup(j, i + 1, hi, s, len);
} else {
return NULL;
}
}
static const unsigned char *S_lookup_entity(const unsigned char *s, int len) {
return S_lookup(CMARK_NUM_ENTITIES / 2, 0, CMARK_NUM_ENTITIES - 1, s, len);
}
bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src,
bufsize_t size) {
bufsize_t i = 0;
if (size >= 3 && src[0] == '#') {
int codepoint = 0;
int num_digits = 0;
if (_isdigit(src[1])) {
for (i = 1; i < size && _isdigit(src[i]); ++i) {
codepoint = (codepoint * 10) + (src[i] - '0');
if (codepoint >= 0x110000) {
// Keep counting digits but
// avoid integer overflow.
codepoint = 0x110000;
}
}
num_digits = i - 1;
}
else if (src[1] == 'x' || src[1] == 'X') {
for (i = 2; i < size && _isxdigit(src[i]); ++i) {
codepoint = (codepoint * 16) + ((src[i] | 32) % 39 - 9);
if (codepoint >= 0x110000) {
// Keep counting digits but
// avoid integer overflow.
codepoint = 0x110000;
}
}
num_digits = i - 2;
}
if (num_digits >= 1 && num_digits <= 8 && i < size && src[i] == ';') {
if (codepoint == 0 || (codepoint >= 0xD800 && codepoint < 0xE000) ||
codepoint >= 0x110000) {
codepoint = 0xFFFD;
}
cmark_utf8proc_encode_char(codepoint, ob);
return i + 1;
}
}
else {
if (size > CMARK_ENTITY_MAX_LENGTH)
size = CMARK_ENTITY_MAX_LENGTH;
for (i = CMARK_ENTITY_MIN_LENGTH; i < size; ++i) {
if (src[i] == ' ')
break;
if (src[i] == ';') {
const unsigned char *entity = S_lookup_entity(src, i);
if (entity != NULL) {
cmark_strbuf_puts(ob, (const char *)entity);
return i + 1;
}
break;
}
}
}
return 0;
}
int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src,
bufsize_t size) {
bufsize_t i = 0, org, ent;
while (i < size) {
org = i;
while (i < size && src[i] != '&')
i++;
if (likely(i > org)) {
if (unlikely(org == 0)) {
if (i >= size)
return 0;
cmark_strbuf_grow(ob, HOUDINI_UNESCAPED_SIZE(size));
}
cmark_strbuf_put(ob, src + org, i - org);
}
/* escaping */
if (i >= size)
break;
i++;
ent = houdini_unescape_ent(ob, src + i, size - i);
i += ent;
/* not really an entity */
if (ent == 0)
cmark_strbuf_putc(ob, '&');
}
return 1;
}
void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src,
bufsize_t size) {
if (!houdini_unescape_html(ob, src, size))
cmark_strbuf_put(ob, src, size);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/node.c | #include <stdlib.h>
#include <string.h>
#include "config.h"
#include "node.h"
#include "syntax_extension.h"
static void S_node_unlink(cmark_node *node);
#define NODE_MEM(node) cmark_node_mem(node)
bool cmark_node_can_contain_type(cmark_node *node, cmark_node_type child_type) {
if (child_type == CMARK_NODE_DOCUMENT) {
return false;
}
if (node->extension && node->extension->can_contain_func) {
return node->extension->can_contain_func(node->extension, node, child_type) != 0;
}
switch (node->type) {
case CMARK_NODE_DOCUMENT:
case CMARK_NODE_BLOCK_QUOTE:
case CMARK_NODE_FOOTNOTE_DEFINITION:
case CMARK_NODE_ITEM:
return CMARK_NODE_TYPE_BLOCK_P(child_type) && child_type != CMARK_NODE_ITEM;
case CMARK_NODE_LIST:
return child_type == CMARK_NODE_ITEM;
case CMARK_NODE_CUSTOM_BLOCK:
return true;
case CMARK_NODE_PARAGRAPH:
case CMARK_NODE_HEADING:
case CMARK_NODE_EMPH:
case CMARK_NODE_STRONG:
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
case CMARK_NODE_CUSTOM_INLINE:
return CMARK_NODE_TYPE_INLINE_P(child_type);
default:
break;
}
return false;
}
static bool S_can_contain(cmark_node *node, cmark_node *child) {
cmark_node *cur;
if (node == NULL || child == NULL) {
return false;
}
if (NODE_MEM(node) != NODE_MEM(child)) {
return 0;
}
// Verify that child is not an ancestor of node or equal to node.
cur = node;
do {
if (cur == child) {
return false;
}
cur = cur->parent;
} while (cur != NULL);
return cmark_node_can_contain_type(node, (cmark_node_type) child->type);
}
cmark_node *cmark_node_new_with_mem_and_ext(cmark_node_type type, cmark_mem *mem, cmark_syntax_extension *extension) {
cmark_node *node = (cmark_node *)mem->calloc(1, sizeof(*node));
cmark_strbuf_init(mem, &node->content, 0);
node->type = (uint16_t)type;
node->extension = extension;
switch (node->type) {
case CMARK_NODE_HEADING:
node->as.heading.level = 1;
break;
case CMARK_NODE_LIST: {
cmark_list *list = &node->as.list;
list->list_type = CMARK_BULLET_LIST;
list->start = 0;
list->tight = false;
break;
}
default:
break;
}
if (node->extension && node->extension->opaque_alloc_func) {
node->extension->opaque_alloc_func(node->extension, mem, node);
}
return node;
}
cmark_node *cmark_node_new_with_ext(cmark_node_type type, cmark_syntax_extension *extension) {
extern cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR;
return cmark_node_new_with_mem_and_ext(type, &CMARK_DEFAULT_MEM_ALLOCATOR, extension);
}
cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem)
{
return cmark_node_new_with_mem_and_ext(type, mem, NULL);
}
cmark_node *cmark_node_new(cmark_node_type type) {
return cmark_node_new_with_ext(type, NULL);
}
static void free_node_as(cmark_node *node) {
switch (node->type) {
case CMARK_NODE_CODE_BLOCK:
cmark_chunk_free(NODE_MEM(node), &node->as.code.info);
cmark_chunk_free(NODE_MEM(node), &node->as.code.literal);
break;
case CMARK_NODE_TEXT:
case CMARK_NODE_HTML_INLINE:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML_BLOCK:
case CMARK_NODE_FOOTNOTE_REFERENCE:
case CMARK_NODE_FOOTNOTE_DEFINITION:
cmark_chunk_free(NODE_MEM(node), &node->as.literal);
break;
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
cmark_chunk_free(NODE_MEM(node), &node->as.link.url);
cmark_chunk_free(NODE_MEM(node), &node->as.link.title);
break;
case CMARK_NODE_CUSTOM_BLOCK:
case CMARK_NODE_CUSTOM_INLINE:
cmark_chunk_free(NODE_MEM(node), &node->as.custom.on_enter);
cmark_chunk_free(NODE_MEM(node), &node->as.custom.on_exit);
break;
default:
break;
}
}
// Free a cmark_node list and any children.
static void S_free_nodes(cmark_node *e) {
cmark_node *next;
while (e != NULL) {
cmark_strbuf_free(&e->content);
if (e->user_data && e->user_data_free_func)
e->user_data_free_func(NODE_MEM(e), e->user_data);
if (e->as.opaque && e->extension && e->extension->opaque_free_func)
e->extension->opaque_free_func(e->extension, NODE_MEM(e), e);
free_node_as(e);
if (e->last_child) {
// Splice children into list
e->last_child->next = e->next;
e->next = e->first_child;
}
next = e->next;
NODE_MEM(e)->free(e);
e = next;
}
}
void cmark_node_free(cmark_node *node) {
S_node_unlink(node);
node->next = NULL;
S_free_nodes(node);
}
cmark_node_type cmark_node_get_type(cmark_node *node) {
if (node == NULL) {
return CMARK_NODE_NONE;
} else {
return (cmark_node_type)node->type;
}
}
int cmark_node_set_type(cmark_node * node, cmark_node_type type) {
cmark_node_type initial_type;
if (type == node->type)
return 1;
initial_type = (cmark_node_type) node->type;
node->type = (uint16_t)type;
if (!S_can_contain(node->parent, node)) {
node->type = (uint16_t)initial_type;
return 0;
}
/* We rollback the type to free the union members appropriately */
node->type = (uint16_t)initial_type;
free_node_as(node);
node->type = (uint16_t)type;
return 1;
}
const char *cmark_node_get_type_string(cmark_node *node) {
if (node == NULL) {
return "NONE";
}
if (node->extension && node->extension->get_type_string_func) {
return node->extension->get_type_string_func(node->extension, node);
}
switch (node->type) {
case CMARK_NODE_NONE:
return "none";
case CMARK_NODE_DOCUMENT:
return "document";
case CMARK_NODE_BLOCK_QUOTE:
return "block_quote";
case CMARK_NODE_LIST:
return "list";
case CMARK_NODE_ITEM:
return "item";
case CMARK_NODE_CODE_BLOCK:
return "code_block";
case CMARK_NODE_HTML_BLOCK:
return "html_block";
case CMARK_NODE_CUSTOM_BLOCK:
return "custom_block";
case CMARK_NODE_PARAGRAPH:
return "paragraph";
case CMARK_NODE_HEADING:
return "heading";
case CMARK_NODE_THEMATIC_BREAK:
return "thematic_break";
case CMARK_NODE_TEXT:
return "text";
case CMARK_NODE_SOFTBREAK:
return "softbreak";
case CMARK_NODE_LINEBREAK:
return "linebreak";
case CMARK_NODE_CODE:
return "code";
case CMARK_NODE_HTML_INLINE:
return "html_inline";
case CMARK_NODE_CUSTOM_INLINE:
return "custom_inline";
case CMARK_NODE_EMPH:
return "emph";
case CMARK_NODE_STRONG:
return "strong";
case CMARK_NODE_LINK:
return "link";
case CMARK_NODE_IMAGE:
return "image";
}
return "<unknown>";
}
cmark_node *cmark_node_next(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->next;
}
}
cmark_node *cmark_node_previous(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->prev;
}
}
cmark_node *cmark_node_parent(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->parent;
}
}
cmark_node *cmark_node_first_child(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->first_child;
}
}
cmark_node *cmark_node_last_child(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->last_child;
}
}
void *cmark_node_get_user_data(cmark_node *node) {
if (node == NULL) {
return NULL;
} else {
return node->user_data;
}
}
int cmark_node_set_user_data(cmark_node *node, void *user_data) {
if (node == NULL) {
return 0;
}
node->user_data = user_data;
return 1;
}
int cmark_node_set_user_data_free_func(cmark_node *node,
cmark_free_func free_func) {
if (node == NULL) {
return 0;
}
node->user_data_free_func = free_func;
return 1;
}
const char *cmark_node_get_literal(cmark_node *node) {
if (node == NULL) {
return NULL;
}
switch (node->type) {
case CMARK_NODE_HTML_BLOCK:
case CMARK_NODE_TEXT:
case CMARK_NODE_HTML_INLINE:
case CMARK_NODE_CODE:
case CMARK_NODE_FOOTNOTE_REFERENCE:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.literal);
case CMARK_NODE_CODE_BLOCK:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.literal);
default:
break;
}
return NULL;
}
int cmark_node_set_literal(cmark_node *node, const char *content) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_HTML_BLOCK:
case CMARK_NODE_TEXT:
case CMARK_NODE_HTML_INLINE:
case CMARK_NODE_CODE:
case CMARK_NODE_FOOTNOTE_REFERENCE:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.literal, content);
return 1;
case CMARK_NODE_CODE_BLOCK:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.literal, content);
return 1;
default:
break;
}
return 0;
}
const char *cmark_node_get_string_content(cmark_node *node) {
return (char *) node->content.ptr;
}
int cmark_node_set_string_content(cmark_node *node, const char *content) {
cmark_strbuf_sets(&node->content, content);
return true;
}
int cmark_node_get_heading_level(cmark_node *node) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_HEADING:
return node->as.heading.level;
default:
break;
}
return 0;
}
int cmark_node_set_heading_level(cmark_node *node, int level) {
if (node == NULL || level < 1 || level > 6) {
return 0;
}
switch (node->type) {
case CMARK_NODE_HEADING:
node->as.heading.level = level;
return 1;
default:
break;
}
return 0;
}
cmark_list_type cmark_node_get_list_type(cmark_node *node) {
if (node == NULL) {
return CMARK_NO_LIST;
}
if (node->type == CMARK_NODE_LIST) {
return node->as.list.list_type;
} else {
return CMARK_NO_LIST;
}
}
int cmark_node_set_list_type(cmark_node *node, cmark_list_type type) {
if (!(type == CMARK_BULLET_LIST || type == CMARK_ORDERED_LIST)) {
return 0;
}
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
node->as.list.list_type = type;
return 1;
} else {
return 0;
}
}
cmark_delim_type cmark_node_get_list_delim(cmark_node *node) {
if (node == NULL) {
return CMARK_NO_DELIM;
}
if (node->type == CMARK_NODE_LIST) {
return node->as.list.delimiter;
} else {
return CMARK_NO_DELIM;
}
}
int cmark_node_set_list_delim(cmark_node *node, cmark_delim_type delim) {
if (!(delim == CMARK_PERIOD_DELIM || delim == CMARK_PAREN_DELIM)) {
return 0;
}
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
node->as.list.delimiter = delim;
return 1;
} else {
return 0;
}
}
int cmark_node_get_list_start(cmark_node *node) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
return node->as.list.start;
} else {
return 0;
}
}
int cmark_node_set_list_start(cmark_node *node, int start) {
if (node == NULL || start < 0) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
node->as.list.start = start;
return 1;
} else {
return 0;
}
}
int cmark_node_get_list_tight(cmark_node *node) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
return node->as.list.tight;
} else {
return 0;
}
}
int cmark_node_set_list_tight(cmark_node *node, int tight) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_LIST) {
node->as.list.tight = tight == 1;
return 1;
} else {
return 0;
}
}
const char *cmark_node_get_fence_info(cmark_node *node) {
if (node == NULL) {
return NULL;
}
if (node->type == CMARK_NODE_CODE_BLOCK) {
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.info);
} else {
return NULL;
}
}
int cmark_node_set_fence_info(cmark_node *node, const char *info) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_CODE_BLOCK) {
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.info, info);
return 1;
} else {
return 0;
}
}
int cmark_node_get_fenced(cmark_node *node, int *length, int *offset, char *character) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_CODE_BLOCK) {
*length = node->as.code.fence_length;
*offset = node->as.code.fence_offset;
*character = node->as.code.fence_char;
return node->as.code.fenced;
} else {
return 0;
}
}
int cmark_node_set_fenced(cmark_node * node, int fenced,
int length, int offset, char character) {
if (node == NULL) {
return 0;
}
if (node->type == CMARK_NODE_CODE_BLOCK) {
node->as.code.fenced = (int8_t)fenced;
node->as.code.fence_length = (uint8_t)length;
node->as.code.fence_offset = (uint8_t)offset;
node->as.code.fence_char = character;
return 1;
} else {
return 0;
}
}
const char *cmark_node_get_url(cmark_node *node) {
if (node == NULL) {
return NULL;
}
switch (node->type) {
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.url);
default:
break;
}
return NULL;
}
int cmark_node_set_url(cmark_node *node, const char *url) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.url, url);
return 1;
default:
break;
}
return 0;
}
const char *cmark_node_get_title(cmark_node *node) {
if (node == NULL) {
return NULL;
}
switch (node->type) {
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.title);
default:
break;
}
return NULL;
}
int cmark_node_set_title(cmark_node *node, const char *title) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.title, title);
return 1;
default:
break;
}
return 0;
}
const char *cmark_node_get_on_enter(cmark_node *node) {
if (node == NULL) {
return NULL;
}
switch (node->type) {
case CMARK_NODE_CUSTOM_INLINE:
case CMARK_NODE_CUSTOM_BLOCK:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_enter);
default:
break;
}
return NULL;
}
int cmark_node_set_on_enter(cmark_node *node, const char *on_enter) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_CUSTOM_INLINE:
case CMARK_NODE_CUSTOM_BLOCK:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_enter, on_enter);
return 1;
default:
break;
}
return 0;
}
const char *cmark_node_get_on_exit(cmark_node *node) {
if (node == NULL) {
return NULL;
}
switch (node->type) {
case CMARK_NODE_CUSTOM_INLINE:
case CMARK_NODE_CUSTOM_BLOCK:
return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_exit);
default:
break;
}
return NULL;
}
int cmark_node_set_on_exit(cmark_node *node, const char *on_exit) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_CUSTOM_INLINE:
case CMARK_NODE_CUSTOM_BLOCK:
cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_exit, on_exit);
return 1;
default:
break;
}
return 0;
}
cmark_syntax_extension *cmark_node_get_syntax_extension(cmark_node *node) {
if (node == NULL) {
return NULL;
}
return node->extension;
}
int cmark_node_set_syntax_extension(cmark_node *node, cmark_syntax_extension *extension) {
if (node == NULL) {
return 0;
}
node->extension = extension;
return 1;
}
int cmark_node_get_start_line(cmark_node *node) {
if (node == NULL) {
return 0;
}
return node->start_line;
}
int cmark_node_get_start_column(cmark_node *node) {
if (node == NULL) {
return 0;
}
return node->start_column;
}
int cmark_node_get_end_line(cmark_node *node) {
if (node == NULL) {
return 0;
}
return node->end_line;
}
int cmark_node_get_end_column(cmark_node *node) {
if (node == NULL) {
return 0;
}
return node->end_column;
}
// Unlink a node without adjusting its next, prev, and parent pointers.
static void S_node_unlink(cmark_node *node) {
if (node == NULL) {
return;
}
if (node->prev) {
node->prev->next = node->next;
}
if (node->next) {
node->next->prev = node->prev;
}
// Adjust first_child and last_child of parent.
cmark_node *parent = node->parent;
if (parent) {
if (parent->first_child == node) {
parent->first_child = node->next;
}
if (parent->last_child == node) {
parent->last_child = node->prev;
}
}
}
void cmark_node_unlink(cmark_node *node) {
S_node_unlink(node);
node->next = NULL;
node->prev = NULL;
node->parent = NULL;
}
int cmark_node_insert_before(cmark_node *node, cmark_node *sibling) {
if (node == NULL || sibling == NULL) {
return 0;
}
if (!node->parent || !S_can_contain(node->parent, sibling)) {
return 0;
}
S_node_unlink(sibling);
cmark_node *old_prev = node->prev;
// Insert 'sibling' between 'old_prev' and 'node'.
if (old_prev) {
old_prev->next = sibling;
}
sibling->prev = old_prev;
sibling->next = node;
node->prev = sibling;
// Set new parent.
cmark_node *parent = node->parent;
sibling->parent = parent;
// Adjust first_child of parent if inserted as first child.
if (parent && !old_prev) {
parent->first_child = sibling;
}
return 1;
}
int cmark_node_insert_after(cmark_node *node, cmark_node *sibling) {
if (node == NULL || sibling == NULL) {
return 0;
}
if (!node->parent || !S_can_contain(node->parent, sibling)) {
return 0;
}
S_node_unlink(sibling);
cmark_node *old_next = node->next;
// Insert 'sibling' between 'node' and 'old_next'.
if (old_next) {
old_next->prev = sibling;
}
sibling->next = old_next;
sibling->prev = node;
node->next = sibling;
// Set new parent.
cmark_node *parent = node->parent;
sibling->parent = parent;
// Adjust last_child of parent if inserted as last child.
if (parent && !old_next) {
parent->last_child = sibling;
}
return 1;
}
int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode) {
if (!cmark_node_insert_before(oldnode, newnode)) {
return 0;
}
cmark_node_unlink(oldnode);
return 1;
}
int cmark_node_prepend_child(cmark_node *node, cmark_node *child) {
if (!S_can_contain(node, child)) {
return 0;
}
S_node_unlink(child);
cmark_node *old_first_child = node->first_child;
child->next = old_first_child;
child->prev = NULL;
child->parent = node;
node->first_child = child;
if (old_first_child) {
old_first_child->prev = child;
} else {
// Also set last_child if node previously had no children.
node->last_child = child;
}
return 1;
}
int cmark_node_append_child(cmark_node *node, cmark_node *child) {
if (!S_can_contain(node, child)) {
return 0;
}
S_node_unlink(child);
cmark_node *old_last_child = node->last_child;
child->next = NULL;
child->prev = old_last_child;
child->parent = node;
node->last_child = child;
if (old_last_child) {
old_last_child->next = child;
} else {
// Also set first_child if node previously had no children.
node->first_child = child;
}
return 1;
}
static void S_print_error(FILE *out, cmark_node *node, const char *elem) {
if (out == NULL) {
return;
}
fprintf(out, "Invalid '%s' in node type %s at %d:%d\n", elem,
cmark_node_get_type_string(node), node->start_line,
node->start_column);
}
int cmark_node_check(cmark_node *node, FILE *out) {
cmark_node *cur;
int errors = 0;
if (!node) {
return 0;
}
cur = node;
for (;;) {
if (cur->first_child) {
if (cur->first_child->prev != NULL) {
S_print_error(out, cur->first_child, "prev");
cur->first_child->prev = NULL;
++errors;
}
if (cur->first_child->parent != cur) {
S_print_error(out, cur->first_child, "parent");
cur->first_child->parent = cur;
++errors;
}
cur = cur->first_child;
continue;
}
next_sibling:
if (cur == node) {
break;
}
if (cur->next) {
if (cur->next->prev != cur) {
S_print_error(out, cur->next, "prev");
cur->next->prev = cur;
++errors;
}
if (cur->next->parent != cur->parent) {
S_print_error(out, cur->next, "parent");
cur->next->parent = cur->parent;
++errors;
}
cur = cur->next;
continue;
}
if (cur->parent->last_child != cur) {
S_print_error(out, cur->parent, "last_child");
cur->parent->last_child = cur;
++errors;
}
cur = cur->parent;
goto next_sibling;
}
return errors;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/references.h | #ifndef CMARK_REFERENCES_H
#define CMARK_REFERENCES_H
#include "map.h"
#ifdef __cplusplus
extern "C" {
#endif
struct cmark_reference {
cmark_map_entry entry;
cmark_chunk url;
cmark_chunk title;
};
typedef struct cmark_reference cmark_reference;
void cmark_reference_create(cmark_map *map, cmark_chunk *label,
cmark_chunk *url, cmark_chunk *title);
cmark_map *cmark_reference_map_new(cmark_mem *mem);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/syntax_extension.h | #ifndef CMARK_SYNTAX_EXTENSION_H
#define CMARK_SYNTAX_EXTENSION_H
#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"
#include "config.h"
struct cmark_syntax_extension {
cmark_match_block_func last_block_matches;
cmark_open_block_func try_opening_block;
cmark_match_inline_func match_inline;
cmark_inline_from_delim_func insert_inline_from_delim;
cmark_llist * special_inline_chars;
char * name;
void * priv;
bool emphasis;
cmark_free_func free_function;
cmark_get_type_string_func get_type_string_func;
cmark_can_contain_func can_contain_func;
cmark_contains_inlines_func contains_inlines_func;
cmark_common_render_func commonmark_render_func;
cmark_common_render_func plaintext_render_func;
cmark_common_render_func latex_render_func;
cmark_xml_attr_func xml_attr_func;
cmark_common_render_func man_render_func;
cmark_html_render_func html_render_func;
cmark_html_filter_func html_filter_func;
cmark_postprocess_func postprocess_func;
cmark_opaque_alloc_func opaque_alloc_func;
cmark_opaque_free_func opaque_free_func;
cmark_commonmark_escape_func commonmark_escape_func;
};
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/utf8.h | #ifndef CMARK_UTF8_H
#define CMARK_UTF8_H
#include <stdint.h>
#include "buffer.h"
#ifdef __cplusplus
extern "C" {
#endif
CMARK_GFM_EXPORT
void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
bufsize_t len);
CMARK_GFM_EXPORT
void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);
CMARK_GFM_EXPORT
int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len, int32_t *dst);
CMARK_GFM_EXPORT
void cmark_utf8proc_check(cmark_strbuf *dest, const uint8_t *line,
bufsize_t size);
CMARK_GFM_EXPORT
int cmark_utf8proc_is_space(int32_t uc);
CMARK_GFM_EXPORT
int cmark_utf8proc_is_punctuation(int32_t uc);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/registry.h | #ifndef CMARK_REGISTRY_H
#define CMARK_REGISTRY_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cmark-gfm.h"
#include "plugin.h"
CMARK_GFM_EXPORT
void cmark_register_plugin(cmark_plugin_init_func reg_fn);
CMARK_GFM_EXPORT
void cmark_release_plugins(void);
CMARK_GFM_EXPORT
cmark_llist *cmark_list_syntax_extensions(cmark_mem *mem);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/inlines.c | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "cmark_ctype.h"
#include "config.h"
#include "node.h"
#include "parser.h"
#include "references.h"
#include "cmark-gfm.h"
#include "houdini.h"
#include "utf8.h"
#include "scanners.h"
#include "inlines.h"
#include "syntax_extension.h"
static const char *EMDASH = "\xE2\x80\x94";
static const char *ENDASH = "\xE2\x80\x93";
static const char *ELLIPSES = "\xE2\x80\xA6";
static const char *LEFTDOUBLEQUOTE = "\xE2\x80\x9C";
static const char *RIGHTDOUBLEQUOTE = "\xE2\x80\x9D";
static const char *LEFTSINGLEQUOTE = "\xE2\x80\x98";
static const char *RIGHTSINGLEQUOTE = "\xE2\x80\x99";
// Macros for creating various kinds of simple.
#define make_str(subj, sc, ec, s) make_literal(subj, CMARK_NODE_TEXT, sc, ec, s)
#define make_code(subj, sc, ec, s) make_literal(subj, CMARK_NODE_CODE, sc, ec, s)
#define make_raw_html(subj, sc, ec, s) make_literal(subj, CMARK_NODE_HTML_INLINE, sc, ec, s)
#define make_linebreak(mem) make_simple(mem, CMARK_NODE_LINEBREAK)
#define make_softbreak(mem) make_simple(mem, CMARK_NODE_SOFTBREAK)
#define make_emph(mem) make_simple(mem, CMARK_NODE_EMPH)
#define make_strong(mem) make_simple(mem, CMARK_NODE_STRONG)
#define MAXBACKTICKS 80
typedef struct bracket {
struct bracket *previous;
struct delimiter *previous_delimiter;
cmark_node *inl_text;
bufsize_t position;
bool image;
bool active;
bool bracket_after;
} bracket;
typedef struct subject{
cmark_mem *mem;
cmark_chunk input;
int line;
bufsize_t pos;
int block_offset;
int column_offset;
cmark_map *refmap;
delimiter *last_delim;
bracket *last_bracket;
bufsize_t backticks[MAXBACKTICKS + 1];
bool scanned_for_backticks;
} subject;
// Extensions may populate this.
static int8_t SKIP_CHARS[256];
static CMARK_INLINE bool S_is_line_end_char(char c) {
return (c == '\n' || c == '\r');
}
static delimiter *S_insert_emph(subject *subj, delimiter *opener,
delimiter *closer);
static int parse_inline(cmark_parser *parser, subject *subj, cmark_node *parent, int options);
static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,
cmark_chunk *buffer, cmark_map *refmap);
static bufsize_t subject_find_special_char(subject *subj, int options);
// Create an inline with a literal string value.
static CMARK_INLINE cmark_node *make_literal(subject *subj, cmark_node_type t,
int start_column, int end_column,
cmark_chunk s) {
cmark_node *e = (cmark_node *)subj->mem->calloc(1, sizeof(*e));
cmark_strbuf_init(subj->mem, &e->content, 0);
e->type = (uint16_t)t;
e->as.literal = s;
e->start_line = e->end_line = subj->line;
// columns are 1 based.
e->start_column = start_column + 1 + subj->column_offset + subj->block_offset;
e->end_column = end_column + 1 + subj->column_offset + subj->block_offset;
return e;
}
// Create an inline with no value.
static CMARK_INLINE cmark_node *make_simple(cmark_mem *mem, cmark_node_type t) {
cmark_node *e = (cmark_node *)mem->calloc(1, sizeof(*e));
cmark_strbuf_init(mem, &e->content, 0);
e->type = (uint16_t)t;
return e;
}
// Like make_str, but parses entities.
static cmark_node *make_str_with_entities(subject *subj,
int start_column, int end_column,
cmark_chunk *content) {
cmark_strbuf unescaped = CMARK_BUF_INIT(subj->mem);
if (houdini_unescape_html(&unescaped, content->data, content->len)) {
return make_str(subj, start_column, end_column, cmark_chunk_buf_detach(&unescaped));
} else {
return make_str(subj, start_column, end_column, *content);
}
}
// Duplicate a chunk by creating a copy of the buffer not by reusing the
// buffer like cmark_chunk_dup does.
static cmark_chunk chunk_clone(cmark_mem *mem, cmark_chunk *src) {
cmark_chunk c;
bufsize_t len = src->len;
c.len = len;
c.data = (unsigned char *)mem->calloc(len + 1, 1);
c.alloc = 1;
if (len)
memcpy(c.data, src->data, len);
c.data[len] = '\0';
return c;
}
static cmark_chunk cmark_clean_autolink(cmark_mem *mem, cmark_chunk *url,
int is_email) {
cmark_strbuf buf = CMARK_BUF_INIT(mem);
cmark_chunk_trim(url);
if (url->len == 0) {
cmark_chunk result = CMARK_CHUNK_EMPTY;
return result;
}
if (is_email)
cmark_strbuf_puts(&buf, "mailto:");
houdini_unescape_html_f(&buf, url->data, url->len);
return cmark_chunk_buf_detach(&buf);
}
static CMARK_INLINE cmark_node *make_autolink(subject *subj,
int start_column, int end_column,
cmark_chunk url, int is_email) {
cmark_node *link = make_simple(subj->mem, CMARK_NODE_LINK);
link->as.link.url = cmark_clean_autolink(subj->mem, &url, is_email);
link->as.link.title = cmark_chunk_literal("");
link->start_line = link->end_line = subj->line;
link->start_column = start_column + 1;
link->end_column = end_column + 1;
cmark_node_append_child(link, make_str_with_entities(subj, start_column + 1, end_column - 1, &url));
return link;
}
static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,
cmark_chunk *chunk, cmark_map *refmap) {
int i;
e->mem = mem;
e->input = *chunk;
e->line = line_number;
e->pos = 0;
e->block_offset = block_offset;
e->column_offset = 0;
e->refmap = refmap;
e->last_delim = NULL;
e->last_bracket = NULL;
for (i = 0; i <= MAXBACKTICKS; i++) {
e->backticks[i] = 0;
}
e->scanned_for_backticks = false;
}
static CMARK_INLINE int isbacktick(int c) { return (c == '`'); }
static CMARK_INLINE unsigned char peek_char_n(subject *subj, bufsize_t n) {
// NULL bytes should have been stripped out by now. If they're
// present, it's a programming error:
assert(!(subj->pos + n < subj->input.len && subj->input.data[subj->pos + n] == 0));
return (subj->pos + n < subj->input.len) ? subj->input.data[subj->pos + n] : 0;
}
static CMARK_INLINE unsigned char peek_char(subject *subj) {
return peek_char_n(subj, 0);
}
static CMARK_INLINE unsigned char peek_at(subject *subj, bufsize_t pos) {
return subj->input.data[pos];
}
// Return true if there are more characters in the subject.
static CMARK_INLINE int is_eof(subject *subj) {
return (subj->pos >= subj->input.len);
}
// Advance the subject. Doesn't check for eof.
#define advance(subj) (subj)->pos += 1
static CMARK_INLINE bool skip_spaces(subject *subj) {
bool skipped = false;
while (peek_char(subj) == ' ' || peek_char(subj) == '\t') {
advance(subj);
skipped = true;
}
return skipped;
}
static CMARK_INLINE bool skip_line_end(subject *subj) {
bool seen_line_end_char = false;
if (peek_char(subj) == '\r') {
advance(subj);
seen_line_end_char = true;
}
if (peek_char(subj) == '\n') {
advance(subj);
seen_line_end_char = true;
}
return seen_line_end_char || is_eof(subj);
}
// Take characters while a predicate holds, and return a string.
static CMARK_INLINE cmark_chunk take_while(subject *subj, int (*f)(int)) {
unsigned char c;
bufsize_t startpos = subj->pos;
bufsize_t len = 0;
while ((c = peek_char(subj)) && (*f)(c)) {
advance(subj);
len++;
}
return cmark_chunk_dup(&subj->input, startpos, len);
}
// Return the number of newlines in a given span of text in a subject. If
// the number is greater than zero, also return the number of characters
// between the last newline and the end of the span in `since_newline`.
static int count_newlines(subject *subj, bufsize_t from, bufsize_t len, int *since_newline) {
int nls = 0;
int since_nl = 0;
while (len--) {
if (subj->input.data[from++] == '\n') {
++nls;
since_nl = 0;
} else {
++since_nl;
}
}
if (!nls)
return 0;
*since_newline = since_nl;
return nls;
}
// Adjust `node`'s `end_line`, `end_column`, and `subj`'s `line` and
// `column_offset` according to the number of newlines in a just-matched span
// of text in `subj`.
static void adjust_subj_node_newlines(subject *subj, cmark_node *node, int matchlen, int extra, int options) {
if (!(options & CMARK_OPT_SOURCEPOS)) {
return;
}
int since_newline;
int newlines = count_newlines(subj, subj->pos - matchlen - extra, matchlen, &since_newline);
if (newlines) {
subj->line += newlines;
node->end_line += newlines;
node->end_column = since_newline;
subj->column_offset = -subj->pos + since_newline + extra;
}
}
// Try to process a backtick code span that began with a
// span of ticks of length openticklength length (already
// parsed). Return 0 if you don't find matching closing
// backticks, otherwise return the position in the subject
// after the closing backticks.
static bufsize_t scan_to_closing_backticks(subject *subj,
bufsize_t openticklength) {
bool found = false;
if (openticklength > MAXBACKTICKS) {
// we limit backtick string length because of the array subj->backticks:
return 0;
}
if (subj->scanned_for_backticks &&
subj->backticks[openticklength] <= subj->pos) {
// return if we already know there's no closer
return 0;
}
while (!found) {
// read non backticks
unsigned char c;
while ((c = peek_char(subj)) && c != '`') {
advance(subj);
}
if (is_eof(subj)) {
break;
}
bufsize_t numticks = 0;
while (peek_char(subj) == '`') {
advance(subj);
numticks++;
}
// store position of ender
if (numticks <= MAXBACKTICKS) {
subj->backticks[numticks] = subj->pos - numticks;
}
if (numticks == openticklength) {
return (subj->pos);
}
}
// got through whole input without finding closer
subj->scanned_for_backticks = true;
return 0;
}
// Destructively modify string, converting newlines to
// spaces, then removing a single leading + trailing space,
// unless the code span consists entirely of space characters.
static void S_normalize_code(cmark_strbuf *s) {
bufsize_t r, w;
bool contains_nonspace = false;
for (r = 0, w = 0; r < s->size; ++r) {
switch (s->ptr[r]) {
case '\r':
if (s->ptr[r + 1] != '\n') {
s->ptr[w++] = ' ';
}
break;
case '\n':
s->ptr[w++] = ' ';
break;
default:
s->ptr[w++] = s->ptr[r];
}
if (s->ptr[r] != ' ') {
contains_nonspace = true;
}
}
// begins and ends with space?
if (contains_nonspace &&
s->ptr[0] == ' ' && s->ptr[w - 1] == ' ') {
cmark_strbuf_drop(s, 1);
cmark_strbuf_truncate(s, w - 2);
} else {
cmark_strbuf_truncate(s, w);
}
}
// Parse backtick code section or raw backticks, return an inline.
// Assumes that the subject has a backtick at the current position.
static cmark_node *handle_backticks(subject *subj, int options) {
cmark_chunk openticks = take_while(subj, isbacktick);
bufsize_t startpos = subj->pos;
bufsize_t endpos = scan_to_closing_backticks(subj, openticks.len);
if (endpos == 0) { // not found
subj->pos = startpos; // rewind
return make_str(subj, subj->pos, subj->pos, openticks);
} else {
cmark_strbuf buf = CMARK_BUF_INIT(subj->mem);
cmark_strbuf_set(&buf, subj->input.data + startpos,
endpos - startpos - openticks.len);
S_normalize_code(&buf);
cmark_node *node = make_code(subj, startpos, endpos - openticks.len - 1, cmark_chunk_buf_detach(&buf));
adjust_subj_node_newlines(subj, node, endpos - startpos, openticks.len, options);
return node;
}
}
// Scan ***, **, or * and return number scanned, or 0.
// Advances position.
static int scan_delims(subject *subj, unsigned char c, bool *can_open,
bool *can_close) {
int numdelims = 0;
bufsize_t before_char_pos, after_char_pos;
int32_t after_char = 0;
int32_t before_char = 0;
int len;
bool left_flanking, right_flanking;
if (subj->pos == 0) {
before_char = 10;
} else {
before_char_pos = subj->pos - 1;
// walk back to the beginning of the UTF_8 sequence:
while ((peek_at(subj, before_char_pos) >> 6 == 2 || SKIP_CHARS[peek_at(subj, before_char_pos)]) && before_char_pos > 0) {
before_char_pos -= 1;
}
len = cmark_utf8proc_iterate(subj->input.data + before_char_pos,
subj->pos - before_char_pos, &before_char);
if (len == -1 || (before_char < 256 && SKIP_CHARS[(unsigned char) before_char])) {
before_char = 10;
}
}
if (c == '\'' || c == '"') {
numdelims++;
advance(subj); // limit to 1 delim for quotes
} else {
while (peek_char(subj) == c) {
numdelims++;
advance(subj);
}
}
if (subj->pos == subj->input.len) {
after_char = 10;
} else {
after_char_pos = subj->pos;
while (SKIP_CHARS[peek_at(subj, after_char_pos)] && after_char_pos < subj->input.len) {
after_char_pos += 1;
}
len = cmark_utf8proc_iterate(subj->input.data + after_char_pos,
subj->input.len - after_char_pos, &after_char);
if (len == -1 || (after_char < 256 && SKIP_CHARS[(unsigned char) after_char])) {
after_char = 10;
}
}
left_flanking = numdelims > 0 && !cmark_utf8proc_is_space(after_char) &&
(!cmark_utf8proc_is_punctuation(after_char) ||
cmark_utf8proc_is_space(before_char) ||
cmark_utf8proc_is_punctuation(before_char));
right_flanking = numdelims > 0 && !cmark_utf8proc_is_space(before_char) &&
(!cmark_utf8proc_is_punctuation(before_char) ||
cmark_utf8proc_is_space(after_char) ||
cmark_utf8proc_is_punctuation(after_char));
if (c == '_') {
*can_open = left_flanking &&
(!right_flanking || cmark_utf8proc_is_punctuation(before_char));
*can_close = right_flanking &&
(!left_flanking || cmark_utf8proc_is_punctuation(after_char));
} else if (c == '\'' || c == '"') {
*can_open = left_flanking && !right_flanking &&
before_char != ']' && before_char != ')';
*can_close = right_flanking;
} else {
*can_open = left_flanking;
*can_close = right_flanking;
}
return numdelims;
}
/*
static void print_delimiters(subject *subj)
{
delimiter *delim;
delim = subj->last_delim;
while (delim != NULL) {
printf("Item at stack pos %p: %d %d %d next(%p) prev(%p)\n",
(void*)delim, delim->delim_char,
delim->can_open, delim->can_close,
(void*)delim->next, (void*)delim->previous);
delim = delim->previous;
}
}
*/
static void remove_delimiter(subject *subj, delimiter *delim) {
if (delim == NULL)
return;
if (delim->next == NULL) {
// end of list:
assert(delim == subj->last_delim);
subj->last_delim = delim->previous;
} else {
delim->next->previous = delim->previous;
}
if (delim->previous != NULL) {
delim->previous->next = delim->next;
}
subj->mem->free(delim);
}
static void pop_bracket(subject *subj) {
bracket *b;
if (subj->last_bracket == NULL)
return;
b = subj->last_bracket;
subj->last_bracket = subj->last_bracket->previous;
subj->mem->free(b);
}
static void push_delimiter(subject *subj, unsigned char c, bool can_open,
bool can_close, cmark_node *inl_text) {
delimiter *delim = (delimiter *)subj->mem->calloc(1, sizeof(delimiter));
delim->delim_char = c;
delim->can_open = can_open;
delim->can_close = can_close;
delim->inl_text = inl_text;
delim->length = inl_text->as.literal.len;
delim->previous = subj->last_delim;
delim->next = NULL;
if (delim->previous != NULL) {
delim->previous->next = delim;
}
subj->last_delim = delim;
}
static void push_bracket(subject *subj, bool image, cmark_node *inl_text) {
bracket *b = (bracket *)subj->mem->calloc(1, sizeof(bracket));
if (subj->last_bracket != NULL) {
subj->last_bracket->bracket_after = true;
}
b->image = image;
b->active = true;
b->inl_text = inl_text;
b->previous = subj->last_bracket;
b->previous_delimiter = subj->last_delim;
b->position = subj->pos;
b->bracket_after = false;
subj->last_bracket = b;
}
// Assumes the subject has a c at the current position.
static cmark_node *handle_delim(subject *subj, unsigned char c, bool smart) {
bufsize_t numdelims;
cmark_node *inl_text;
bool can_open, can_close;
cmark_chunk contents;
numdelims = scan_delims(subj, c, &can_open, &can_close);
if (c == '\'' && smart) {
contents = cmark_chunk_literal(RIGHTSINGLEQUOTE);
} else if (c == '"' && smart) {
contents =
cmark_chunk_literal(can_close ? RIGHTDOUBLEQUOTE : LEFTDOUBLEQUOTE);
} else {
contents = cmark_chunk_dup(&subj->input, subj->pos - numdelims, numdelims);
}
inl_text = make_str(subj, subj->pos - numdelims, subj->pos - 1, contents);
if ((can_open || can_close) && (!(c == '\'' || c == '"') || smart)) {
push_delimiter(subj, c, can_open, can_close, inl_text);
}
return inl_text;
}
// Assumes we have a hyphen at the current position.
static cmark_node *handle_hyphen(subject *subj, bool smart) {
int startpos = subj->pos;
advance(subj);
if (!smart || peek_char(subj) != '-') {
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("-"));
}
while (smart && peek_char(subj) == '-') {
advance(subj);
}
int numhyphens = subj->pos - startpos;
int en_count = 0;
int em_count = 0;
int i;
cmark_strbuf buf = CMARK_BUF_INIT(subj->mem);
if (numhyphens % 3 == 0) { // if divisible by 3, use all em dashes
em_count = numhyphens / 3;
} else if (numhyphens % 2 == 0) { // if divisible by 2, use all en dashes
en_count = numhyphens / 2;
} else if (numhyphens % 3 == 2) { // use one en dash at end
en_count = 1;
em_count = (numhyphens - 2) / 3;
} else { // use two en dashes at the end
en_count = 2;
em_count = (numhyphens - 4) / 3;
}
for (i = em_count; i > 0; i--) {
cmark_strbuf_puts(&buf, EMDASH);
}
for (i = en_count; i > 0; i--) {
cmark_strbuf_puts(&buf, ENDASH);
}
return make_str(subj, startpos, subj->pos - 1, cmark_chunk_buf_detach(&buf));
}
// Assumes we have a period at the current position.
static cmark_node *handle_period(subject *subj, bool smart) {
advance(subj);
if (smart && peek_char(subj) == '.') {
advance(subj);
if (peek_char(subj) == '.') {
advance(subj);
return make_str(subj, subj->pos - 3, subj->pos - 1, cmark_chunk_literal(ELLIPSES));
} else {
return make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_literal(".."));
}
} else {
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("."));
}
}
static cmark_syntax_extension *get_extension_for_special_char(cmark_parser *parser, unsigned char c) {
cmark_llist *tmp_ext;
for (tmp_ext = parser->inline_syntax_extensions; tmp_ext; tmp_ext=tmp_ext->next) {
cmark_syntax_extension *ext = (cmark_syntax_extension *) tmp_ext->data;
cmark_llist *tmp_char;
for (tmp_char = ext->special_inline_chars; tmp_char; tmp_char=tmp_char->next) {
unsigned char tmp_c = (unsigned char)(size_t)tmp_char->data;
if (tmp_c == c) {
return ext;
}
}
}
return NULL;
}
static void process_emphasis(cmark_parser *parser, subject *subj, delimiter *stack_bottom) {
delimiter *closer = subj->last_delim;
delimiter *opener;
delimiter *old_closer;
bool opener_found;
delimiter *openers_bottom[3][128];
int i;
// initialize openers_bottom:
memset(&openers_bottom, 0, sizeof(openers_bottom));
for (i=0; i < 3; i++) {
openers_bottom[i]['*'] = stack_bottom;
openers_bottom[i]['_'] = stack_bottom;
openers_bottom[i]['\''] = stack_bottom;
openers_bottom[i]['"'] = stack_bottom;
}
// move back to first relevant delim.
while (closer != NULL && closer->previous != stack_bottom) {
closer = closer->previous;
}
// now move forward, looking for closers, and handling each
while (closer != NULL) {
cmark_syntax_extension *extension = get_extension_for_special_char(parser, closer->delim_char);
if (closer->can_close) {
// Now look backwards for first matching opener:
opener = closer->previous;
opener_found = false;
while (opener != NULL && opener != stack_bottom &&
opener != openers_bottom[closer->length % 3][closer->delim_char]) {
if (opener->can_open && opener->delim_char == closer->delim_char) {
// interior closer of size 2 can't match opener of size 1
// or of size 1 can't match 2
if (!(closer->can_open || opener->can_close) ||
closer->length % 3 == 0 ||
(opener->length + closer->length) % 3 != 0) {
opener_found = true;
break;
}
}
opener = opener->previous;
}
old_closer = closer;
if (extension) {
if (opener_found)
closer = extension->insert_inline_from_delim(extension, parser, subj, opener, closer);
else
closer = closer->next;
} else if (closer->delim_char == '*' || closer->delim_char == '_') {
if (opener_found) {
closer = S_insert_emph(subj, opener, closer);
} else {
closer = closer->next;
}
} else if (closer->delim_char == '\'') {
cmark_chunk_free(subj->mem, &closer->inl_text->as.literal);
closer->inl_text->as.literal = cmark_chunk_literal(RIGHTSINGLEQUOTE);
if (opener_found) {
cmark_chunk_free(subj->mem, &opener->inl_text->as.literal);
opener->inl_text->as.literal = cmark_chunk_literal(LEFTSINGLEQUOTE);
}
closer = closer->next;
} else if (closer->delim_char == '"') {
cmark_chunk_free(subj->mem, &closer->inl_text->as.literal);
closer->inl_text->as.literal = cmark_chunk_literal(RIGHTDOUBLEQUOTE);
if (opener_found) {
cmark_chunk_free(subj->mem, &opener->inl_text->as.literal);
opener->inl_text->as.literal = cmark_chunk_literal(LEFTDOUBLEQUOTE);
}
closer = closer->next;
}
if (!opener_found) {
// set lower bound for future searches for openers
openers_bottom[old_closer->length % 3][old_closer->delim_char] =
old_closer->previous;
if (!old_closer->can_open) {
// we can remove a closer that can't be an
// opener, once we've seen there's no
// matching opener:
remove_delimiter(subj, old_closer);
}
}
} else {
closer = closer->next;
}
}
// free all delimiters in list until stack_bottom:
while (subj->last_delim != NULL && subj->last_delim != stack_bottom) {
remove_delimiter(subj, subj->last_delim);
}
}
static delimiter *S_insert_emph(subject *subj, delimiter *opener,
delimiter *closer) {
delimiter *delim, *tmp_delim;
bufsize_t use_delims;
cmark_node *opener_inl = opener->inl_text;
cmark_node *closer_inl = closer->inl_text;
bufsize_t opener_num_chars = opener_inl->as.literal.len;
bufsize_t closer_num_chars = closer_inl->as.literal.len;
cmark_node *tmp, *tmpnext, *emph;
// calculate the actual number of characters used from this closer
use_delims = (closer_num_chars >= 2 && opener_num_chars >= 2) ? 2 : 1;
// remove used characters from associated inlines.
opener_num_chars -= use_delims;
closer_num_chars -= use_delims;
opener_inl->as.literal.len = opener_num_chars;
closer_inl->as.literal.len = closer_num_chars;
// free delimiters between opener and closer
delim = closer->previous;
while (delim != NULL && delim != opener) {
tmp_delim = delim->previous;
remove_delimiter(subj, delim);
delim = tmp_delim;
}
// create new emph or strong, and splice it in to our inlines
// between the opener and closer
emph = use_delims == 1 ? make_emph(subj->mem) : make_strong(subj->mem);
tmp = opener_inl->next;
while (tmp && tmp != closer_inl) {
tmpnext = tmp->next;
cmark_node_append_child(emph, tmp);
tmp = tmpnext;
}
cmark_node_insert_after(opener_inl, emph);
emph->start_line = opener_inl->start_line;
emph->end_line = closer_inl->end_line;
emph->start_column = opener_inl->start_column;
emph->end_column = closer_inl->end_column;
// if opener has 0 characters, remove it and its associated inline
if (opener_num_chars == 0) {
cmark_node_free(opener_inl);
remove_delimiter(subj, opener);
}
// if closer has 0 characters, remove it and its associated inline
if (closer_num_chars == 0) {
// remove empty closer inline
cmark_node_free(closer_inl);
// remove closer from list
tmp_delim = closer->next;
remove_delimiter(subj, closer);
closer = tmp_delim;
}
return closer;
}
// Parse backslash-escape or just a backslash, returning an inline.
static cmark_node *handle_backslash(cmark_parser *parser, subject *subj) {
advance(subj);
unsigned char nextchar = peek_char(subj);
if ((parser->backslash_ispunct ? parser->backslash_ispunct : cmark_ispunct)(nextchar)) {
// only ascii symbols and newline can be escaped
advance(subj);
return make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_dup(&subj->input, subj->pos - 1, 1));
} else if (!is_eof(subj) && skip_line_end(subj)) {
return make_linebreak(subj->mem);
} else {
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("\\"));
}
}
// Parse an entity or a regular "&" string.
// Assumes the subject has an '&' character at the current position.
static cmark_node *handle_entity(subject *subj) {
cmark_strbuf ent = CMARK_BUF_INIT(subj->mem);
bufsize_t len;
advance(subj);
len = houdini_unescape_ent(&ent, subj->input.data + subj->pos,
subj->input.len - subj->pos);
if (len == 0)
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("&"));
subj->pos += len;
return make_str(subj, subj->pos - 1 - len, subj->pos - 1, cmark_chunk_buf_detach(&ent));
}
// Clean a URL: remove surrounding whitespace, and remove \ that escape
// punctuation.
cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url) {
cmark_strbuf buf = CMARK_BUF_INIT(mem);
cmark_chunk_trim(url);
if (url->len == 0) {
cmark_chunk result = CMARK_CHUNK_EMPTY;
return result;
}
houdini_unescape_html_f(&buf, url->data, url->len);
cmark_strbuf_unescape(&buf);
return cmark_chunk_buf_detach(&buf);
}
cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title) {
cmark_strbuf buf = CMARK_BUF_INIT(mem);
unsigned char first, last;
if (title->len == 0) {
cmark_chunk result = CMARK_CHUNK_EMPTY;
return result;
}
first = title->data[0];
last = title->data[title->len - 1];
// remove surrounding quotes if any:
if ((first == '\'' && last == '\'') || (first == '(' && last == ')') ||
(first == '"' && last == '"')) {
houdini_unescape_html_f(&buf, title->data + 1, title->len - 2);
} else {
houdini_unescape_html_f(&buf, title->data, title->len);
}
cmark_strbuf_unescape(&buf);
return cmark_chunk_buf_detach(&buf);
}
// Parse an autolink or HTML tag.
// Assumes the subject has a '<' character at the current position.
static cmark_node *handle_pointy_brace(subject *subj, int options) {
bufsize_t matchlen = 0;
cmark_chunk contents;
advance(subj); // advance past first <
// first try to match a URL autolink
matchlen = scan_autolink_uri(&subj->input, subj->pos);
if (matchlen > 0) {
contents = cmark_chunk_dup(&subj->input, subj->pos, matchlen - 1);
subj->pos += matchlen;
return make_autolink(subj, subj->pos - 1 - matchlen, subj->pos - 1, contents, 0);
}
// next try to match an email autolink
matchlen = scan_autolink_email(&subj->input, subj->pos);
if (matchlen > 0) {
contents = cmark_chunk_dup(&subj->input, subj->pos, matchlen - 1);
subj->pos += matchlen;
return make_autolink(subj, subj->pos - 1 - matchlen, subj->pos - 1, contents, 1);
}
// finally, try to match an html tag
matchlen = scan_html_tag(&subj->input, subj->pos);
if (matchlen > 0) {
contents = cmark_chunk_dup(&subj->input, subj->pos - 1, matchlen + 1);
subj->pos += matchlen;
cmark_node *node = make_raw_html(subj, subj->pos - matchlen - 1, subj->pos - 1, contents);
adjust_subj_node_newlines(subj, node, matchlen, 1, options);
return node;
}
if (options & CMARK_OPT_LIBERAL_HTML_TAG) {
matchlen = scan_liberal_html_tag(&subj->input, subj->pos);
if (matchlen > 0) {
contents = cmark_chunk_dup(&subj->input, subj->pos - 1, matchlen + 1);
subj->pos += matchlen;
cmark_node *node = make_raw_html(subj, subj->pos - matchlen - 1, subj->pos - 1, contents);
adjust_subj_node_newlines(subj, node, matchlen, 1, options);
return node;
}
}
// if nothing matches, just return the opening <:
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("<"));
}
// Parse a link label. Returns 1 if successful.
// Note: unescaped brackets are not allowed in labels.
// The label begins with `[` and ends with the first `]` character
// encountered. Backticks in labels do not start code spans.
static int link_label(subject *subj, cmark_chunk *raw_label) {
bufsize_t startpos = subj->pos;
int length = 0;
unsigned char c;
// advance past [
if (peek_char(subj) == '[') {
advance(subj);
} else {
return 0;
}
while ((c = peek_char(subj)) && c != '[' && c != ']') {
if (c == '\\') {
advance(subj);
length++;
if (cmark_ispunct(peek_char(subj))) {
advance(subj);
length++;
}
} else {
advance(subj);
length++;
}
if (length > MAX_LINK_LABEL_LENGTH) {
goto noMatch;
}
}
if (c == ']') { // match found
*raw_label =
cmark_chunk_dup(&subj->input, startpos + 1, subj->pos - (startpos + 1));
cmark_chunk_trim(raw_label);
advance(subj); // advance past ]
return 1;
}
noMatch:
subj->pos = startpos; // rewind
return 0;
}
static bufsize_t manual_scan_link_url_2(cmark_chunk *input, bufsize_t offset,
cmark_chunk *output) {
bufsize_t i = offset;
size_t nb_p = 0;
while (i < input->len) {
if (input->data[i] == '\\' &&
i + 1 < input-> len &&
cmark_ispunct(input->data[i+1]))
i += 2;
else if (input->data[i] == '(') {
++nb_p;
++i;
if (nb_p > 32)
return -1;
} else if (input->data[i] == ')') {
if (nb_p == 0)
break;
--nb_p;
++i;
} else if (cmark_isspace(input->data[i])) {
if (i == offset) {
return -1;
}
break;
} else {
++i;
}
}
if (i >= input->len)
return -1;
{
cmark_chunk result = {input->data + offset, i - offset, 0};
*output = result;
}
return i - offset;
}
static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset,
cmark_chunk *output) {
bufsize_t i = offset;
if (i < input->len && input->data[i] == '<') {
++i;
while (i < input->len) {
if (input->data[i] == '>') {
++i;
break;
} else if (input->data[i] == '\\')
i += 2;
else if (input->data[i] == '\n' || input->data[i] == '<')
return -1;
else
++i;
}
} else {
return manual_scan_link_url_2(input, offset, output);
}
if (i >= input->len)
return -1;
{
cmark_chunk result = {input->data + offset + 1, i - 2 - offset, 0};
*output = result;
}
return i - offset;
}
// Return a link, an image, or a literal close bracket.
static cmark_node *handle_close_bracket(cmark_parser *parser, subject *subj) {
bufsize_t initial_pos, after_link_text_pos;
bufsize_t endurl, starttitle, endtitle, endall;
bufsize_t sps, n;
cmark_reference *ref = NULL;
cmark_chunk url_chunk, title_chunk;
cmark_chunk url, title;
bracket *opener;
cmark_node *inl;
cmark_chunk raw_label;
int found_label;
cmark_node *tmp, *tmpnext;
bool is_image;
advance(subj); // advance past ]
initial_pos = subj->pos;
// get last [ or ![
opener = subj->last_bracket;
if (opener == NULL) {
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("]"));
}
if (!opener->active) {
// take delimiter off stack
pop_bracket(subj);
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("]"));
}
// If we got here, we matched a potential link/image text.
// Now we check to see if it's a link/image.
is_image = opener->image;
after_link_text_pos = subj->pos;
// First, look for an inline link.
if (peek_char(subj) == '(' &&
((sps = scan_spacechars(&subj->input, subj->pos + 1)) > -1) &&
((n = manual_scan_link_url(&subj->input, subj->pos + 1 + sps,
&url_chunk)) > -1)) {
// try to parse an explicit link:
endurl = subj->pos + 1 + sps + n;
starttitle = endurl + scan_spacechars(&subj->input, endurl);
// ensure there are spaces btw url and title
endtitle = (starttitle == endurl)
? starttitle
: starttitle + scan_link_title(&subj->input, starttitle);
endall = endtitle + scan_spacechars(&subj->input, endtitle);
if (peek_at(subj, endall) == ')') {
subj->pos = endall + 1;
title_chunk =
cmark_chunk_dup(&subj->input, starttitle, endtitle - starttitle);
url = cmark_clean_url(subj->mem, &url_chunk);
title = cmark_clean_title(subj->mem, &title_chunk);
cmark_chunk_free(subj->mem, &url_chunk);
cmark_chunk_free(subj->mem, &title_chunk);
goto match;
} else {
// it could still be a shortcut reference link
subj->pos = after_link_text_pos;
}
}
// Next, look for a following [link label] that matches in refmap.
// skip spaces
raw_label = cmark_chunk_literal("");
found_label = link_label(subj, &raw_label);
if (!found_label) {
// If we have a shortcut reference link, back up
// to before the spacse we skipped.
subj->pos = initial_pos;
}
if ((!found_label || raw_label.len == 0) && !opener->bracket_after) {
cmark_chunk_free(subj->mem, &raw_label);
raw_label = cmark_chunk_dup(&subj->input, opener->position,
initial_pos - opener->position - 1);
found_label = true;
}
if (found_label) {
ref = (cmark_reference *)cmark_map_lookup(subj->refmap, &raw_label);
cmark_chunk_free(subj->mem, &raw_label);
}
if (ref != NULL) { // found
url = chunk_clone(subj->mem, &ref->url);
title = chunk_clone(subj->mem, &ref->title);
goto match;
} else {
goto noMatch;
}
noMatch:
// If we fall through to here, it means we didn't match a link.
// What if we're a footnote link?
if (parser->options & CMARK_OPT_FOOTNOTES &&
opener->inl_text->next &&
opener->inl_text->next->type == CMARK_NODE_TEXT &&
!opener->inl_text->next->next) {
cmark_chunk *literal = &opener->inl_text->next->as.literal;
if (literal->len > 1 && literal->data[0] == '^') {
inl = make_simple(subj->mem, CMARK_NODE_FOOTNOTE_REFERENCE);
inl->as.literal = cmark_chunk_dup(literal, 1, literal->len - 1);
inl->start_line = inl->end_line = subj->line;
inl->start_column = opener->inl_text->start_column;
inl->end_column = subj->pos + subj->column_offset + subj->block_offset;
cmark_node_insert_before(opener->inl_text, inl);
cmark_node_free(opener->inl_text->next);
cmark_node_free(opener->inl_text);
process_emphasis(parser, subj, opener->previous_delimiter);
pop_bracket(subj);
return NULL;
}
}
pop_bracket(subj); // remove this opener from delimiter list
subj->pos = initial_pos;
return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("]"));
match:
inl = make_simple(subj->mem, is_image ? CMARK_NODE_IMAGE : CMARK_NODE_LINK);
inl->as.link.url = url;
inl->as.link.title = title;
inl->start_line = inl->end_line = subj->line;
inl->start_column = opener->inl_text->start_column;
inl->end_column = subj->pos + subj->column_offset + subj->block_offset;
cmark_node_insert_before(opener->inl_text, inl);
// Add link text:
tmp = opener->inl_text->next;
while (tmp) {
tmpnext = tmp->next;
cmark_node_append_child(inl, tmp);
tmp = tmpnext;
}
// Free the bracket [:
cmark_node_free(opener->inl_text);
process_emphasis(parser, subj, opener->previous_delimiter);
pop_bracket(subj);
// Now, if we have a link, we also want to deactivate earlier link
// delimiters. (This code can be removed if we decide to allow links
// inside links.)
if (!is_image) {
opener = subj->last_bracket;
while (opener != NULL) {
if (!opener->image) {
if (!opener->active) {
break;
} else {
opener->active = false;
}
}
opener = opener->previous;
}
}
return NULL;
}
// Parse a hard or soft linebreak, returning an inline.
// Assumes the subject has a cr or newline at the current position.
static cmark_node *handle_newline(subject *subj) {
bufsize_t nlpos = subj->pos;
// skip over cr, crlf, or lf:
if (peek_at(subj, subj->pos) == '\r') {
advance(subj);
}
if (peek_at(subj, subj->pos) == '\n') {
advance(subj);
}
++subj->line;
subj->column_offset = -subj->pos;
// skip spaces at beginning of line
skip_spaces(subj);
if (nlpos > 1 && peek_at(subj, nlpos - 1) == ' ' &&
peek_at(subj, nlpos - 2) == ' ') {
return make_linebreak(subj->mem);
} else {
return make_softbreak(subj->mem);
}
}
// "\r\n\\`&_*[]<!"
static int8_t SPECIAL_CHARS[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
// " ' . -
static char SMART_PUNCT_CHARS[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static bufsize_t subject_find_special_char(subject *subj, int options) {
bufsize_t n = subj->pos + 1;
while (n < subj->input.len) {
if (SPECIAL_CHARS[subj->input.data[n]])
return n;
if (options & CMARK_OPT_SMART && SMART_PUNCT_CHARS[subj->input.data[n]])
return n;
n++;
}
return subj->input.len;
}
void cmark_inlines_add_special_character(unsigned char c, bool emphasis) {
SPECIAL_CHARS[c] = 1;
if (emphasis)
SKIP_CHARS[c] = 1;
}
void cmark_inlines_remove_special_character(unsigned char c, bool emphasis) {
SPECIAL_CHARS[c] = 0;
if (emphasis)
SKIP_CHARS[c] = 0;
}
static cmark_node *try_extensions(cmark_parser *parser,
cmark_node *parent,
unsigned char c,
subject *subj) {
cmark_node *res = NULL;
cmark_llist *tmp;
for (tmp = parser->inline_syntax_extensions; tmp; tmp = tmp->next) {
cmark_syntax_extension *ext = (cmark_syntax_extension *) tmp->data;
res = ext->match_inline(ext, parser, parent, c, subj);
if (res)
break;
}
return res;
}
// Parse an inline, advancing subject, and add it as a child of parent.
// Return 0 if no inline can be parsed, 1 otherwise.
static int parse_inline(cmark_parser *parser, subject *subj, cmark_node *parent, int options) {
cmark_node *new_inl = NULL;
cmark_chunk contents;
unsigned char c;
bufsize_t startpos, endpos;
c = peek_char(subj);
if (c == 0) {
return 0;
}
switch (c) {
case '\r':
case '\n':
new_inl = handle_newline(subj);
break;
case '`':
new_inl = handle_backticks(subj, options);
break;
case '\\':
new_inl = handle_backslash(parser, subj);
break;
case '&':
new_inl = handle_entity(subj);
break;
case '<':
new_inl = handle_pointy_brace(subj, options);
break;
case '*':
case '_':
case '\'':
case '"':
new_inl = handle_delim(subj, c, (options & CMARK_OPT_SMART) != 0);
break;
case '-':
new_inl = handle_hyphen(subj, (options & CMARK_OPT_SMART) != 0);
break;
case '.':
new_inl = handle_period(subj, (options & CMARK_OPT_SMART) != 0);
break;
case '[':
advance(subj);
new_inl = make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("["));
push_bracket(subj, false, new_inl);
break;
case ']':
new_inl = handle_close_bracket(parser, subj);
break;
case '!':
advance(subj);
if (peek_char(subj) == '[' && peek_char_n(subj, 1) != '^') {
advance(subj);
new_inl = make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_literal("!["));
push_bracket(subj, true, new_inl);
} else {
new_inl = make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("!"));
}
break;
default:
new_inl = try_extensions(parser, parent, c, subj);
if (new_inl != NULL)
break;
endpos = subject_find_special_char(subj, options);
contents = cmark_chunk_dup(&subj->input, subj->pos, endpos - subj->pos);
startpos = subj->pos;
subj->pos = endpos;
// if we're at a newline, strip trailing spaces.
if (S_is_line_end_char(peek_char(subj))) {
cmark_chunk_rtrim(&contents);
}
new_inl = make_str(subj, startpos, endpos - 1, contents);
}
if (new_inl != NULL) {
cmark_node_append_child(parent, new_inl);
}
return 1;
}
// Parse inlines from parent's string_content, adding as children of parent.
void cmark_parse_inlines(cmark_parser *parser,
cmark_node *parent,
cmark_map *refmap,
int options) {
subject subj;
cmark_chunk content = {parent->content.ptr, parent->content.size, 0};
subject_from_buf(parser->mem, parent->start_line, parent->start_column - 1 + parent->internal_offset, &subj, &content, refmap);
cmark_chunk_rtrim(&subj.input);
while (!is_eof(&subj) && parse_inline(parser, &subj, parent, options))
;
process_emphasis(parser, &subj, NULL);
// free bracket and delim stack
while (subj.last_delim) {
remove_delimiter(&subj, subj.last_delim);
}
while (subj.last_bracket) {
pop_bracket(&subj);
}
}
// Parse zero or more space characters, including at most one newline.
static void spnl(subject *subj) {
skip_spaces(subj);
if (skip_line_end(subj)) {
skip_spaces(subj);
}
}
// Parse reference. Assumes string begins with '[' character.
// Modify refmap if a reference is encountered.
// Return 0 if no reference found, otherwise position of subject
// after reference is parsed.
bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
cmark_map *refmap) {
subject subj;
cmark_chunk lab;
cmark_chunk url;
cmark_chunk title;
bufsize_t matchlen = 0;
bufsize_t beforetitle;
subject_from_buf(mem, -1, 0, &subj, input, NULL);
// parse label:
if (!link_label(&subj, &lab) || lab.len == 0)
return 0;
// colon:
if (peek_char(&subj) == ':') {
advance(&subj);
} else {
return 0;
}
// parse link url:
spnl(&subj);
if ((matchlen = manual_scan_link_url(&subj.input, subj.pos, &url)) > -1) {
subj.pos += matchlen;
} else {
return 0;
}
// parse optional link_title
beforetitle = subj.pos;
spnl(&subj);
matchlen = subj.pos == beforetitle ? 0 : scan_link_title(&subj.input, subj.pos);
if (matchlen) {
title = cmark_chunk_dup(&subj.input, subj.pos, matchlen);
subj.pos += matchlen;
} else {
subj.pos = beforetitle;
title = cmark_chunk_literal("");
}
// parse final spaces and newline:
skip_spaces(&subj);
if (!skip_line_end(&subj)) {
if (matchlen) { // try rewinding before title
subj.pos = beforetitle;
skip_spaces(&subj);
if (!skip_line_end(&subj)) {
return 0;
}
} else {
return 0;
}
}
// insert reference into refmap
cmark_reference_create(refmap, &lab, &url, &title);
return subj.pos;
}
unsigned char cmark_inline_parser_peek_char(cmark_inline_parser *parser) {
return peek_char(parser);
}
unsigned char cmark_inline_parser_peek_at(cmark_inline_parser *parser, bufsize_t pos) {
return peek_at(parser, pos);
}
int cmark_inline_parser_is_eof(cmark_inline_parser *parser) {
return is_eof(parser);
}
static char *
my_strndup (const char *s, size_t n)
{
char *result;
size_t len = strlen (s);
if (n < len)
len = n;
result = (char *) malloc (len + 1);
if (!result)
return 0;
result[len] = '\0';
return (char *) memcpy (result, s, len);
}
char *cmark_inline_parser_take_while(cmark_inline_parser *parser, cmark_inline_predicate pred) {
unsigned char c;
bufsize_t startpos = parser->pos;
bufsize_t len = 0;
while ((c = peek_char(parser)) && (*pred)(c)) {
advance(parser);
len++;
}
return my_strndup((const char *) parser->input.data + startpos, len);
}
void cmark_inline_parser_push_delimiter(cmark_inline_parser *parser,
unsigned char c,
int can_open,
int can_close,
cmark_node *inl_text) {
push_delimiter(parser, c, can_open != 0, can_close != 0, inl_text);
}
void cmark_inline_parser_remove_delimiter(cmark_inline_parser *parser, delimiter *delim) {
remove_delimiter(parser, delim);
}
int cmark_inline_parser_scan_delimiters(cmark_inline_parser *parser,
int max_delims,
unsigned char c,
int *left_flanking,
int *right_flanking,
int *punct_before,
int *punct_after) {
int numdelims = 0;
bufsize_t before_char_pos;
int32_t after_char = 0;
int32_t before_char = 0;
int len;
bool space_before, space_after;
if (parser->pos == 0) {
before_char = 10;
} else {
before_char_pos = parser->pos - 1;
// walk back to the beginning of the UTF_8 sequence:
while (peek_at(parser, before_char_pos) >> 6 == 2 && before_char_pos > 0) {
before_char_pos -= 1;
}
len = cmark_utf8proc_iterate(parser->input.data + before_char_pos,
parser->pos - before_char_pos, &before_char);
if (len == -1) {
before_char = 10;
}
}
while (peek_char(parser) == c && numdelims < max_delims) {
numdelims++;
advance(parser);
}
len = cmark_utf8proc_iterate(parser->input.data + parser->pos,
parser->input.len - parser->pos, &after_char);
if (len == -1) {
after_char = 10;
}
*punct_before = cmark_utf8proc_is_punctuation(before_char);
*punct_after = cmark_utf8proc_is_punctuation(after_char);
space_before = cmark_utf8proc_is_space(before_char) != 0;
space_after = cmark_utf8proc_is_space(after_char) != 0;
*left_flanking = numdelims > 0 && !cmark_utf8proc_is_space(after_char) &&
!(*punct_after && !space_before && !*punct_before);
*right_flanking = numdelims > 0 && !cmark_utf8proc_is_space(before_char) &&
!(*punct_before && !space_after && !*punct_after);
return numdelims;
}
void cmark_inline_parser_advance_offset(cmark_inline_parser *parser) {
advance(parser);
}
int cmark_inline_parser_get_offset(cmark_inline_parser *parser) {
return parser->pos;
}
void cmark_inline_parser_set_offset(cmark_inline_parser *parser, int offset) {
parser->pos = offset;
}
int cmark_inline_parser_get_column(cmark_inline_parser *parser) {
return parser->pos + 1 + parser->column_offset + parser->block_offset;
}
cmark_chunk *cmark_inline_parser_get_chunk(cmark_inline_parser *parser) {
return &parser->input;
}
int cmark_inline_parser_in_bracket(cmark_inline_parser *parser, int image) {
for (bracket *b = parser->last_bracket; b; b = b->previous)
if (b->active && b->image == (image != 0))
return 1;
return 0;
}
void cmark_node_unput(cmark_node *node, int n) {
node = node->last_child;
while (n > 0 && node && node->type == CMARK_NODE_TEXT) {
if (node->as.literal.len < n) {
n -= node->as.literal.len;
node->as.literal.len = 0;
} else {
node->as.literal.len -= n;
n = 0;
}
node = node->prev;
}
}
delimiter *cmark_inline_parser_get_last_delimiter(cmark_inline_parser *parser) {
return parser->last_delim;
}
int cmark_inline_parser_get_line(cmark_inline_parser *parser) {
return parser->line;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/commonmark.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <assert.h>
#include "config.h"
#include "cmark-gfm.h"
#include "node.h"
#include "buffer.h"
#include "utf8.h"
#include "scanners.h"
#include "render.h"
#include "syntax_extension.h"
#define OUT(s, wrap, escaping) renderer->out(renderer, node, s, wrap, escaping)
#define LIT(s) renderer->out(renderer, node, s, false, LITERAL)
#define CR() renderer->cr(renderer)
#define BLANKLINE() renderer->blankline(renderer)
#define ENCODED_SIZE 20
#define LISTMARKER_SIZE 20
// Functions to convert cmark_nodes to commonmark strings.
static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_node *node,
cmark_escaping escape,
int32_t c, unsigned char nextc) {
bool needs_escaping = false;
bool follows_digit =
renderer->buffer->size > 0 &&
cmark_isdigit(renderer->buffer->ptr[renderer->buffer->size - 1]);
char encoded[ENCODED_SIZE];
needs_escaping =
c < 0x80 && escape != LITERAL &&
((escape == NORMAL &&
(c < 0x20 ||
c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' ||
c == '>' || c == '\\' || c == '`' || c == '~' || c == '!' ||
(c == '&' && cmark_isalpha(nextc)) || (c == '!' && nextc == '[') ||
(renderer->begin_content && (c == '-' || c == '+' || c == '=') &&
// begin_content doesn't get set to false til we've passed digits
// at the beginning of line, so...
!follows_digit) ||
(renderer->begin_content && (c == '.' || c == ')') && follows_digit &&
(nextc == 0 || cmark_isspace(nextc))))) ||
(escape == URL &&
(c == '`' || c == '<' || c == '>' || cmark_isspace((char)c) || c == '\\' ||
c == ')' || c == '(')) ||
(escape == TITLE &&
(c == '`' || c == '<' || c == '>' || c == '"' || c == '\\')));
if (needs_escaping) {
if (escape == URL && cmark_isspace((char)c)) {
// use percent encoding for spaces
snprintf(encoded, ENCODED_SIZE, "%%%2X", c);
cmark_strbuf_puts(renderer->buffer, encoded);
renderer->column += 3;
} else if (cmark_ispunct((char)c)) {
cmark_render_ascii(renderer, "\\");
cmark_render_code_point(renderer, c);
} else { // render as entity
snprintf(encoded, ENCODED_SIZE, "&#%d;", c);
cmark_strbuf_puts(renderer->buffer, encoded);
renderer->column += (int)strlen(encoded);
}
} else {
cmark_render_code_point(renderer, c);
}
}
static int longest_backtick_sequence(const char *code) {
int longest = 0;
int current = 0;
size_t i = 0;
size_t code_len = strlen(code);
while (i <= code_len) {
if (code[i] == '`') {
current++;
} else {
if (current > longest) {
longest = current;
}
current = 0;
}
i++;
}
return longest;
}
static int shortest_unused_backtick_sequence(const char *code) {
// note: if the shortest sequence is >= 32, this returns 32
// so as not to overflow the bit array.
uint32_t used = 1;
int current = 0;
size_t i = 0;
size_t code_len = strlen(code);
while (i <= code_len) {
if (code[i] == '`') {
current++;
} else {
if (current > 0 && current < 32) {
used |= (1U << current);
}
current = 0;
}
i++;
}
// return number of first bit that is 0:
i = 0;
while (i < 32 && used & 1) {
used = used >> 1;
i++;
}
return (int)i;
}
static bool is_autolink(cmark_node *node) {
cmark_chunk *title;
cmark_chunk *url;
cmark_node *link_text;
char *realurl;
int realurllen;
if (node->type != CMARK_NODE_LINK) {
return false;
}
url = &node->as.link.url;
if (url->len == 0 || scan_scheme(url, 0) == 0) {
return false;
}
title = &node->as.link.title;
// if it has a title, we can't treat it as an autolink:
if (title->len > 0) {
return false;
}
link_text = node->first_child;
if (link_text == NULL) {
return false;
}
cmark_consolidate_text_nodes(link_text);
realurl = (char *)url->data;
realurllen = url->len;
if (strncmp(realurl, "mailto:", 7) == 0) {
realurl += 7;
realurllen -= 7;
}
return (realurllen == link_text->as.literal.len &&
strncmp(realurl, (char *)link_text->as.literal.data,
link_text->as.literal.len) == 0);
}
// if node is a block node, returns node.
// otherwise returns first block-level node that is an ancestor of node.
// if there is no block-level ancestor, returns NULL.
static cmark_node *get_containing_block(cmark_node *node) {
while (node) {
if (CMARK_NODE_BLOCK_P(node)) {
return node;
} else {
node = node->parent;
}
}
return NULL;
}
static int S_render_node(cmark_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
cmark_node *tmp;
int list_number;
cmark_delim_type list_delim;
int numticks;
bool extra_spaces;
int i;
bool entering = (ev_type == CMARK_EVENT_ENTER);
const char *info, *code, *title;
char fencechar[2] = {'\0', '\0'};
size_t info_len, code_len;
char listmarker[LISTMARKER_SIZE];
char *emph_delim;
bool first_in_list_item;
bufsize_t marker_width;
bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options) &&
!(CMARK_OPT_HARDBREAKS & options);
// Don't adjust tight list status til we've started the list.
// Otherwise we loose the blank line between a paragraph and
// a following list.
if (!(node->type == CMARK_NODE_ITEM && node->prev == NULL && entering)) {
tmp = get_containing_block(node);
renderer->in_tight_list_item =
tmp && // tmp might be NULL if there is no containing block
((tmp->type == CMARK_NODE_ITEM &&
cmark_node_get_list_tight(tmp->parent)) ||
(tmp && tmp->parent && tmp->parent->type == CMARK_NODE_ITEM &&
cmark_node_get_list_tight(tmp->parent->parent)));
}
if (node->extension && node->extension->commonmark_render_func) {
node->extension->commonmark_render_func(node->extension, renderer, node, ev_type, options);
return 1;
}
switch (node->type) {
case CMARK_NODE_DOCUMENT:
break;
case CMARK_NODE_BLOCK_QUOTE:
if (entering) {
LIT("> ");
renderer->begin_content = true;
cmark_strbuf_puts(renderer->prefix, "> ");
} else {
cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 2);
BLANKLINE();
}
break;
case CMARK_NODE_LIST:
if (!entering && node->next && (node->next->type == CMARK_NODE_CODE_BLOCK ||
node->next->type == CMARK_NODE_LIST)) {
// this ensures that a following indented code block or list will be
// inteprereted correctly.
CR();
LIT("<!-- end list -->");
BLANKLINE();
}
break;
case CMARK_NODE_ITEM:
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
marker_width = 4;
} else {
list_number = cmark_node_get_list_start(node->parent);
list_delim = cmark_node_get_list_delim(node->parent);
tmp = node;
while (tmp->prev) {
tmp = tmp->prev;
list_number += 1;
}
// we ensure a width of at least 4 so
// we get nice transition from single digits
// to double
snprintf(listmarker, LISTMARKER_SIZE, "%d%s%s", list_number,
list_delim == CMARK_PAREN_DELIM ? ")" : ".",
list_number < 10 ? " " : " ");
marker_width = (bufsize_t)strlen(listmarker);
}
if (entering) {
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
LIT(" - ");
renderer->begin_content = true;
} else {
LIT(listmarker);
renderer->begin_content = true;
}
for (i = marker_width; i--;) {
cmark_strbuf_putc(renderer->prefix, ' ');
}
} else {
cmark_strbuf_truncate(renderer->prefix,
renderer->prefix->size - marker_width);
CR();
}
break;
case CMARK_NODE_HEADING:
if (entering) {
for (i = cmark_node_get_heading_level(node); i > 0; i--) {
LIT("#");
}
LIT(" ");
renderer->begin_content = true;
renderer->no_linebreaks = true;
} else {
renderer->no_linebreaks = false;
BLANKLINE();
}
break;
case CMARK_NODE_CODE_BLOCK:
first_in_list_item = node->prev == NULL && node->parent &&
node->parent->type == CMARK_NODE_ITEM;
if (!first_in_list_item) {
BLANKLINE();
}
info = cmark_node_get_fence_info(node);
info_len = strlen(info);
fencechar[0] = strchr(info, '`') == NULL ? '`' : '~';
code = cmark_node_get_literal(node);
code_len = strlen(code);
// use indented form if no info, and code doesn't
// begin or end with a blank line, and code isn't
// first thing in a list item
if (info_len == 0 && (code_len > 2 && !cmark_isspace(code[0]) &&
!(cmark_isspace(code[code_len - 1]) &&
cmark_isspace(code[code_len - 2]))) &&
!first_in_list_item) {
LIT(" ");
cmark_strbuf_puts(renderer->prefix, " ");
OUT(cmark_node_get_literal(node), false, LITERAL);
cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 4);
} else {
numticks = longest_backtick_sequence(code) + 1;
if (numticks < 3) {
numticks = 3;
}
for (i = 0; i < numticks; i++) {
LIT(fencechar);
}
LIT(" ");
OUT(info, false, LITERAL);
CR();
OUT(cmark_node_get_literal(node), false, LITERAL);
CR();
for (i = 0; i < numticks; i++) {
LIT(fencechar);
}
}
BLANKLINE();
break;
case CMARK_NODE_HTML_BLOCK:
BLANKLINE();
OUT(cmark_node_get_literal(node), false, LITERAL);
BLANKLINE();
break;
case CMARK_NODE_CUSTOM_BLOCK:
BLANKLINE();
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
false, LITERAL);
BLANKLINE();
break;
case CMARK_NODE_THEMATIC_BREAK:
BLANKLINE();
LIT("-----");
BLANKLINE();
break;
case CMARK_NODE_PARAGRAPH:
if (!entering) {
BLANKLINE();
}
break;
case CMARK_NODE_TEXT:
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
break;
case CMARK_NODE_LINEBREAK:
if (!(CMARK_OPT_HARDBREAKS & options)) {
LIT(" ");
}
CR();
break;
case CMARK_NODE_SOFTBREAK:
if (CMARK_OPT_HARDBREAKS & options) {
LIT(" ");
CR();
} else if (!renderer->no_linebreaks && renderer->width == 0 &&
!(CMARK_OPT_HARDBREAKS & options) &&
!(CMARK_OPT_NOBREAKS & options)) {
CR();
} else {
OUT(" ", allow_wrap, LITERAL);
}
break;
case CMARK_NODE_CODE:
code = cmark_node_get_literal(node);
code_len = strlen(code);
numticks = shortest_unused_backtick_sequence(code);
extra_spaces = code_len == 0 ||
code[0] == '`' || code[code_len - 1] == '`' ||
code[0] == ' ' || code[code_len - 1] == ' ';
for (i = 0; i < numticks; i++) {
LIT("`");
}
if (extra_spaces) {
LIT(" ");
}
OUT(cmark_node_get_literal(node), allow_wrap, LITERAL);
if (extra_spaces) {
LIT(" ");
}
for (i = 0; i < numticks; i++) {
LIT("`");
}
break;
case CMARK_NODE_HTML_INLINE:
OUT(cmark_node_get_literal(node), false, LITERAL);
break;
case CMARK_NODE_CUSTOM_INLINE:
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
false, LITERAL);
break;
case CMARK_NODE_STRONG:
if (entering) {
LIT("**");
} else {
LIT("**");
}
break;
case CMARK_NODE_EMPH:
// If we have EMPH(EMPH(x)), we need to use *_x_*
// because **x** is STRONG(x):
if (node->parent && node->parent->type == CMARK_NODE_EMPH &&
node->next == NULL && node->prev == NULL) {
emph_delim = "_";
} else {
emph_delim = "*";
}
if (entering) {
LIT(emph_delim);
} else {
LIT(emph_delim);
}
break;
case CMARK_NODE_LINK:
if (is_autolink(node)) {
if (entering) {
LIT("<");
if (strncmp(cmark_node_get_url(node), "mailto:", 7) == 0) {
LIT((const char *)cmark_node_get_url(node) + 7);
} else {
LIT((const char *)cmark_node_get_url(node));
}
LIT(">");
// return signal to skip contents of node...
return 0;
}
} else {
if (entering) {
LIT("[");
} else {
LIT("](");
OUT(cmark_node_get_url(node), false, URL);
title = cmark_node_get_title(node);
if (strlen(title) > 0) {
LIT(" \"");
OUT(title, false, TITLE);
LIT("\"");
}
LIT(")");
}
}
break;
case CMARK_NODE_IMAGE:
if (entering) {
LIT(";
OUT(cmark_node_get_url(node), false, URL);
title = cmark_node_get_title(node);
if (strlen(title) > 0) {
OUT(" \"", allow_wrap, LITERAL);
OUT(title, false, TITLE);
LIT("\"");
}
LIT(")");
}
break;
case CMARK_NODE_FOOTNOTE_REFERENCE:
if (entering) {
LIT("[^");
OUT(cmark_chunk_to_cstr(renderer->mem, &node->as.literal), false, LITERAL);
LIT("]");
}
break;
case CMARK_NODE_FOOTNOTE_DEFINITION:
if (entering) {
renderer->footnote_ix += 1;
LIT("[^");
char n[32];
snprintf(n, sizeof(n), "%d", renderer->footnote_ix);
OUT(n, false, LITERAL);
LIT("]:\n");
cmark_strbuf_puts(renderer->prefix, " ");
} else {
cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 4);
}
break;
default:
assert(false);
break;
}
return 1;
}
char *cmark_render_commonmark(cmark_node *root, int options, int width) {
return cmark_render_commonmark_with_mem(root, options, width, cmark_node_mem(root));
}
char *cmark_render_commonmark_with_mem(cmark_node *root, int options, int width, cmark_mem *mem) {
if (options & CMARK_OPT_HARDBREAKS) {
// disable breaking on width, since it has
// a different meaning with OPT_HARDBREAKS
width = 0;
}
return cmark_render(mem, root, options, width, outc, S_render_node);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/xml.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "config.h"
#include "cmark-gfm.h"
#include "node.h"
#include "buffer.h"
#include "houdini.h"
#include "syntax_extension.h"
#define BUFFER_SIZE 100
// Functions to convert cmark_nodes to XML strings.
static void escape_xml(cmark_strbuf *dest, const unsigned char *source,
bufsize_t length) {
houdini_escape_html0(dest, source, length, 0);
}
struct render_state {
cmark_strbuf *xml;
int indent;
};
static CMARK_INLINE void indent(struct render_state *state) {
int i;
for (i = 0; i < state->indent; i++) {
cmark_strbuf_putc(state->xml, ' ');
}
}
static int S_render_node(cmark_node *node, cmark_event_type ev_type,
struct render_state *state, int options) {
cmark_strbuf *xml = state->xml;
bool literal = false;
cmark_delim_type delim;
bool entering = (ev_type == CMARK_EVENT_ENTER);
char buffer[BUFFER_SIZE];
if (entering) {
indent(state);
cmark_strbuf_putc(xml, '<');
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
if (options & CMARK_OPT_SOURCEPOS && node->start_line != 0) {
snprintf(buffer, BUFFER_SIZE, " sourcepos=\"%d:%d-%d:%d\"",
node->start_line, node->start_column, node->end_line,
node->end_column);
cmark_strbuf_puts(xml, buffer);
}
if (node->extension && node->extension->xml_attr_func) {
const char* r = node->extension->xml_attr_func(node->extension, node);
if (r != NULL)
cmark_strbuf_puts(xml, r);
}
literal = false;
switch (node->type) {
case CMARK_NODE_DOCUMENT:
cmark_strbuf_puts(xml, " xmlns=\"http://commonmark.org/xml/1.0\"");
break;
case CMARK_NODE_TEXT:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML_BLOCK:
case CMARK_NODE_HTML_INLINE:
cmark_strbuf_puts(xml, " xml:space=\"preserve\">");
escape_xml(xml, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(xml, "</");
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
literal = true;
break;
case CMARK_NODE_LIST:
switch (cmark_node_get_list_type(node)) {
case CMARK_ORDERED_LIST:
cmark_strbuf_puts(xml, " type=\"ordered\"");
snprintf(buffer, BUFFER_SIZE, " start=\"%d\"",
cmark_node_get_list_start(node));
cmark_strbuf_puts(xml, buffer);
delim = cmark_node_get_list_delim(node);
if (delim == CMARK_PAREN_DELIM) {
cmark_strbuf_puts(xml, " delim=\"paren\"");
} else if (delim == CMARK_PERIOD_DELIM) {
cmark_strbuf_puts(xml, " delim=\"period\"");
}
break;
case CMARK_BULLET_LIST:
cmark_strbuf_puts(xml, " type=\"bullet\"");
break;
default:
break;
}
snprintf(buffer, BUFFER_SIZE, " tight=\"%s\"",
(cmark_node_get_list_tight(node) ? "true" : "false"));
cmark_strbuf_puts(xml, buffer);
break;
case CMARK_NODE_HEADING:
snprintf(buffer, BUFFER_SIZE, " level=\"%d\"", node->as.heading.level);
cmark_strbuf_puts(xml, buffer);
break;
case CMARK_NODE_CODE_BLOCK:
if (node->as.code.info.len > 0) {
cmark_strbuf_puts(xml, " info=\"");
escape_xml(xml, node->as.code.info.data, node->as.code.info.len);
cmark_strbuf_putc(xml, '"');
}
cmark_strbuf_puts(xml, " xml:space=\"preserve\">");
escape_xml(xml, node->as.code.literal.data, node->as.code.literal.len);
cmark_strbuf_puts(xml, "</");
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
literal = true;
break;
case CMARK_NODE_CUSTOM_BLOCK:
case CMARK_NODE_CUSTOM_INLINE:
cmark_strbuf_puts(xml, " on_enter=\"");
escape_xml(xml, node->as.custom.on_enter.data,
node->as.custom.on_enter.len);
cmark_strbuf_putc(xml, '"');
cmark_strbuf_puts(xml, " on_exit=\"");
escape_xml(xml, node->as.custom.on_exit.data,
node->as.custom.on_exit.len);
cmark_strbuf_putc(xml, '"');
break;
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
cmark_strbuf_puts(xml, " destination=\"");
escape_xml(xml, node->as.link.url.data, node->as.link.url.len);
cmark_strbuf_putc(xml, '"');
cmark_strbuf_puts(xml, " title=\"");
escape_xml(xml, node->as.link.title.data, node->as.link.title.len);
cmark_strbuf_putc(xml, '"');
break;
default:
break;
}
if (node->first_child) {
state->indent += 2;
} else if (!literal) {
cmark_strbuf_puts(xml, " /");
}
cmark_strbuf_puts(xml, ">\n");
} else if (node->first_child) {
state->indent -= 2;
indent(state);
cmark_strbuf_puts(xml, "</");
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
cmark_strbuf_puts(xml, ">\n");
}
return 1;
}
char *cmark_render_xml(cmark_node *root, int options) {
return cmark_render_xml_with_mem(root, options, cmark_node_mem(root));
}
char *cmark_render_xml_with_mem(cmark_node *root, int options, cmark_mem *mem) {
char *result;
cmark_strbuf xml = CMARK_BUF_INIT(mem);
cmark_event_type ev_type;
cmark_node *cur;
struct render_state state = {&xml, 0};
cmark_iter *iter = cmark_iter_new(root);
cmark_strbuf_puts(state.xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
cmark_strbuf_puts(state.xml,
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n");
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
S_render_node(cur, ev_type, &state, options);
}
result = (char *)cmark_strbuf_detach(&xml);
cmark_iter_free(iter);
return result;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/render.c | #include <stdlib.h>
#include "buffer.h"
#include "chunk.h"
#include "cmark-gfm.h"
#include "utf8.h"
#include "render.h"
#include "node.h"
#include "syntax_extension.h"
static CMARK_INLINE void S_cr(cmark_renderer *renderer) {
if (renderer->need_cr < 1) {
renderer->need_cr = 1;
}
}
static CMARK_INLINE void S_blankline(cmark_renderer *renderer) {
if (renderer->need_cr < 2) {
renderer->need_cr = 2;
}
}
static void S_out(cmark_renderer *renderer, cmark_node *node,
const char *source, bool wrap,
cmark_escaping escape) {
int length = (int)strlen(source);
unsigned char nextc;
int32_t c;
int i = 0;
int last_nonspace;
int len;
cmark_chunk remainder = cmark_chunk_literal("");
int k = renderer->buffer->size - 1;
cmark_syntax_extension *ext = NULL;
cmark_node *n = node;
while (n && !ext) {
ext = n->extension;
if (!ext)
n = n->parent;
}
if (ext && !ext->commonmark_escape_func)
ext = NULL;
wrap = wrap && !renderer->no_linebreaks;
if (renderer->in_tight_list_item && renderer->need_cr > 1) {
renderer->need_cr = 1;
}
while (renderer->need_cr) {
if (k < 0 || renderer->buffer->ptr[k] == '\n') {
k -= 1;
} else {
cmark_strbuf_putc(renderer->buffer, '\n');
if (renderer->need_cr > 1) {
cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,
renderer->prefix->size);
}
}
renderer->column = 0;
renderer->last_breakable = 0;
renderer->begin_line = true;
renderer->begin_content = true;
renderer->need_cr -= 1;
}
while (i < length) {
if (renderer->begin_line) {
cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,
renderer->prefix->size);
// note: this assumes prefix is ascii:
renderer->column = renderer->prefix->size;
}
len = cmark_utf8proc_iterate((const uint8_t *)source + i, length - i, &c);
if (len == -1) { // error condition
return; // return without rendering rest of string
}
if (ext && ext->commonmark_escape_func(ext, node, c))
cmark_strbuf_putc(renderer->buffer, '\\');
nextc = source[i + len];
if (c == 32 && wrap) {
if (!renderer->begin_line) {
last_nonspace = renderer->buffer->size;
cmark_strbuf_putc(renderer->buffer, ' ');
renderer->column += 1;
renderer->begin_line = false;
renderer->begin_content = false;
// skip following spaces
while (source[i + 1] == ' ') {
i++;
}
// We don't allow breaks that make a digit the first character
// because this causes problems with commonmark output.
if (!cmark_isdigit(source[i + 1])) {
renderer->last_breakable = last_nonspace;
}
}
} else if (escape == LITERAL) {
if (c == 10) {
cmark_strbuf_putc(renderer->buffer, '\n');
renderer->column = 0;
renderer->begin_line = true;
renderer->begin_content = true;
renderer->last_breakable = 0;
} else {
cmark_render_code_point(renderer, c);
renderer->begin_line = false;
// we don't set 'begin_content' to false til we've
// finished parsing a digit. Reason: in commonmark
// we need to escape a potential list marker after
// a digit:
renderer->begin_content =
renderer->begin_content && cmark_isdigit((char)c) == 1;
}
} else {
(renderer->outc)(renderer, node, escape, c, nextc);
renderer->begin_line = false;
renderer->begin_content =
renderer->begin_content && cmark_isdigit((char)c) == 1;
}
// If adding the character went beyond width, look for an
// earlier place where the line could be broken:
if (renderer->width > 0 && renderer->column > renderer->width &&
!renderer->begin_line && renderer->last_breakable > 0) {
// copy from last_breakable to remainder
cmark_chunk_set_cstr(renderer->mem, &remainder,
(char *)renderer->buffer->ptr +
renderer->last_breakable + 1);
// truncate at last_breakable
cmark_strbuf_truncate(renderer->buffer, renderer->last_breakable);
// add newline, prefix, and remainder
cmark_strbuf_putc(renderer->buffer, '\n');
cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,
renderer->prefix->size);
cmark_strbuf_put(renderer->buffer, remainder.data, remainder.len);
renderer->column = renderer->prefix->size + remainder.len;
cmark_chunk_free(renderer->mem, &remainder);
renderer->last_breakable = 0;
renderer->begin_line = false;
renderer->begin_content = false;
}
i += len;
}
}
// Assumes no newlines, assumes ascii content:
void cmark_render_ascii(cmark_renderer *renderer, const char *s) {
int origsize = renderer->buffer->size;
cmark_strbuf_puts(renderer->buffer, s);
renderer->column += renderer->buffer->size - origsize;
}
void cmark_render_code_point(cmark_renderer *renderer, uint32_t c) {
cmark_utf8proc_encode_char(c, renderer->buffer);
renderer->column += 1;
}
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)) {
cmark_strbuf pref = CMARK_BUF_INIT(mem);
cmark_strbuf buf = CMARK_BUF_INIT(mem);
cmark_node *cur;
cmark_event_type ev_type;
char *result;
cmark_iter *iter = cmark_iter_new(root);
cmark_renderer renderer = {mem, &buf, &pref, 0, width,
0, 0, true, true, false,
false, outc, S_cr, S_blankline, S_out,
0};
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
if (!render_node(&renderer, cur, ev_type, options)) {
// a false value causes us to skip processing
// the node's contents. this is used for
// autolinks.
cmark_iter_reset(iter, cur, CMARK_EVENT_EXIT);
}
}
// ensure final newline
if (renderer.buffer->size == 0 || renderer.buffer->ptr[renderer.buffer->size - 1] != '\n') {
cmark_strbuf_putc(renderer.buffer, '\n');
}
result = (char *)cmark_strbuf_detach(renderer.buffer);
cmark_iter_free(iter);
cmark_strbuf_free(renderer.prefix);
cmark_strbuf_free(renderer.buffer);
return result;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/utf8.c | #include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include "cmark_ctype.h"
#include "utf8.h"
static const int8_t utf8proc_utf8class[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0};
static void encode_unknown(cmark_strbuf *buf) {
static const uint8_t repl[] = {239, 191, 189};
cmark_strbuf_put(buf, repl, 3);
}
static int utf8proc_charlen(const uint8_t *str, bufsize_t str_len) {
int length, i;
if (!str_len)
return 0;
length = utf8proc_utf8class[str[0]];
if (!length)
return -1;
if (str_len >= 0 && (bufsize_t)length > str_len)
return -str_len;
for (i = 1; i < length; i++) {
if ((str[i] & 0xC0) != 0x80)
return -i;
}
return length;
}
// Validate a single UTF-8 character according to RFC 3629.
static int utf8proc_valid(const uint8_t *str, bufsize_t str_len) {
int length = utf8proc_utf8class[str[0]];
if (!length)
return -1;
if ((bufsize_t)length > str_len)
return -str_len;
switch (length) {
case 2:
if ((str[1] & 0xC0) != 0x80)
return -1;
if (str[0] < 0xC2) {
// Overlong
return -length;
}
break;
case 3:
if ((str[1] & 0xC0) != 0x80)
return -1;
if ((str[2] & 0xC0) != 0x80)
return -2;
if (str[0] == 0xE0) {
if (str[1] < 0xA0) {
// Overlong
return -length;
}
} else if (str[0] == 0xED) {
if (str[1] >= 0xA0) {
// Surrogate
return -length;
}
}
break;
case 4:
if ((str[1] & 0xC0) != 0x80)
return -1;
if ((str[2] & 0xC0) != 0x80)
return -2;
if ((str[3] & 0xC0) != 0x80)
return -3;
if (str[0] == 0xF0) {
if (str[1] < 0x90) {
// Overlong
return -length;
}
} else if (str[0] >= 0xF4) {
if (str[0] > 0xF4 || str[1] >= 0x90) {
// Above 0x10FFFF
return -length;
}
}
break;
}
return length;
}
void cmark_utf8proc_check(cmark_strbuf *ob, const uint8_t *line,
bufsize_t size) {
bufsize_t i = 0;
while (i < size) {
bufsize_t org = i;
int charlen = 0;
while (i < size) {
if (line[i] < 0x80 && line[i] != 0) {
i++;
} else if (line[i] >= 0x80) {
charlen = utf8proc_valid(line + i, size - i);
if (charlen < 0) {
charlen = -charlen;
break;
}
i += charlen;
} else if (line[i] == 0) {
// ASCII NUL is technically valid but rejected
// for security reasons.
charlen = 1;
break;
}
}
if (i > org) {
cmark_strbuf_put(ob, line + org, i - org);
}
if (i >= size) {
break;
} else {
// Invalid UTF-8
encode_unknown(ob);
i += charlen;
}
}
}
int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len,
int32_t *dst) {
int length;
int32_t uc = -1;
*dst = -1;
length = utf8proc_charlen(str, str_len);
if (length < 0)
return -1;
switch (length) {
case 1:
uc = str[0];
break;
case 2:
uc = ((str[0] & 0x1F) << 6) + (str[1] & 0x3F);
if (uc < 0x80)
uc = -1;
break;
case 3:
uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) << 6) + (str[2] & 0x3F);
if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000))
uc = -1;
break;
case 4:
uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12) +
((str[2] & 0x3F) << 6) + (str[3] & 0x3F);
if (uc < 0x10000 || uc >= 0x110000)
uc = -1;
break;
}
if (uc < 0)
return -1;
*dst = uc;
return length;
}
void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf) {
uint8_t dst[4];
bufsize_t len = 0;
assert(uc >= 0);
if (uc < 0x80) {
dst[0] = (uint8_t)(uc);
len = 1;
} else if (uc < 0x800) {
dst[0] = (uint8_t)(0xC0 + (uc >> 6));
dst[1] = 0x80 + (uc & 0x3F);
len = 2;
} else if (uc == 0xFFFF) {
dst[0] = 0xFF;
len = 1;
} else if (uc == 0xFFFE) {
dst[0] = 0xFE;
len = 1;
} else if (uc < 0x10000) {
dst[0] = (uint8_t)(0xE0 + (uc >> 12));
dst[1] = 0x80 + ((uc >> 6) & 0x3F);
dst[2] = 0x80 + (uc & 0x3F);
len = 3;
} else if (uc < 0x110000) {
dst[0] = (uint8_t)(0xF0 + (uc >> 18));
dst[1] = 0x80 + ((uc >> 12) & 0x3F);
dst[2] = 0x80 + ((uc >> 6) & 0x3F);
dst[3] = 0x80 + (uc & 0x3F);
len = 4;
} else {
encode_unknown(buf);
return;
}
cmark_strbuf_put(buf, dst, len);
}
void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
bufsize_t len) {
int32_t c;
#define bufpush(x) cmark_utf8proc_encode_char(x, dest)
while (len > 0) {
bufsize_t char_len = cmark_utf8proc_iterate(str, len, &c);
if (char_len >= 0) {
#include "case_fold_switch.inc"
} else {
encode_unknown(dest);
char_len = -char_len;
}
str += char_len;
len -= char_len;
}
}
// matches anything in the Zs class, plus LF, CR, TAB, FF.
int cmark_utf8proc_is_space(int32_t uc) {
return (uc == 9 || uc == 10 || uc == 12 || uc == 13 || uc == 32 ||
uc == 160 || uc == 5760 || (uc >= 8192 && uc <= 8202) || uc == 8239 ||
uc == 8287 || uc == 12288);
}
// matches anything in the P[cdefios] classes.
int cmark_utf8proc_is_punctuation(int32_t uc) {
return (
(uc < 128 && cmark_ispunct((char)uc)) || uc == 161 || uc == 167 ||
uc == 171 || uc == 182 || uc == 183 || uc == 187 || uc == 191 ||
uc == 894 || uc == 903 || (uc >= 1370 && uc <= 1375) || uc == 1417 ||
uc == 1418 || uc == 1470 || uc == 1472 || uc == 1475 || uc == 1478 ||
uc == 1523 || uc == 1524 || uc == 1545 || uc == 1546 || uc == 1548 ||
uc == 1549 || uc == 1563 || uc == 1566 || uc == 1567 ||
(uc >= 1642 && uc <= 1645) || uc == 1748 || (uc >= 1792 && uc <= 1805) ||
(uc >= 2039 && uc <= 2041) || (uc >= 2096 && uc <= 2110) || uc == 2142 ||
uc == 2404 || uc == 2405 || uc == 2416 || uc == 2800 || uc == 3572 ||
uc == 3663 || uc == 3674 || uc == 3675 || (uc >= 3844 && uc <= 3858) ||
uc == 3860 || (uc >= 3898 && uc <= 3901) || uc == 3973 ||
(uc >= 4048 && uc <= 4052) || uc == 4057 || uc == 4058 ||
(uc >= 4170 && uc <= 4175) || uc == 4347 || (uc >= 4960 && uc <= 4968) ||
uc == 5120 || uc == 5741 || uc == 5742 || uc == 5787 || uc == 5788 ||
(uc >= 5867 && uc <= 5869) || uc == 5941 || uc == 5942 ||
(uc >= 6100 && uc <= 6102) || (uc >= 6104 && uc <= 6106) ||
(uc >= 6144 && uc <= 6154) || uc == 6468 || uc == 6469 || uc == 6686 ||
uc == 6687 || (uc >= 6816 && uc <= 6822) || (uc >= 6824 && uc <= 6829) ||
(uc >= 7002 && uc <= 7008) || (uc >= 7164 && uc <= 7167) ||
(uc >= 7227 && uc <= 7231) || uc == 7294 || uc == 7295 ||
(uc >= 7360 && uc <= 7367) || uc == 7379 || (uc >= 8208 && uc <= 8231) ||
(uc >= 8240 && uc <= 8259) || (uc >= 8261 && uc <= 8273) ||
(uc >= 8275 && uc <= 8286) || uc == 8317 || uc == 8318 || uc == 8333 ||
uc == 8334 || (uc >= 8968 && uc <= 8971) || uc == 9001 || uc == 9002 ||
(uc >= 10088 && uc <= 10101) || uc == 10181 || uc == 10182 ||
(uc >= 10214 && uc <= 10223) || (uc >= 10627 && uc <= 10648) ||
(uc >= 10712 && uc <= 10715) || uc == 10748 || uc == 10749 ||
(uc >= 11513 && uc <= 11516) || uc == 11518 || uc == 11519 ||
uc == 11632 || (uc >= 11776 && uc <= 11822) ||
(uc >= 11824 && uc <= 11842) || (uc >= 12289 && uc <= 12291) ||
(uc >= 12296 && uc <= 12305) || (uc >= 12308 && uc <= 12319) ||
uc == 12336 || uc == 12349 || uc == 12448 || uc == 12539 || uc == 42238 ||
uc == 42239 || (uc >= 42509 && uc <= 42511) || uc == 42611 ||
uc == 42622 || (uc >= 42738 && uc <= 42743) ||
(uc >= 43124 && uc <= 43127) || uc == 43214 || uc == 43215 ||
(uc >= 43256 && uc <= 43258) || uc == 43310 || uc == 43311 ||
uc == 43359 || (uc >= 43457 && uc <= 43469) || uc == 43486 ||
uc == 43487 || (uc >= 43612 && uc <= 43615) || uc == 43742 ||
uc == 43743 || uc == 43760 || uc == 43761 || uc == 44011 || uc == 64830 ||
uc == 64831 || (uc >= 65040 && uc <= 65049) ||
(uc >= 65072 && uc <= 65106) || (uc >= 65108 && uc <= 65121) ||
uc == 65123 || uc == 65128 || uc == 65130 || uc == 65131 ||
(uc >= 65281 && uc <= 65283) || (uc >= 65285 && uc <= 65290) ||
(uc >= 65292 && uc <= 65295) || uc == 65306 || uc == 65307 ||
uc == 65311 || uc == 65312 || (uc >= 65339 && uc <= 65341) ||
uc == 65343 || uc == 65371 || uc == 65373 ||
(uc >= 65375 && uc <= 65381) || (uc >= 65792 && uc <= 65794) ||
uc == 66463 || uc == 66512 || uc == 66927 || uc == 67671 || uc == 67871 ||
uc == 67903 || (uc >= 68176 && uc <= 68184) || uc == 68223 ||
(uc >= 68336 && uc <= 68342) || (uc >= 68409 && uc <= 68415) ||
(uc >= 68505 && uc <= 68508) || (uc >= 69703 && uc <= 69709) ||
uc == 69819 || uc == 69820 || (uc >= 69822 && uc <= 69825) ||
(uc >= 69952 && uc <= 69955) || uc == 70004 || uc == 70005 ||
(uc >= 70085 && uc <= 70088) || uc == 70093 ||
(uc >= 70200 && uc <= 70205) || uc == 70854 ||
(uc >= 71105 && uc <= 71113) || (uc >= 71233 && uc <= 71235) ||
(uc >= 74864 && uc <= 74868) || uc == 92782 || uc == 92783 ||
uc == 92917 || (uc >= 92983 && uc <= 92987) || uc == 92996 ||
uc == 113823);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/cmark-gfm.h | #ifndef CMARK_GFM_H
#define CMARK_GFM_H
#include <stdio.h>
#include <stdint.h>
#include "cmark-gfm_export.h"
#include "cmark-gfm_version.h"
#ifdef __cplusplus
extern "C" {
#endif
/** # NAME
*
* **cmark-gfm** - CommonMark parsing, manipulating, and rendering
*/
/** # DESCRIPTION
*
* ## Simple Interface
*/
/** Convert 'text' (assumed to be a UTF-8 encoded string with length
* 'len') from CommonMark Markdown to HTML, returning a null-terminated,
* UTF-8-encoded string. It is the caller's responsibility
* to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_markdown_to_html(const char *text, size_t len, int options);
/** ## Node Structure
*/
#define CMARK_NODE_TYPE_PRESENT (0x8000)
#define CMARK_NODE_TYPE_BLOCK (CMARK_NODE_TYPE_PRESENT | 0x0000)
#define CMARK_NODE_TYPE_INLINE (CMARK_NODE_TYPE_PRESENT | 0x4000)
#define CMARK_NODE_TYPE_MASK (0xc000)
#define CMARK_NODE_VALUE_MASK (0x3fff)
typedef enum {
/* Error status */
CMARK_NODE_NONE = 0x0000,
/* Block */
CMARK_NODE_DOCUMENT = CMARK_NODE_TYPE_BLOCK | 0x0001,
CMARK_NODE_BLOCK_QUOTE = CMARK_NODE_TYPE_BLOCK | 0x0002,
CMARK_NODE_LIST = CMARK_NODE_TYPE_BLOCK | 0x0003,
CMARK_NODE_ITEM = CMARK_NODE_TYPE_BLOCK | 0x0004,
CMARK_NODE_CODE_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0005,
CMARK_NODE_HTML_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0006,
CMARK_NODE_CUSTOM_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0007,
CMARK_NODE_PARAGRAPH = CMARK_NODE_TYPE_BLOCK | 0x0008,
CMARK_NODE_HEADING = CMARK_NODE_TYPE_BLOCK | 0x0009,
CMARK_NODE_THEMATIC_BREAK = CMARK_NODE_TYPE_BLOCK | 0x000a,
CMARK_NODE_FOOTNOTE_DEFINITION = CMARK_NODE_TYPE_BLOCK | 0x000b,
/* Inline */
CMARK_NODE_TEXT = CMARK_NODE_TYPE_INLINE | 0x0001,
CMARK_NODE_SOFTBREAK = CMARK_NODE_TYPE_INLINE | 0x0002,
CMARK_NODE_LINEBREAK = CMARK_NODE_TYPE_INLINE | 0x0003,
CMARK_NODE_CODE = CMARK_NODE_TYPE_INLINE | 0x0004,
CMARK_NODE_HTML_INLINE = CMARK_NODE_TYPE_INLINE | 0x0005,
CMARK_NODE_CUSTOM_INLINE = CMARK_NODE_TYPE_INLINE | 0x0006,
CMARK_NODE_EMPH = CMARK_NODE_TYPE_INLINE | 0x0007,
CMARK_NODE_STRONG = CMARK_NODE_TYPE_INLINE | 0x0008,
CMARK_NODE_LINK = CMARK_NODE_TYPE_INLINE | 0x0009,
CMARK_NODE_IMAGE = CMARK_NODE_TYPE_INLINE | 0x000a,
CMARK_NODE_FOOTNOTE_REFERENCE = CMARK_NODE_TYPE_INLINE | 0x000b,
} cmark_node_type;
extern cmark_node_type CMARK_NODE_LAST_BLOCK;
extern cmark_node_type CMARK_NODE_LAST_INLINE;
/* For backwards compatibility: */
#define CMARK_NODE_HEADER CMARK_NODE_HEADING
#define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK
#define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK
#define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE
typedef enum {
CMARK_NO_LIST,
CMARK_BULLET_LIST,
CMARK_ORDERED_LIST
} cmark_list_type;
typedef enum {
CMARK_NO_DELIM,
CMARK_PERIOD_DELIM,
CMARK_PAREN_DELIM
} cmark_delim_type;
typedef struct cmark_node cmark_node;
typedef struct cmark_parser cmark_parser;
typedef struct cmark_iter cmark_iter;
typedef struct cmark_syntax_extension cmark_syntax_extension;
/**
* ## Custom memory allocator support
*/
/** Defines the memory allocation functions to be used by CMark
* when parsing and allocating a document tree
*/
typedef struct cmark_mem {
void *(*calloc)(size_t, size_t);
void *(*realloc)(void *, size_t);
void (*free)(void *);
} cmark_mem;
/** The default memory allocator; uses the system's calloc,
* realloc and free.
*/
CMARK_GFM_EXPORT
cmark_mem *cmark_get_default_mem_allocator();
/** An arena allocator; uses system calloc to allocate large
* slabs of memory. Memory in these slabs is not reused at all.
*/
CMARK_GFM_EXPORT
cmark_mem *cmark_get_arena_mem_allocator();
/** Resets the arena allocator, quickly returning all used memory
* to the operating system.
*/
CMARK_GFM_EXPORT
void cmark_arena_reset(void);
/** Callback for freeing user data with a 'cmark_mem' context.
*/
typedef void (*cmark_free_func) (cmark_mem *mem, void *user_data);
/*
* ## Basic data structures
*
* To keep dependencies to the strict minimum, libcmark implements
* its own versions of "classic" data structures.
*/
/**
* ### Linked list
*/
/** A generic singly linked list.
*/
typedef struct _cmark_llist
{
struct _cmark_llist *next;
void *data;
} cmark_llist;
/** Append an element to the linked list, return the possibly modified
* head of the list.
*/
CMARK_GFM_EXPORT
cmark_llist * cmark_llist_append (cmark_mem * mem,
cmark_llist * head,
void * data);
/** Free the list starting with 'head', calling 'free_func' with the
* data pointer of each of its elements
*/
CMARK_GFM_EXPORT
void cmark_llist_free_full (cmark_mem * mem,
cmark_llist * head,
cmark_free_func free_func);
/** Free the list starting with 'head'
*/
CMARK_GFM_EXPORT
void cmark_llist_free (cmark_mem * mem,
cmark_llist * head);
/**
* ## Creating and Destroying Nodes
*/
/** Creates a new node of type 'type'. Note that the node may have
* other required properties, which it is the caller's responsibility
* to assign.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_new(cmark_node_type type);
/** Same as `cmark_node_new`, but explicitly listing the memory
* allocator used to allocate the node. Note: be sure to use the same
* allocator for every node in a tree, or bad things can happen.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type,
cmark_mem *mem);
CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_ext(cmark_node_type type,
cmark_syntax_extension *extension);
CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_mem_and_ext(cmark_node_type type,
cmark_mem *mem,
cmark_syntax_extension *extension);
/** Frees the memory allocated for a node and any children.
*/
CMARK_GFM_EXPORT void cmark_node_free(cmark_node *node);
/**
* ## Tree Traversal
*/
/** Returns the next node in the sequence after 'node', or NULL if
* there is none.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_next(cmark_node *node);
/** Returns the previous node in the sequence after 'node', or NULL if
* there is none.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_previous(cmark_node *node);
/** Returns the parent of 'node', or NULL if there is none.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_parent(cmark_node *node);
/** Returns the first child of 'node', or NULL if 'node' has no children.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_first_child(cmark_node *node);
/** Returns the last child of 'node', or NULL if 'node' has no children.
*/
CMARK_GFM_EXPORT cmark_node *cmark_node_last_child(cmark_node *node);
/**
* ## Iterator
*
* An iterator will walk through a tree of nodes, starting from a root
* node, returning one node at a time, together with information about
* whether the node is being entered or exited. The iterator will
* first descend to a child node, if there is one. When there is no
* child, the iterator will go to the next sibling. When there is no
* next sibling, the iterator will return to the parent (but with
* a 'cmark_event_type' of `CMARK_EVENT_EXIT`). The iterator will
* return `CMARK_EVENT_DONE` when it reaches the root node again.
* One natural application is an HTML renderer, where an `ENTER` event
* outputs an open tag and an `EXIT` event outputs a close tag.
* An iterator might also be used to transform an AST in some systematic
* way, for example, turning all level-3 headings into regular paragraphs.
*
* void
* usage_example(cmark_node *root) {
* cmark_event_type ev_type;
* cmark_iter *iter = cmark_iter_new(root);
*
* while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
* cmark_node *cur = cmark_iter_get_node(iter);
* // Do something with `cur` and `ev_type`
* }
*
* cmark_iter_free(iter);
* }
*
* Iterators will never return `EXIT` events for leaf nodes, which are nodes
* of type:
*
* * CMARK_NODE_HTML_BLOCK
* * CMARK_NODE_THEMATIC_BREAK
* * CMARK_NODE_CODE_BLOCK
* * CMARK_NODE_TEXT
* * CMARK_NODE_SOFTBREAK
* * CMARK_NODE_LINEBREAK
* * CMARK_NODE_CODE
* * CMARK_NODE_HTML_INLINE
*
* Nodes must only be modified after an `EXIT` event, or an `ENTER` event for
* leaf nodes.
*/
typedef enum {
CMARK_EVENT_NONE,
CMARK_EVENT_DONE,
CMARK_EVENT_ENTER,
CMARK_EVENT_EXIT
} cmark_event_type;
/** Creates a new iterator starting at 'root'. The current node and event
* type are undefined until 'cmark_iter_next' is called for the first time.
* The memory allocated for the iterator should be released using
* 'cmark_iter_free' when it is no longer needed.
*/
CMARK_GFM_EXPORT
cmark_iter *cmark_iter_new(cmark_node *root);
/** Frees the memory allocated for an iterator.
*/
CMARK_GFM_EXPORT
void cmark_iter_free(cmark_iter *iter);
/** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`,
* `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`).
*/
CMARK_GFM_EXPORT
cmark_event_type cmark_iter_next(cmark_iter *iter);
/** Returns the current node.
*/
CMARK_GFM_EXPORT
cmark_node *cmark_iter_get_node(cmark_iter *iter);
/** Returns the current event type.
*/
CMARK_GFM_EXPORT
cmark_event_type cmark_iter_get_event_type(cmark_iter *iter);
/** Returns the root node.
*/
CMARK_GFM_EXPORT
cmark_node *cmark_iter_get_root(cmark_iter *iter);
/** Resets the iterator so that the current node is 'current' and
* the event type is 'event_type'. The new current node must be a
* descendant of the root node or the root node itself.
*/
CMARK_GFM_EXPORT
void cmark_iter_reset(cmark_iter *iter, cmark_node *current,
cmark_event_type event_type);
/**
* ## Accessors
*/
/** Returns the user data of 'node'.
*/
CMARK_GFM_EXPORT void *cmark_node_get_user_data(cmark_node *node);
/** Sets arbitrary user data for 'node'. Returns 1 on success,
* 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data);
/** Set free function for user data */
CMARK_GFM_EXPORT
int cmark_node_set_user_data_free_func(cmark_node *node,
cmark_free_func free_func);
/** Returns the type of 'node', or `CMARK_NODE_NONE` on error.
*/
CMARK_GFM_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node);
/** Like 'cmark_node_get_type', but returns a string representation
of the type, or `"<unknown>"`.
*/
CMARK_GFM_EXPORT
const char *cmark_node_get_type_string(cmark_node *node);
/** Returns the string contents of 'node', or an empty
string if none is set. Returns NULL if called on a
node that does not have string content.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_literal(cmark_node *node);
/** Sets the string contents of 'node'. Returns 1 on success,
* 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content);
/** Returns the heading level of 'node', or 0 if 'node' is not a heading.
*/
CMARK_GFM_EXPORT int cmark_node_get_heading_level(cmark_node *node);
/* For backwards compatibility */
#define cmark_node_get_header_level cmark_node_get_heading_level
#define cmark_node_set_header_level cmark_node_set_heading_level
/** Sets the heading level of 'node', returning 1 on success and 0 on error.
*/
CMARK_GFM_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level);
/** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node'
* is not a list.
*/
CMARK_GFM_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node);
/** Sets the list type of 'node', returning 1 on success and 0 on error.
*/
CMARK_GFM_EXPORT int cmark_node_set_list_type(cmark_node *node,
cmark_list_type type);
/** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node'
* is not a list.
*/
CMARK_GFM_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node);
/** Sets the list delimiter type of 'node', returning 1 on success and 0
* on error.
*/
CMARK_GFM_EXPORT int cmark_node_set_list_delim(cmark_node *node,
cmark_delim_type delim);
/** Returns starting number of 'node', if it is an ordered list, otherwise 0.
*/
CMARK_GFM_EXPORT int cmark_node_get_list_start(cmark_node *node);
/** Sets starting number of 'node', if it is an ordered list. Returns 1
* on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_list_start(cmark_node *node, int start);
/** Returns 1 if 'node' is a tight list, 0 otherwise.
*/
CMARK_GFM_EXPORT int cmark_node_get_list_tight(cmark_node *node);
/** Sets the "tightness" of a list. Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight);
/** Returns the info string from a fenced code block.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_fence_info(cmark_node *node);
/** Sets the info string in a fenced code block, returning 1 on
* success and 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info);
/** Sets code blocks fencing details
*/
CMARK_GFM_EXPORT int cmark_node_set_fenced(cmark_node * node, int fenced,
int length, int offset, char character);
/** Returns code blocks fencing details
*/
CMARK_GFM_EXPORT int cmark_node_get_fenced(cmark_node *node, int *length, int *offset, char *character);
/** Returns the URL of a link or image 'node', or an empty string
if no URL is set. Returns NULL if called on a node that is
not a link or image.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_url(cmark_node *node);
/** Sets the URL of a link or image 'node'. Returns 1 on success,
* 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_url(cmark_node *node, const char *url);
/** Returns the title of a link or image 'node', or an empty
string if no title is set. Returns NULL if called on a node
that is not a link or image.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_title(cmark_node *node);
/** Sets the title of a link or image 'node'. Returns 1 on success,
* 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_title(cmark_node *node, const char *title);
/** Returns the literal "on enter" text for a custom 'node', or
an empty string if no on_enter is set. Returns NULL if called
on a non-custom node.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_on_enter(cmark_node *node);
/** Sets the literal text to render "on enter" for a custom 'node'.
Any children of the node will be rendered after this text.
Returns 1 on success 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_on_enter(cmark_node *node,
const char *on_enter);
/** Returns the literal "on exit" text for a custom 'node', or
an empty string if no on_exit is set. Returns NULL if
called on a non-custom node.
*/
CMARK_GFM_EXPORT const char *cmark_node_get_on_exit(cmark_node *node);
/** Sets the literal text to render "on exit" for a custom 'node'.
Any children of the node will be rendered before this text.
Returns 1 on success 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit);
/** Returns the line on which 'node' begins.
*/
CMARK_GFM_EXPORT int cmark_node_get_start_line(cmark_node *node);
/** Returns the column at which 'node' begins.
*/
CMARK_GFM_EXPORT int cmark_node_get_start_column(cmark_node *node);
/** Returns the line on which 'node' ends.
*/
CMARK_GFM_EXPORT int cmark_node_get_end_line(cmark_node *node);
/** Returns the column at which 'node' ends.
*/
CMARK_GFM_EXPORT int cmark_node_get_end_column(cmark_node *node);
/**
* ## Tree Manipulation
*/
/** Unlinks a 'node', removing it from the tree, but not freeing its
* memory. (Use 'cmark_node_free' for that.)
*/
CMARK_GFM_EXPORT void cmark_node_unlink(cmark_node *node);
/** Inserts 'sibling' before 'node'. Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_insert_before(cmark_node *node,
cmark_node *sibling);
/** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling);
/** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does
* not free its memory).
* Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode);
/** Adds 'child' to the beginning of the children of 'node'.
* Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child);
/** Adds 'child' to the end of the children of 'node'.
* Returns 1 on success, 0 on failure.
*/
CMARK_GFM_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child);
/** Consolidates adjacent text nodes.
*/
CMARK_GFM_EXPORT void cmark_consolidate_text_nodes(cmark_node *root);
/** Ensures a node and all its children own their own chunk memory.
*/
CMARK_GFM_EXPORT void cmark_node_own(cmark_node *root);
/**
* ## Parsing
*
* Simple interface:
*
* cmark_node *document = cmark_parse_document("Hello *world*", 13,
* CMARK_OPT_DEFAULT);
*
* Streaming interface:
*
* cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
* FILE *fp = fopen("myfile.md", "rb");
* while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
* cmark_parser_feed(parser, buffer, bytes);
* if (bytes < sizeof(buffer)) {
* break;
* }
* }
* document = cmark_parser_finish(parser);
* cmark_parser_free(parser);
*/
/** Creates a new parser object.
*/
CMARK_GFM_EXPORT
cmark_parser *cmark_parser_new(int options);
/** Creates a new parser object with the given memory allocator
*/
CMARK_GFM_EXPORT
cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem);
/** Frees memory allocated for a parser object.
*/
CMARK_GFM_EXPORT
void cmark_parser_free(cmark_parser *parser);
/** Feeds a string of length 'len' to 'parser'.
*/
CMARK_GFM_EXPORT
void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len);
/** Finish parsing and return a pointer to a tree of nodes.
*/
CMARK_GFM_EXPORT
cmark_node *cmark_parser_finish(cmark_parser *parser);
/** Parse a CommonMark document in 'buffer' of length 'len'.
* Returns a pointer to a tree of nodes. The memory allocated for
* the node tree should be released using 'cmark_node_free'
* when it is no longer needed.
*/
CMARK_GFM_EXPORT
cmark_node *cmark_parse_document(const char *buffer, size_t len, int options);
/** Parse a CommonMark document in file 'f', returning a pointer to
* a tree of nodes. The memory allocated for the node tree should be
* released using 'cmark_node_free' when it is no longer needed.
*/
CMARK_GFM_EXPORT
cmark_node *cmark_parse_file(FILE *f, int options);
/**
* ## Rendering
*/
/** Render a 'node' tree as XML. It is the caller's responsibility
* to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_xml(cmark_node *root, int options);
/** As for 'cmark_render_xml', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_xml_with_mem(cmark_node *root, int options, cmark_mem *mem);
/** Render a 'node' tree as an HTML fragment. It is up to the user
* to add an appropriate header and footer. It is the caller's
* responsibility to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_html(cmark_node *root, int options, cmark_llist *extensions);
/** As for 'cmark_render_html', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_html_with_mem(cmark_node *root, int options, cmark_llist *extensions, cmark_mem *mem);
/** Render a 'node' tree as a groff man page, without the header.
* It is the caller's responsibility to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_man(cmark_node *root, int options, int width);
/** As for 'cmark_render_man', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_man_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
/** Render a 'node' tree as a commonmark document.
* It is the caller's responsibility to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_commonmark(cmark_node *root, int options, int width);
/** As for 'cmark_render_commonmark', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_commonmark_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
/** Render a 'node' tree as a plain text document.
* It is the caller's responsibility to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_plaintext(cmark_node *root, int options, int width);
/** As for 'cmark_render_plaintext', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_plaintext_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
/** Render a 'node' tree as a LaTeX document.
* It is the caller's responsibility to free the returned buffer.
*/
CMARK_GFM_EXPORT
char *cmark_render_latex(cmark_node *root, int options, int width);
/** As for 'cmark_render_latex', but specifying the allocator to use for
* the resulting string.
*/
CMARK_GFM_EXPORT
char *cmark_render_latex_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
/**
* ## Options
*/
/** Default options.
*/
#define CMARK_OPT_DEFAULT 0
/**
* ### Options affecting rendering
*/
/** Include a `data-sourcepos` attribute on all block elements.
*/
#define CMARK_OPT_SOURCEPOS (1 << 1)
/** Render `softbreak` elements as hard line breaks.
*/
#define CMARK_OPT_HARDBREAKS (1 << 2)
/** `CMARK_OPT_SAFE` is defined here for API compatibility,
but it no longer has any effect. "Safe" mode is now the default:
set `CMARK_OPT_UNSAFE` to disable it.
*/
#define CMARK_OPT_SAFE (1 << 3)
/** Render raw HTML and unsafe links (`javascript:`, `vbscript:`,
* `file:`, and `data:`, except for `image/png`, `image/gif`,
* `image/jpeg`, or `image/webp` mime types). By default,
* raw HTML is replaced by a placeholder HTML comment. Unsafe
* links are replaced by empty strings.
*/
#define CMARK_OPT_UNSAFE (1 << 17)
/** Render `softbreak` elements as spaces.
*/
#define CMARK_OPT_NOBREAKS (1 << 4)
/**
* ### Options affecting parsing
*/
/** Legacy option (no effect).
*/
#define CMARK_OPT_NORMALIZE (1 << 8)
/** Validate UTF-8 in the input before parsing, replacing illegal
* sequences with the replacement character U+FFFD.
*/
#define CMARK_OPT_VALIDATE_UTF8 (1 << 9)
/** Convert straight quotes to curly, --- to em dashes, -- to en dashes.
*/
#define CMARK_OPT_SMART (1 << 10)
/** Use GitHub-style <pre lang="x"> tags for code blocks instead of <pre><code
* class="language-x">.
*/
#define CMARK_OPT_GITHUB_PRE_LANG (1 << 11)
/** Be liberal in interpreting inline HTML tags.
*/
#define CMARK_OPT_LIBERAL_HTML_TAG (1 << 12)
/** Parse footnotes.
*/
#define CMARK_OPT_FOOTNOTES (1 << 13)
/** Only parse strikethroughs if surrounded by exactly 2 tildes.
* Gives some compatibility with redcarpet.
*/
#define CMARK_OPT_STRIKETHROUGH_DOUBLE_TILDE (1 << 14)
/** Use style attributes to align table cells instead of align attributes.
*/
#define CMARK_OPT_TABLE_PREFER_STYLE_ATTRIBUTES (1 << 15)
/** Include the remainder of the info string in code blocks in
* a separate attribute.
*/
#define CMARK_OPT_FULL_INFO_STRING (1 << 16)
/**
* ## Version information
*/
/** The library version as integer for runtime checks. Also available as
* macro CMARK_VERSION for compile time checks.
*
* * Bits 16-23 contain the major version.
* * Bits 8-15 contain the minor version.
* * Bits 0-7 contain the patchlevel.
*
* In hexadecimal format, the number 0x010203 represents version 1.2.3.
*/
CMARK_GFM_EXPORT
int cmark_version(void);
/** The library version string for runtime checks. Also available as
* macro CMARK_VERSION_STRING for compile time checks.
*/
CMARK_GFM_EXPORT
const char *cmark_version_string(void);
/** # AUTHORS
*
* John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
*/
#ifndef CMARK_NO_SHORT_NAMES
#define NODE_DOCUMENT CMARK_NODE_DOCUMENT
#define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE
#define NODE_LIST CMARK_NODE_LIST
#define NODE_ITEM CMARK_NODE_ITEM
#define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK
#define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK
#define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK
#define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH
#define NODE_HEADING CMARK_NODE_HEADING
#define NODE_HEADER CMARK_NODE_HEADER
#define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK
#define NODE_HRULE CMARK_NODE_HRULE
#define NODE_TEXT CMARK_NODE_TEXT
#define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK
#define NODE_LINEBREAK CMARK_NODE_LINEBREAK
#define NODE_CODE CMARK_NODE_CODE
#define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE
#define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE
#define NODE_EMPH CMARK_NODE_EMPH
#define NODE_STRONG CMARK_NODE_STRONG
#define NODE_LINK CMARK_NODE_LINK
#define NODE_IMAGE CMARK_NODE_IMAGE
#define BULLET_LIST CMARK_BULLET_LIST
#define ORDERED_LIST CMARK_ORDERED_LIST
#define PERIOD_DELIM CMARK_PERIOD_DELIM
#define PAREN_DELIM CMARK_PAREN_DELIM
#endif
typedef int32_t bufsize_t;
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/case_fold_switch.inc | switch (c) {
case 0x0041:
bufpush(0x0061);
break;
case 0x0042:
bufpush(0x0062);
break;
case 0x0043:
bufpush(0x0063);
break;
case 0x0044:
bufpush(0x0064);
break;
case 0x0045:
bufpush(0x0065);
break;
case 0x0046:
bufpush(0x0066);
break;
case 0x0047:
bufpush(0x0067);
break;
case 0x0048:
bufpush(0x0068);
break;
case 0x0049:
bufpush(0x0069);
break;
case 0x004A:
bufpush(0x006A);
break;
case 0x004B:
bufpush(0x006B);
break;
case 0x004C:
bufpush(0x006C);
break;
case 0x004D:
bufpush(0x006D);
break;
case 0x004E:
bufpush(0x006E);
break;
case 0x004F:
bufpush(0x006F);
break;
case 0x0050:
bufpush(0x0070);
break;
case 0x0051:
bufpush(0x0071);
break;
case 0x0052:
bufpush(0x0072);
break;
case 0x0053:
bufpush(0x0073);
break;
case 0x0054:
bufpush(0x0074);
break;
case 0x0055:
bufpush(0x0075);
break;
case 0x0056:
bufpush(0x0076);
break;
case 0x0057:
bufpush(0x0077);
break;
case 0x0058:
bufpush(0x0078);
break;
case 0x0059:
bufpush(0x0079);
break;
case 0x005A:
bufpush(0x007A);
break;
case 0x00B5:
bufpush(0x03BC);
break;
case 0x00C0:
bufpush(0x00E0);
break;
case 0x00C1:
bufpush(0x00E1);
break;
case 0x00C2:
bufpush(0x00E2);
break;
case 0x00C3:
bufpush(0x00E3);
break;
case 0x00C4:
bufpush(0x00E4);
break;
case 0x00C5:
bufpush(0x00E5);
break;
case 0x00C6:
bufpush(0x00E6);
break;
case 0x00C7:
bufpush(0x00E7);
break;
case 0x00C8:
bufpush(0x00E8);
break;
case 0x00C9:
bufpush(0x00E9);
break;
case 0x00CA:
bufpush(0x00EA);
break;
case 0x00CB:
bufpush(0x00EB);
break;
case 0x00CC:
bufpush(0x00EC);
break;
case 0x00CD:
bufpush(0x00ED);
break;
case 0x00CE:
bufpush(0x00EE);
break;
case 0x00CF:
bufpush(0x00EF);
break;
case 0x00D0:
bufpush(0x00F0);
break;
case 0x00D1:
bufpush(0x00F1);
break;
case 0x00D2:
bufpush(0x00F2);
break;
case 0x00D3:
bufpush(0x00F3);
break;
case 0x00D4:
bufpush(0x00F4);
break;
case 0x00D5:
bufpush(0x00F5);
break;
case 0x00D6:
bufpush(0x00F6);
break;
case 0x00D8:
bufpush(0x00F8);
break;
case 0x00D9:
bufpush(0x00F9);
break;
case 0x00DA:
bufpush(0x00FA);
break;
case 0x00DB:
bufpush(0x00FB);
break;
case 0x00DC:
bufpush(0x00FC);
break;
case 0x00DD:
bufpush(0x00FD);
break;
case 0x00DE:
bufpush(0x00FE);
break;
case 0x00DF:
bufpush(0x0073);
bufpush(0x0073);
break;
case 0x0100:
bufpush(0x0101);
break;
case 0x0102:
bufpush(0x0103);
break;
case 0x0104:
bufpush(0x0105);
break;
case 0x0106:
bufpush(0x0107);
break;
case 0x0108:
bufpush(0x0109);
break;
case 0x010A:
bufpush(0x010B);
break;
case 0x010C:
bufpush(0x010D);
break;
case 0x010E:
bufpush(0x010F);
break;
case 0x0110:
bufpush(0x0111);
break;
case 0x0112:
bufpush(0x0113);
break;
case 0x0114:
bufpush(0x0115);
break;
case 0x0116:
bufpush(0x0117);
break;
case 0x0118:
bufpush(0x0119);
break;
case 0x011A:
bufpush(0x011B);
break;
case 0x011C:
bufpush(0x011D);
break;
case 0x011E:
bufpush(0x011F);
break;
case 0x0120:
bufpush(0x0121);
break;
case 0x0122:
bufpush(0x0123);
break;
case 0x0124:
bufpush(0x0125);
break;
case 0x0126:
bufpush(0x0127);
break;
case 0x0128:
bufpush(0x0129);
break;
case 0x012A:
bufpush(0x012B);
break;
case 0x012C:
bufpush(0x012D);
break;
case 0x012E:
bufpush(0x012F);
break;
case 0x0130:
bufpush(0x0069);
bufpush(0x0307);
break;
case 0x0132:
bufpush(0x0133);
break;
case 0x0134:
bufpush(0x0135);
break;
case 0x0136:
bufpush(0x0137);
break;
case 0x0139:
bufpush(0x013A);
break;
case 0x013B:
bufpush(0x013C);
break;
case 0x013D:
bufpush(0x013E);
break;
case 0x013F:
bufpush(0x0140);
break;
case 0x0141:
bufpush(0x0142);
break;
case 0x0143:
bufpush(0x0144);
break;
case 0x0145:
bufpush(0x0146);
break;
case 0x0147:
bufpush(0x0148);
break;
case 0x0149:
bufpush(0x02BC);
bufpush(0x006E);
break;
case 0x014A:
bufpush(0x014B);
break;
case 0x014C:
bufpush(0x014D);
break;
case 0x014E:
bufpush(0x014F);
break;
case 0x0150:
bufpush(0x0151);
break;
case 0x0152:
bufpush(0x0153);
break;
case 0x0154:
bufpush(0x0155);
break;
case 0x0156:
bufpush(0x0157);
break;
case 0x0158:
bufpush(0x0159);
break;
case 0x015A:
bufpush(0x015B);
break;
case 0x015C:
bufpush(0x015D);
break;
case 0x015E:
bufpush(0x015F);
break;
case 0x0160:
bufpush(0x0161);
break;
case 0x0162:
bufpush(0x0163);
break;
case 0x0164:
bufpush(0x0165);
break;
case 0x0166:
bufpush(0x0167);
break;
case 0x0168:
bufpush(0x0169);
break;
case 0x016A:
bufpush(0x016B);
break;
case 0x016C:
bufpush(0x016D);
break;
case 0x016E:
bufpush(0x016F);
break;
case 0x0170:
bufpush(0x0171);
break;
case 0x0172:
bufpush(0x0173);
break;
case 0x0174:
bufpush(0x0175);
break;
case 0x0176:
bufpush(0x0177);
break;
case 0x0178:
bufpush(0x00FF);
break;
case 0x0179:
bufpush(0x017A);
break;
case 0x017B:
bufpush(0x017C);
break;
case 0x017D:
bufpush(0x017E);
break;
case 0x017F:
bufpush(0x0073);
break;
case 0x0181:
bufpush(0x0253);
break;
case 0x0182:
bufpush(0x0183);
break;
case 0x0184:
bufpush(0x0185);
break;
case 0x0186:
bufpush(0x0254);
break;
case 0x0187:
bufpush(0x0188);
break;
case 0x0189:
bufpush(0x0256);
break;
case 0x018A:
bufpush(0x0257);
break;
case 0x018B:
bufpush(0x018C);
break;
case 0x018E:
bufpush(0x01DD);
break;
case 0x018F:
bufpush(0x0259);
break;
case 0x0190:
bufpush(0x025B);
break;
case 0x0191:
bufpush(0x0192);
break;
case 0x0193:
bufpush(0x0260);
break;
case 0x0194:
bufpush(0x0263);
break;
case 0x0196:
bufpush(0x0269);
break;
case 0x0197:
bufpush(0x0268);
break;
case 0x0198:
bufpush(0x0199);
break;
case 0x019C:
bufpush(0x026F);
break;
case 0x019D:
bufpush(0x0272);
break;
case 0x019F:
bufpush(0x0275);
break;
case 0x01A0:
bufpush(0x01A1);
break;
case 0x01A2:
bufpush(0x01A3);
break;
case 0x01A4:
bufpush(0x01A5);
break;
case 0x01A6:
bufpush(0x0280);
break;
case 0x01A7:
bufpush(0x01A8);
break;
case 0x01A9:
bufpush(0x0283);
break;
case 0x01AC:
bufpush(0x01AD);
break;
case 0x01AE:
bufpush(0x0288);
break;
case 0x01AF:
bufpush(0x01B0);
break;
case 0x01B1:
bufpush(0x028A);
break;
case 0x01B2:
bufpush(0x028B);
break;
case 0x01B3:
bufpush(0x01B4);
break;
case 0x01B5:
bufpush(0x01B6);
break;
case 0x01B7:
bufpush(0x0292);
break;
case 0x01B8:
bufpush(0x01B9);
break;
case 0x01BC:
bufpush(0x01BD);
break;
case 0x01C4:
bufpush(0x01C6);
break;
case 0x01C5:
bufpush(0x01C6);
break;
case 0x01C7:
bufpush(0x01C9);
break;
case 0x01C8:
bufpush(0x01C9);
break;
case 0x01CA:
bufpush(0x01CC);
break;
case 0x01CB:
bufpush(0x01CC);
break;
case 0x01CD:
bufpush(0x01CE);
break;
case 0x01CF:
bufpush(0x01D0);
break;
case 0x01D1:
bufpush(0x01D2);
break;
case 0x01D3:
bufpush(0x01D4);
break;
case 0x01D5:
bufpush(0x01D6);
break;
case 0x01D7:
bufpush(0x01D8);
break;
case 0x01D9:
bufpush(0x01DA);
break;
case 0x01DB:
bufpush(0x01DC);
break;
case 0x01DE:
bufpush(0x01DF);
break;
case 0x01E0:
bufpush(0x01E1);
break;
case 0x01E2:
bufpush(0x01E3);
break;
case 0x01E4:
bufpush(0x01E5);
break;
case 0x01E6:
bufpush(0x01E7);
break;
case 0x01E8:
bufpush(0x01E9);
break;
case 0x01EA:
bufpush(0x01EB);
break;
case 0x01EC:
bufpush(0x01ED);
break;
case 0x01EE:
bufpush(0x01EF);
break;
case 0x01F0:
bufpush(0x006A);
bufpush(0x030C);
break;
case 0x01F1:
bufpush(0x01F3);
break;
case 0x01F2:
bufpush(0x01F3);
break;
case 0x01F4:
bufpush(0x01F5);
break;
case 0x01F6:
bufpush(0x0195);
break;
case 0x01F7:
bufpush(0x01BF);
break;
case 0x01F8:
bufpush(0x01F9);
break;
case 0x01FA:
bufpush(0x01FB);
break;
case 0x01FC:
bufpush(0x01FD);
break;
case 0x01FE:
bufpush(0x01FF);
break;
case 0x0200:
bufpush(0x0201);
break;
case 0x0202:
bufpush(0x0203);
break;
case 0x0204:
bufpush(0x0205);
break;
case 0x0206:
bufpush(0x0207);
break;
case 0x0208:
bufpush(0x0209);
break;
case 0x020A:
bufpush(0x020B);
break;
case 0x020C:
bufpush(0x020D);
break;
case 0x020E:
bufpush(0x020F);
break;
case 0x0210:
bufpush(0x0211);
break;
case 0x0212:
bufpush(0x0213);
break;
case 0x0214:
bufpush(0x0215);
break;
case 0x0216:
bufpush(0x0217);
break;
case 0x0218:
bufpush(0x0219);
break;
case 0x021A:
bufpush(0x021B);
break;
case 0x021C:
bufpush(0x021D);
break;
case 0x021E:
bufpush(0x021F);
break;
case 0x0220:
bufpush(0x019E);
break;
case 0x0222:
bufpush(0x0223);
break;
case 0x0224:
bufpush(0x0225);
break;
case 0x0226:
bufpush(0x0227);
break;
case 0x0228:
bufpush(0x0229);
break;
case 0x022A:
bufpush(0x022B);
break;
case 0x022C:
bufpush(0x022D);
break;
case 0x022E:
bufpush(0x022F);
break;
case 0x0230:
bufpush(0x0231);
break;
case 0x0232:
bufpush(0x0233);
break;
case 0x023A:
bufpush(0x2C65);
break;
case 0x023B:
bufpush(0x023C);
break;
case 0x023D:
bufpush(0x019A);
break;
case 0x023E:
bufpush(0x2C66);
break;
case 0x0241:
bufpush(0x0242);
break;
case 0x0243:
bufpush(0x0180);
break;
case 0x0244:
bufpush(0x0289);
break;
case 0x0245:
bufpush(0x028C);
break;
case 0x0246:
bufpush(0x0247);
break;
case 0x0248:
bufpush(0x0249);
break;
case 0x024A:
bufpush(0x024B);
break;
case 0x024C:
bufpush(0x024D);
break;
case 0x024E:
bufpush(0x024F);
break;
case 0x0345:
bufpush(0x03B9);
break;
case 0x0370:
bufpush(0x0371);
break;
case 0x0372:
bufpush(0x0373);
break;
case 0x0376:
bufpush(0x0377);
break;
case 0x037F:
bufpush(0x03F3);
break;
case 0x0386:
bufpush(0x03AC);
break;
case 0x0388:
bufpush(0x03AD);
break;
case 0x0389:
bufpush(0x03AE);
break;
case 0x038A:
bufpush(0x03AF);
break;
case 0x038C:
bufpush(0x03CC);
break;
case 0x038E:
bufpush(0x03CD);
break;
case 0x038F:
bufpush(0x03CE);
break;
case 0x0390:
bufpush(0x03B9);
bufpush(0x0308);
bufpush(0x0301);
break;
case 0x0391:
bufpush(0x03B1);
break;
case 0x0392:
bufpush(0x03B2);
break;
case 0x0393:
bufpush(0x03B3);
break;
case 0x0394:
bufpush(0x03B4);
break;
case 0x0395:
bufpush(0x03B5);
break;
case 0x0396:
bufpush(0x03B6);
break;
case 0x0397:
bufpush(0x03B7);
break;
case 0x0398:
bufpush(0x03B8);
break;
case 0x0399:
bufpush(0x03B9);
break;
case 0x039A:
bufpush(0x03BA);
break;
case 0x039B:
bufpush(0x03BB);
break;
case 0x039C:
bufpush(0x03BC);
break;
case 0x039D:
bufpush(0x03BD);
break;
case 0x039E:
bufpush(0x03BE);
break;
case 0x039F:
bufpush(0x03BF);
break;
case 0x03A0:
bufpush(0x03C0);
break;
case 0x03A1:
bufpush(0x03C1);
break;
case 0x03A3:
bufpush(0x03C3);
break;
case 0x03A4:
bufpush(0x03C4);
break;
case 0x03A5:
bufpush(0x03C5);
break;
case 0x03A6:
bufpush(0x03C6);
break;
case 0x03A7:
bufpush(0x03C7);
break;
case 0x03A8:
bufpush(0x03C8);
break;
case 0x03A9:
bufpush(0x03C9);
break;
case 0x03AA:
bufpush(0x03CA);
break;
case 0x03AB:
bufpush(0x03CB);
break;
case 0x03B0:
bufpush(0x03C5);
bufpush(0x0308);
bufpush(0x0301);
break;
case 0x03C2:
bufpush(0x03C3);
break;
case 0x03CF:
bufpush(0x03D7);
break;
case 0x03D0:
bufpush(0x03B2);
break;
case 0x03D1:
bufpush(0x03B8);
break;
case 0x03D5:
bufpush(0x03C6);
break;
case 0x03D6:
bufpush(0x03C0);
break;
case 0x03D8:
bufpush(0x03D9);
break;
case 0x03DA:
bufpush(0x03DB);
break;
case 0x03DC:
bufpush(0x03DD);
break;
case 0x03DE:
bufpush(0x03DF);
break;
case 0x03E0:
bufpush(0x03E1);
break;
case 0x03E2:
bufpush(0x03E3);
break;
case 0x03E4:
bufpush(0x03E5);
break;
case 0x03E6:
bufpush(0x03E7);
break;
case 0x03E8:
bufpush(0x03E9);
break;
case 0x03EA:
bufpush(0x03EB);
break;
case 0x03EC:
bufpush(0x03ED);
break;
case 0x03EE:
bufpush(0x03EF);
break;
case 0x03F0:
bufpush(0x03BA);
break;
case 0x03F1:
bufpush(0x03C1);
break;
case 0x03F4:
bufpush(0x03B8);
break;
case 0x03F5:
bufpush(0x03B5);
break;
case 0x03F7:
bufpush(0x03F8);
break;
case 0x03F9:
bufpush(0x03F2);
break;
case 0x03FA:
bufpush(0x03FB);
break;
case 0x03FD:
bufpush(0x037B);
break;
case 0x03FE:
bufpush(0x037C);
break;
case 0x03FF:
bufpush(0x037D);
break;
case 0x0400:
bufpush(0x0450);
break;
case 0x0401:
bufpush(0x0451);
break;
case 0x0402:
bufpush(0x0452);
break;
case 0x0403:
bufpush(0x0453);
break;
case 0x0404:
bufpush(0x0454);
break;
case 0x0405:
bufpush(0x0455);
break;
case 0x0406:
bufpush(0x0456);
break;
case 0x0407:
bufpush(0x0457);
break;
case 0x0408:
bufpush(0x0458);
break;
case 0x0409:
bufpush(0x0459);
break;
case 0x040A:
bufpush(0x045A);
break;
case 0x040B:
bufpush(0x045B);
break;
case 0x040C:
bufpush(0x045C);
break;
case 0x040D:
bufpush(0x045D);
break;
case 0x040E:
bufpush(0x045E);
break;
case 0x040F:
bufpush(0x045F);
break;
case 0x0410:
bufpush(0x0430);
break;
case 0x0411:
bufpush(0x0431);
break;
case 0x0412:
bufpush(0x0432);
break;
case 0x0413:
bufpush(0x0433);
break;
case 0x0414:
bufpush(0x0434);
break;
case 0x0415:
bufpush(0x0435);
break;
case 0x0416:
bufpush(0x0436);
break;
case 0x0417:
bufpush(0x0437);
break;
case 0x0418:
bufpush(0x0438);
break;
case 0x0419:
bufpush(0x0439);
break;
case 0x041A:
bufpush(0x043A);
break;
case 0x041B:
bufpush(0x043B);
break;
case 0x041C:
bufpush(0x043C);
break;
case 0x041D:
bufpush(0x043D);
break;
case 0x041E:
bufpush(0x043E);
break;
case 0x041F:
bufpush(0x043F);
break;
case 0x0420:
bufpush(0x0440);
break;
case 0x0421:
bufpush(0x0441);
break;
case 0x0422:
bufpush(0x0442);
break;
case 0x0423:
bufpush(0x0443);
break;
case 0x0424:
bufpush(0x0444);
break;
case 0x0425:
bufpush(0x0445);
break;
case 0x0426:
bufpush(0x0446);
break;
case 0x0427:
bufpush(0x0447);
break;
case 0x0428:
bufpush(0x0448);
break;
case 0x0429:
bufpush(0x0449);
break;
case 0x042A:
bufpush(0x044A);
break;
case 0x042B:
bufpush(0x044B);
break;
case 0x042C:
bufpush(0x044C);
break;
case 0x042D:
bufpush(0x044D);
break;
case 0x042E:
bufpush(0x044E);
break;
case 0x042F:
bufpush(0x044F);
break;
case 0x0460:
bufpush(0x0461);
break;
case 0x0462:
bufpush(0x0463);
break;
case 0x0464:
bufpush(0x0465);
break;
case 0x0466:
bufpush(0x0467);
break;
case 0x0468:
bufpush(0x0469);
break;
case 0x046A:
bufpush(0x046B);
break;
case 0x046C:
bufpush(0x046D);
break;
case 0x046E:
bufpush(0x046F);
break;
case 0x0470:
bufpush(0x0471);
break;
case 0x0472:
bufpush(0x0473);
break;
case 0x0474:
bufpush(0x0475);
break;
case 0x0476:
bufpush(0x0477);
break;
case 0x0478:
bufpush(0x0479);
break;
case 0x047A:
bufpush(0x047B);
break;
case 0x047C:
bufpush(0x047D);
break;
case 0x047E:
bufpush(0x047F);
break;
case 0x0480:
bufpush(0x0481);
break;
case 0x048A:
bufpush(0x048B);
break;
case 0x048C:
bufpush(0x048D);
break;
case 0x048E:
bufpush(0x048F);
break;
case 0x0490:
bufpush(0x0491);
break;
case 0x0492:
bufpush(0x0493);
break;
case 0x0494:
bufpush(0x0495);
break;
case 0x0496:
bufpush(0x0497);
break;
case 0x0498:
bufpush(0x0499);
break;
case 0x049A:
bufpush(0x049B);
break;
case 0x049C:
bufpush(0x049D);
break;
case 0x049E:
bufpush(0x049F);
break;
case 0x04A0:
bufpush(0x04A1);
break;
case 0x04A2:
bufpush(0x04A3);
break;
case 0x04A4:
bufpush(0x04A5);
break;
case 0x04A6:
bufpush(0x04A7);
break;
case 0x04A8:
bufpush(0x04A9);
break;
case 0x04AA:
bufpush(0x04AB);
break;
case 0x04AC:
bufpush(0x04AD);
break;
case 0x04AE:
bufpush(0x04AF);
break;
case 0x04B0:
bufpush(0x04B1);
break;
case 0x04B2:
bufpush(0x04B3);
break;
case 0x04B4:
bufpush(0x04B5);
break;
case 0x04B6:
bufpush(0x04B7);
break;
case 0x04B8:
bufpush(0x04B9);
break;
case 0x04BA:
bufpush(0x04BB);
break;
case 0x04BC:
bufpush(0x04BD);
break;
case 0x04BE:
bufpush(0x04BF);
break;
case 0x04C0:
bufpush(0x04CF);
break;
case 0x04C1:
bufpush(0x04C2);
break;
case 0x04C3:
bufpush(0x04C4);
break;
case 0x04C5:
bufpush(0x04C6);
break;
case 0x04C7:
bufpush(0x04C8);
break;
case 0x04C9:
bufpush(0x04CA);
break;
case 0x04CB:
bufpush(0x04CC);
break;
case 0x04CD:
bufpush(0x04CE);
break;
case 0x04D0:
bufpush(0x04D1);
break;
case 0x04D2:
bufpush(0x04D3);
break;
case 0x04D4:
bufpush(0x04D5);
break;
case 0x04D6:
bufpush(0x04D7);
break;
case 0x04D8:
bufpush(0x04D9);
break;
case 0x04DA:
bufpush(0x04DB);
break;
case 0x04DC:
bufpush(0x04DD);
break;
case 0x04DE:
bufpush(0x04DF);
break;
case 0x04E0:
bufpush(0x04E1);
break;
case 0x04E2:
bufpush(0x04E3);
break;
case 0x04E4:
bufpush(0x04E5);
break;
case 0x04E6:
bufpush(0x04E7);
break;
case 0x04E8:
bufpush(0x04E9);
break;
case 0x04EA:
bufpush(0x04EB);
break;
case 0x04EC:
bufpush(0x04ED);
break;
case 0x04EE:
bufpush(0x04EF);
break;
case 0x04F0:
bufpush(0x04F1);
break;
case 0x04F2:
bufpush(0x04F3);
break;
case 0x04F4:
bufpush(0x04F5);
break;
case 0x04F6:
bufpush(0x04F7);
break;
case 0x04F8:
bufpush(0x04F9);
break;
case 0x04FA:
bufpush(0x04FB);
break;
case 0x04FC:
bufpush(0x04FD);
break;
case 0x04FE:
bufpush(0x04FF);
break;
case 0x0500:
bufpush(0x0501);
break;
case 0x0502:
bufpush(0x0503);
break;
case 0x0504:
bufpush(0x0505);
break;
case 0x0506:
bufpush(0x0507);
break;
case 0x0508:
bufpush(0x0509);
break;
case 0x050A:
bufpush(0x050B);
break;
case 0x050C:
bufpush(0x050D);
break;
case 0x050E:
bufpush(0x050F);
break;
case 0x0510:
bufpush(0x0511);
break;
case 0x0512:
bufpush(0x0513);
break;
case 0x0514:
bufpush(0x0515);
break;
case 0x0516:
bufpush(0x0517);
break;
case 0x0518:
bufpush(0x0519);
break;
case 0x051A:
bufpush(0x051B);
break;
case 0x051C:
bufpush(0x051D);
break;
case 0x051E:
bufpush(0x051F);
break;
case 0x0520:
bufpush(0x0521);
break;
case 0x0522:
bufpush(0x0523);
break;
case 0x0524:
bufpush(0x0525);
break;
case 0x0526:
bufpush(0x0527);
break;
case 0x0528:
bufpush(0x0529);
break;
case 0x052A:
bufpush(0x052B);
break;
case 0x052C:
bufpush(0x052D);
break;
case 0x052E:
bufpush(0x052F);
break;
case 0x0531:
bufpush(0x0561);
break;
case 0x0532:
bufpush(0x0562);
break;
case 0x0533:
bufpush(0x0563);
break;
case 0x0534:
bufpush(0x0564);
break;
case 0x0535:
bufpush(0x0565);
break;
case 0x0536:
bufpush(0x0566);
break;
case 0x0537:
bufpush(0x0567);
break;
case 0x0538:
bufpush(0x0568);
break;
case 0x0539:
bufpush(0x0569);
break;
case 0x053A:
bufpush(0x056A);
break;
case 0x053B:
bufpush(0x056B);
break;
case 0x053C:
bufpush(0x056C);
break;
case 0x053D:
bufpush(0x056D);
break;
case 0x053E:
bufpush(0x056E);
break;
case 0x053F:
bufpush(0x056F);
break;
case 0x0540:
bufpush(0x0570);
break;
case 0x0541:
bufpush(0x0571);
break;
case 0x0542:
bufpush(0x0572);
break;
case 0x0543:
bufpush(0x0573);
break;
case 0x0544:
bufpush(0x0574);
break;
case 0x0545:
bufpush(0x0575);
break;
case 0x0546:
bufpush(0x0576);
break;
case 0x0547:
bufpush(0x0577);
break;
case 0x0548:
bufpush(0x0578);
break;
case 0x0549:
bufpush(0x0579);
break;
case 0x054A:
bufpush(0x057A);
break;
case 0x054B:
bufpush(0x057B);
break;
case 0x054C:
bufpush(0x057C);
break;
case 0x054D:
bufpush(0x057D);
break;
case 0x054E:
bufpush(0x057E);
break;
case 0x054F:
bufpush(0x057F);
break;
case 0x0550:
bufpush(0x0580);
break;
case 0x0551:
bufpush(0x0581);
break;
case 0x0552:
bufpush(0x0582);
break;
case 0x0553:
bufpush(0x0583);
break;
case 0x0554:
bufpush(0x0584);
break;
case 0x0555:
bufpush(0x0585);
break;
case 0x0556:
bufpush(0x0586);
break;
case 0x0587:
bufpush(0x0565);
bufpush(0x0582);
break;
case 0x10A0:
bufpush(0x2D00);
break;
case 0x10A1:
bufpush(0x2D01);
break;
case 0x10A2:
bufpush(0x2D02);
break;
case 0x10A3:
bufpush(0x2D03);
break;
case 0x10A4:
bufpush(0x2D04);
break;
case 0x10A5:
bufpush(0x2D05);
break;
case 0x10A6:
bufpush(0x2D06);
break;
case 0x10A7:
bufpush(0x2D07);
break;
case 0x10A8:
bufpush(0x2D08);
break;
case 0x10A9:
bufpush(0x2D09);
break;
case 0x10AA:
bufpush(0x2D0A);
break;
case 0x10AB:
bufpush(0x2D0B);
break;
case 0x10AC:
bufpush(0x2D0C);
break;
case 0x10AD:
bufpush(0x2D0D);
break;
case 0x10AE:
bufpush(0x2D0E);
break;
case 0x10AF:
bufpush(0x2D0F);
break;
case 0x10B0:
bufpush(0x2D10);
break;
case 0x10B1:
bufpush(0x2D11);
break;
case 0x10B2:
bufpush(0x2D12);
break;
case 0x10B3:
bufpush(0x2D13);
break;
case 0x10B4:
bufpush(0x2D14);
break;
case 0x10B5:
bufpush(0x2D15);
break;
case 0x10B6:
bufpush(0x2D16);
break;
case 0x10B7:
bufpush(0x2D17);
break;
case 0x10B8:
bufpush(0x2D18);
break;
case 0x10B9:
bufpush(0x2D19);
break;
case 0x10BA:
bufpush(0x2D1A);
break;
case 0x10BB:
bufpush(0x2D1B);
break;
case 0x10BC:
bufpush(0x2D1C);
break;
case 0x10BD:
bufpush(0x2D1D);
break;
case 0x10BE:
bufpush(0x2D1E);
break;
case 0x10BF:
bufpush(0x2D1F);
break;
case 0x10C0:
bufpush(0x2D20);
break;
case 0x10C1:
bufpush(0x2D21);
break;
case 0x10C2:
bufpush(0x2D22);
break;
case 0x10C3:
bufpush(0x2D23);
break;
case 0x10C4:
bufpush(0x2D24);
break;
case 0x10C5:
bufpush(0x2D25);
break;
case 0x10C7:
bufpush(0x2D27);
break;
case 0x10CD:
bufpush(0x2D2D);
break;
case 0x13F8:
bufpush(0x13F0);
break;
case 0x13F9:
bufpush(0x13F1);
break;
case 0x13FA:
bufpush(0x13F2);
break;
case 0x13FB:
bufpush(0x13F3);
break;
case 0x13FC:
bufpush(0x13F4);
break;
case 0x13FD:
bufpush(0x13F5);
break;
case 0x1C80:
bufpush(0x0432);
break;
case 0x1C81:
bufpush(0x0434);
break;
case 0x1C82:
bufpush(0x043E);
break;
case 0x1C83:
bufpush(0x0441);
break;
case 0x1C84:
bufpush(0x0442);
break;
case 0x1C85:
bufpush(0x0442);
break;
case 0x1C86:
bufpush(0x044A);
break;
case 0x1C87:
bufpush(0x0463);
break;
case 0x1C88:
bufpush(0xA64B);
break;
case 0x1E00:
bufpush(0x1E01);
break;
case 0x1E02:
bufpush(0x1E03);
break;
case 0x1E04:
bufpush(0x1E05);
break;
case 0x1E06:
bufpush(0x1E07);
break;
case 0x1E08:
bufpush(0x1E09);
break;
case 0x1E0A:
bufpush(0x1E0B);
break;
case 0x1E0C:
bufpush(0x1E0D);
break;
case 0x1E0E:
bufpush(0x1E0F);
break;
case 0x1E10:
bufpush(0x1E11);
break;
case 0x1E12:
bufpush(0x1E13);
break;
case 0x1E14:
bufpush(0x1E15);
break;
case 0x1E16:
bufpush(0x1E17);
break;
case 0x1E18:
bufpush(0x1E19);
break;
case 0x1E1A:
bufpush(0x1E1B);
break;
case 0x1E1C:
bufpush(0x1E1D);
break;
case 0x1E1E:
bufpush(0x1E1F);
break;
case 0x1E20:
bufpush(0x1E21);
break;
case 0x1E22:
bufpush(0x1E23);
break;
case 0x1E24:
bufpush(0x1E25);
break;
case 0x1E26:
bufpush(0x1E27);
break;
case 0x1E28:
bufpush(0x1E29);
break;
case 0x1E2A:
bufpush(0x1E2B);
break;
case 0x1E2C:
bufpush(0x1E2D);
break;
case 0x1E2E:
bufpush(0x1E2F);
break;
case 0x1E30:
bufpush(0x1E31);
break;
case 0x1E32:
bufpush(0x1E33);
break;
case 0x1E34:
bufpush(0x1E35);
break;
case 0x1E36:
bufpush(0x1E37);
break;
case 0x1E38:
bufpush(0x1E39);
break;
case 0x1E3A:
bufpush(0x1E3B);
break;
case 0x1E3C:
bufpush(0x1E3D);
break;
case 0x1E3E:
bufpush(0x1E3F);
break;
case 0x1E40:
bufpush(0x1E41);
break;
case 0x1E42:
bufpush(0x1E43);
break;
case 0x1E44:
bufpush(0x1E45);
break;
case 0x1E46:
bufpush(0x1E47);
break;
case 0x1E48:
bufpush(0x1E49);
break;
case 0x1E4A:
bufpush(0x1E4B);
break;
case 0x1E4C:
bufpush(0x1E4D);
break;
case 0x1E4E:
bufpush(0x1E4F);
break;
case 0x1E50:
bufpush(0x1E51);
break;
case 0x1E52:
bufpush(0x1E53);
break;
case 0x1E54:
bufpush(0x1E55);
break;
case 0x1E56:
bufpush(0x1E57);
break;
case 0x1E58:
bufpush(0x1E59);
break;
case 0x1E5A:
bufpush(0x1E5B);
break;
case 0x1E5C:
bufpush(0x1E5D);
break;
case 0x1E5E:
bufpush(0x1E5F);
break;
case 0x1E60:
bufpush(0x1E61);
break;
case 0x1E62:
bufpush(0x1E63);
break;
case 0x1E64:
bufpush(0x1E65);
break;
case 0x1E66:
bufpush(0x1E67);
break;
case 0x1E68:
bufpush(0x1E69);
break;
case 0x1E6A:
bufpush(0x1E6B);
break;
case 0x1E6C:
bufpush(0x1E6D);
break;
case 0x1E6E:
bufpush(0x1E6F);
break;
case 0x1E70:
bufpush(0x1E71);
break;
case 0x1E72:
bufpush(0x1E73);
break;
case 0x1E74:
bufpush(0x1E75);
break;
case 0x1E76:
bufpush(0x1E77);
break;
case 0x1E78:
bufpush(0x1E79);
break;
case 0x1E7A:
bufpush(0x1E7B);
break;
case 0x1E7C:
bufpush(0x1E7D);
break;
case 0x1E7E:
bufpush(0x1E7F);
break;
case 0x1E80:
bufpush(0x1E81);
break;
case 0x1E82:
bufpush(0x1E83);
break;
case 0x1E84:
bufpush(0x1E85);
break;
case 0x1E86:
bufpush(0x1E87);
break;
case 0x1E88:
bufpush(0x1E89);
break;
case 0x1E8A:
bufpush(0x1E8B);
break;
case 0x1E8C:
bufpush(0x1E8D);
break;
case 0x1E8E:
bufpush(0x1E8F);
break;
case 0x1E90:
bufpush(0x1E91);
break;
case 0x1E92:
bufpush(0x1E93);
break;
case 0x1E94:
bufpush(0x1E95);
break;
case 0x1E96:
bufpush(0x0068);
bufpush(0x0331);
break;
case 0x1E97:
bufpush(0x0074);
bufpush(0x0308);
break;
case 0x1E98:
bufpush(0x0077);
bufpush(0x030A);
break;
case 0x1E99:
bufpush(0x0079);
bufpush(0x030A);
break;
case 0x1E9A:
bufpush(0x0061);
bufpush(0x02BE);
break;
case 0x1E9B:
bufpush(0x1E61);
break;
case 0x1E9E:
bufpush(0x0073);
bufpush(0x0073);
break;
case 0x1EA0:
bufpush(0x1EA1);
break;
case 0x1EA2:
bufpush(0x1EA3);
break;
case 0x1EA4:
bufpush(0x1EA5);
break;
case 0x1EA6:
bufpush(0x1EA7);
break;
case 0x1EA8:
bufpush(0x1EA9);
break;
case 0x1EAA:
bufpush(0x1EAB);
break;
case 0x1EAC:
bufpush(0x1EAD);
break;
case 0x1EAE:
bufpush(0x1EAF);
break;
case 0x1EB0:
bufpush(0x1EB1);
break;
case 0x1EB2:
bufpush(0x1EB3);
break;
case 0x1EB4:
bufpush(0x1EB5);
break;
case 0x1EB6:
bufpush(0x1EB7);
break;
case 0x1EB8:
bufpush(0x1EB9);
break;
case 0x1EBA:
bufpush(0x1EBB);
break;
case 0x1EBC:
bufpush(0x1EBD);
break;
case 0x1EBE:
bufpush(0x1EBF);
break;
case 0x1EC0:
bufpush(0x1EC1);
break;
case 0x1EC2:
bufpush(0x1EC3);
break;
case 0x1EC4:
bufpush(0x1EC5);
break;
case 0x1EC6:
bufpush(0x1EC7);
break;
case 0x1EC8:
bufpush(0x1EC9);
break;
case 0x1ECA:
bufpush(0x1ECB);
break;
case 0x1ECC:
bufpush(0x1ECD);
break;
case 0x1ECE:
bufpush(0x1ECF);
break;
case 0x1ED0:
bufpush(0x1ED1);
break;
case 0x1ED2:
bufpush(0x1ED3);
break;
case 0x1ED4:
bufpush(0x1ED5);
break;
case 0x1ED6:
bufpush(0x1ED7);
break;
case 0x1ED8:
bufpush(0x1ED9);
break;
case 0x1EDA:
bufpush(0x1EDB);
break;
case 0x1EDC:
bufpush(0x1EDD);
break;
case 0x1EDE:
bufpush(0x1EDF);
break;
case 0x1EE0:
bufpush(0x1EE1);
break;
case 0x1EE2:
bufpush(0x1EE3);
break;
case 0x1EE4:
bufpush(0x1EE5);
break;
case 0x1EE6:
bufpush(0x1EE7);
break;
case 0x1EE8:
bufpush(0x1EE9);
break;
case 0x1EEA:
bufpush(0x1EEB);
break;
case 0x1EEC:
bufpush(0x1EED);
break;
case 0x1EEE:
bufpush(0x1EEF);
break;
case 0x1EF0:
bufpush(0x1EF1);
break;
case 0x1EF2:
bufpush(0x1EF3);
break;
case 0x1EF4:
bufpush(0x1EF5);
break;
case 0x1EF6:
bufpush(0x1EF7);
break;
case 0x1EF8:
bufpush(0x1EF9);
break;
case 0x1EFA:
bufpush(0x1EFB);
break;
case 0x1EFC:
bufpush(0x1EFD);
break;
case 0x1EFE:
bufpush(0x1EFF);
break;
case 0x1F08:
bufpush(0x1F00);
break;
case 0x1F09:
bufpush(0x1F01);
break;
case 0x1F0A:
bufpush(0x1F02);
break;
case 0x1F0B:
bufpush(0x1F03);
break;
case 0x1F0C:
bufpush(0x1F04);
break;
case 0x1F0D:
bufpush(0x1F05);
break;
case 0x1F0E:
bufpush(0x1F06);
break;
case 0x1F0F:
bufpush(0x1F07);
break;
case 0x1F18:
bufpush(0x1F10);
break;
case 0x1F19:
bufpush(0x1F11);
break;
case 0x1F1A:
bufpush(0x1F12);
break;
case 0x1F1B:
bufpush(0x1F13);
break;
case 0x1F1C:
bufpush(0x1F14);
break;
case 0x1F1D:
bufpush(0x1F15);
break;
case 0x1F28:
bufpush(0x1F20);
break;
case 0x1F29:
bufpush(0x1F21);
break;
case 0x1F2A:
bufpush(0x1F22);
break;
case 0x1F2B:
bufpush(0x1F23);
break;
case 0x1F2C:
bufpush(0x1F24);
break;
case 0x1F2D:
bufpush(0x1F25);
break;
case 0x1F2E:
bufpush(0x1F26);
break;
case 0x1F2F:
bufpush(0x1F27);
break;
case 0x1F38:
bufpush(0x1F30);
break;
case 0x1F39:
bufpush(0x1F31);
break;
case 0x1F3A:
bufpush(0x1F32);
break;
case 0x1F3B:
bufpush(0x1F33);
break;
case 0x1F3C:
bufpush(0x1F34);
break;
case 0x1F3D:
bufpush(0x1F35);
break;
case 0x1F3E:
bufpush(0x1F36);
break;
case 0x1F3F:
bufpush(0x1F37);
break;
case 0x1F48:
bufpush(0x1F40);
break;
case 0x1F49:
bufpush(0x1F41);
break;
case 0x1F4A:
bufpush(0x1F42);
break;
case 0x1F4B:
bufpush(0x1F43);
break;
case 0x1F4C:
bufpush(0x1F44);
break;
case 0x1F4D:
bufpush(0x1F45);
break;
case 0x1F50:
bufpush(0x03C5);
bufpush(0x0313);
break;
case 0x1F52:
bufpush(0x03C5);
bufpush(0x0313);
bufpush(0x0300);
break;
case 0x1F54:
bufpush(0x03C5);
bufpush(0x0313);
bufpush(0x0301);
break;
case 0x1F56:
bufpush(0x03C5);
bufpush(0x0313);
bufpush(0x0342);
break;
case 0x1F59:
bufpush(0x1F51);
break;
case 0x1F5B:
bufpush(0x1F53);
break;
case 0x1F5D:
bufpush(0x1F55);
break;
case 0x1F5F:
bufpush(0x1F57);
break;
case 0x1F68:
bufpush(0x1F60);
break;
case 0x1F69:
bufpush(0x1F61);
break;
case 0x1F6A:
bufpush(0x1F62);
break;
case 0x1F6B:
bufpush(0x1F63);
break;
case 0x1F6C:
bufpush(0x1F64);
break;
case 0x1F6D:
bufpush(0x1F65);
break;
case 0x1F6E:
bufpush(0x1F66);
break;
case 0x1F6F:
bufpush(0x1F67);
break;
case 0x1F80:
bufpush(0x1F00);
bufpush(0x03B9);
break;
case 0x1F81:
bufpush(0x1F01);
bufpush(0x03B9);
break;
case 0x1F82:
bufpush(0x1F02);
bufpush(0x03B9);
break;
case 0x1F83:
bufpush(0x1F03);
bufpush(0x03B9);
break;
case 0x1F84:
bufpush(0x1F04);
bufpush(0x03B9);
break;
case 0x1F85:
bufpush(0x1F05);
bufpush(0x03B9);
break;
case 0x1F86:
bufpush(0x1F06);
bufpush(0x03B9);
break;
case 0x1F87:
bufpush(0x1F07);
bufpush(0x03B9);
break;
case 0x1F88:
bufpush(0x1F00);
bufpush(0x03B9);
break;
case 0x1F89:
bufpush(0x1F01);
bufpush(0x03B9);
break;
case 0x1F8A:
bufpush(0x1F02);
bufpush(0x03B9);
break;
case 0x1F8B:
bufpush(0x1F03);
bufpush(0x03B9);
break;
case 0x1F8C:
bufpush(0x1F04);
bufpush(0x03B9);
break;
case 0x1F8D:
bufpush(0x1F05);
bufpush(0x03B9);
break;
case 0x1F8E:
bufpush(0x1F06);
bufpush(0x03B9);
break;
case 0x1F8F:
bufpush(0x1F07);
bufpush(0x03B9);
break;
case 0x1F90:
bufpush(0x1F20);
bufpush(0x03B9);
break;
case 0x1F91:
bufpush(0x1F21);
bufpush(0x03B9);
break;
case 0x1F92:
bufpush(0x1F22);
bufpush(0x03B9);
break;
case 0x1F93:
bufpush(0x1F23);
bufpush(0x03B9);
break;
case 0x1F94:
bufpush(0x1F24);
bufpush(0x03B9);
break;
case 0x1F95:
bufpush(0x1F25);
bufpush(0x03B9);
break;
case 0x1F96:
bufpush(0x1F26);
bufpush(0x03B9);
break;
case 0x1F97:
bufpush(0x1F27);
bufpush(0x03B9);
break;
case 0x1F98:
bufpush(0x1F20);
bufpush(0x03B9);
break;
case 0x1F99:
bufpush(0x1F21);
bufpush(0x03B9);
break;
case 0x1F9A:
bufpush(0x1F22);
bufpush(0x03B9);
break;
case 0x1F9B:
bufpush(0x1F23);
bufpush(0x03B9);
break;
case 0x1F9C:
bufpush(0x1F24);
bufpush(0x03B9);
break;
case 0x1F9D:
bufpush(0x1F25);
bufpush(0x03B9);
break;
case 0x1F9E:
bufpush(0x1F26);
bufpush(0x03B9);
break;
case 0x1F9F:
bufpush(0x1F27);
bufpush(0x03B9);
break;
case 0x1FA0:
bufpush(0x1F60);
bufpush(0x03B9);
break;
case 0x1FA1:
bufpush(0x1F61);
bufpush(0x03B9);
break;
case 0x1FA2:
bufpush(0x1F62);
bufpush(0x03B9);
break;
case 0x1FA3:
bufpush(0x1F63);
bufpush(0x03B9);
break;
case 0x1FA4:
bufpush(0x1F64);
bufpush(0x03B9);
break;
case 0x1FA5:
bufpush(0x1F65);
bufpush(0x03B9);
break;
case 0x1FA6:
bufpush(0x1F66);
bufpush(0x03B9);
break;
case 0x1FA7:
bufpush(0x1F67);
bufpush(0x03B9);
break;
case 0x1FA8:
bufpush(0x1F60);
bufpush(0x03B9);
break;
case 0x1FA9:
bufpush(0x1F61);
bufpush(0x03B9);
break;
case 0x1FAA:
bufpush(0x1F62);
bufpush(0x03B9);
break;
case 0x1FAB:
bufpush(0x1F63);
bufpush(0x03B9);
break;
case 0x1FAC:
bufpush(0x1F64);
bufpush(0x03B9);
break;
case 0x1FAD:
bufpush(0x1F65);
bufpush(0x03B9);
break;
case 0x1FAE:
bufpush(0x1F66);
bufpush(0x03B9);
break;
case 0x1FAF:
bufpush(0x1F67);
bufpush(0x03B9);
break;
case 0x1FB2:
bufpush(0x1F70);
bufpush(0x03B9);
break;
case 0x1FB3:
bufpush(0x03B1);
bufpush(0x03B9);
break;
case 0x1FB4:
bufpush(0x03AC);
bufpush(0x03B9);
break;
case 0x1FB6:
bufpush(0x03B1);
bufpush(0x0342);
break;
case 0x1FB7:
bufpush(0x03B1);
bufpush(0x0342);
bufpush(0x03B9);
break;
case 0x1FB8:
bufpush(0x1FB0);
break;
case 0x1FB9:
bufpush(0x1FB1);
break;
case 0x1FBA:
bufpush(0x1F70);
break;
case 0x1FBB:
bufpush(0x1F71);
break;
case 0x1FBC:
bufpush(0x03B1);
bufpush(0x03B9);
break;
case 0x1FBE:
bufpush(0x03B9);
break;
case 0x1FC2:
bufpush(0x1F74);
bufpush(0x03B9);
break;
case 0x1FC3:
bufpush(0x03B7);
bufpush(0x03B9);
break;
case 0x1FC4:
bufpush(0x03AE);
bufpush(0x03B9);
break;
case 0x1FC6:
bufpush(0x03B7);
bufpush(0x0342);
break;
case 0x1FC7:
bufpush(0x03B7);
bufpush(0x0342);
bufpush(0x03B9);
break;
case 0x1FC8:
bufpush(0x1F72);
break;
case 0x1FC9:
bufpush(0x1F73);
break;
case 0x1FCA:
bufpush(0x1F74);
break;
case 0x1FCB:
bufpush(0x1F75);
break;
case 0x1FCC:
bufpush(0x03B7);
bufpush(0x03B9);
break;
case 0x1FD2:
bufpush(0x03B9);
bufpush(0x0308);
bufpush(0x0300);
break;
case 0x1FD3:
bufpush(0x03B9);
bufpush(0x0308);
bufpush(0x0301);
break;
case 0x1FD6:
bufpush(0x03B9);
bufpush(0x0342);
break;
case 0x1FD7:
bufpush(0x03B9);
bufpush(0x0308);
bufpush(0x0342);
break;
case 0x1FD8:
bufpush(0x1FD0);
break;
case 0x1FD9:
bufpush(0x1FD1);
break;
case 0x1FDA:
bufpush(0x1F76);
break;
case 0x1FDB:
bufpush(0x1F77);
break;
case 0x1FE2:
bufpush(0x03C5);
bufpush(0x0308);
bufpush(0x0300);
break;
case 0x1FE3:
bufpush(0x03C5);
bufpush(0x0308);
bufpush(0x0301);
break;
case 0x1FE4:
bufpush(0x03C1);
bufpush(0x0313);
break;
case 0x1FE6:
bufpush(0x03C5);
bufpush(0x0342);
break;
case 0x1FE7:
bufpush(0x03C5);
bufpush(0x0308);
bufpush(0x0342);
break;
case 0x1FE8:
bufpush(0x1FE0);
break;
case 0x1FE9:
bufpush(0x1FE1);
break;
case 0x1FEA:
bufpush(0x1F7A);
break;
case 0x1FEB:
bufpush(0x1F7B);
break;
case 0x1FEC:
bufpush(0x1FE5);
break;
case 0x1FF2:
bufpush(0x1F7C);
bufpush(0x03B9);
break;
case 0x1FF3:
bufpush(0x03C9);
bufpush(0x03B9);
break;
case 0x1FF4:
bufpush(0x03CE);
bufpush(0x03B9);
break;
case 0x1FF6:
bufpush(0x03C9);
bufpush(0x0342);
break;
case 0x1FF7:
bufpush(0x03C9);
bufpush(0x0342);
bufpush(0x03B9);
break;
case 0x1FF8:
bufpush(0x1F78);
break;
case 0x1FF9:
bufpush(0x1F79);
break;
case 0x1FFA:
bufpush(0x1F7C);
break;
case 0x1FFB:
bufpush(0x1F7D);
break;
case 0x1FFC:
bufpush(0x03C9);
bufpush(0x03B9);
break;
case 0x2126:
bufpush(0x03C9);
break;
case 0x212A:
bufpush(0x006B);
break;
case 0x212B:
bufpush(0x00E5);
break;
case 0x2132:
bufpush(0x214E);
break;
case 0x2160:
bufpush(0x2170);
break;
case 0x2161:
bufpush(0x2171);
break;
case 0x2162:
bufpush(0x2172);
break;
case 0x2163:
bufpush(0x2173);
break;
case 0x2164:
bufpush(0x2174);
break;
case 0x2165:
bufpush(0x2175);
break;
case 0x2166:
bufpush(0x2176);
break;
case 0x2167:
bufpush(0x2177);
break;
case 0x2168:
bufpush(0x2178);
break;
case 0x2169:
bufpush(0x2179);
break;
case 0x216A:
bufpush(0x217A);
break;
case 0x216B:
bufpush(0x217B);
break;
case 0x216C:
bufpush(0x217C);
break;
case 0x216D:
bufpush(0x217D);
break;
case 0x216E:
bufpush(0x217E);
break;
case 0x216F:
bufpush(0x217F);
break;
case 0x2183:
bufpush(0x2184);
break;
case 0x24B6:
bufpush(0x24D0);
break;
case 0x24B7:
bufpush(0x24D1);
break;
case 0x24B8:
bufpush(0x24D2);
break;
case 0x24B9:
bufpush(0x24D3);
break;
case 0x24BA:
bufpush(0x24D4);
break;
case 0x24BB:
bufpush(0x24D5);
break;
case 0x24BC:
bufpush(0x24D6);
break;
case 0x24BD:
bufpush(0x24D7);
break;
case 0x24BE:
bufpush(0x24D8);
break;
case 0x24BF:
bufpush(0x24D9);
break;
case 0x24C0:
bufpush(0x24DA);
break;
case 0x24C1:
bufpush(0x24DB);
break;
case 0x24C2:
bufpush(0x24DC);
break;
case 0x24C3:
bufpush(0x24DD);
break;
case 0x24C4:
bufpush(0x24DE);
break;
case 0x24C5:
bufpush(0x24DF);
break;
case 0x24C6:
bufpush(0x24E0);
break;
case 0x24C7:
bufpush(0x24E1);
break;
case 0x24C8:
bufpush(0x24E2);
break;
case 0x24C9:
bufpush(0x24E3);
break;
case 0x24CA:
bufpush(0x24E4);
break;
case 0x24CB:
bufpush(0x24E5);
break;
case 0x24CC:
bufpush(0x24E6);
break;
case 0x24CD:
bufpush(0x24E7);
break;
case 0x24CE:
bufpush(0x24E8);
break;
case 0x24CF:
bufpush(0x24E9);
break;
case 0x2C00:
bufpush(0x2C30);
break;
case 0x2C01:
bufpush(0x2C31);
break;
case 0x2C02:
bufpush(0x2C32);
break;
case 0x2C03:
bufpush(0x2C33);
break;
case 0x2C04:
bufpush(0x2C34);
break;
case 0x2C05:
bufpush(0x2C35);
break;
case 0x2C06:
bufpush(0x2C36);
break;
case 0x2C07:
bufpush(0x2C37);
break;
case 0x2C08:
bufpush(0x2C38);
break;
case 0x2C09:
bufpush(0x2C39);
break;
case 0x2C0A:
bufpush(0x2C3A);
break;
case 0x2C0B:
bufpush(0x2C3B);
break;
case 0x2C0C:
bufpush(0x2C3C);
break;
case 0x2C0D:
bufpush(0x2C3D);
break;
case 0x2C0E:
bufpush(0x2C3E);
break;
case 0x2C0F:
bufpush(0x2C3F);
break;
case 0x2C10:
bufpush(0x2C40);
break;
case 0x2C11:
bufpush(0x2C41);
break;
case 0x2C12:
bufpush(0x2C42);
break;
case 0x2C13:
bufpush(0x2C43);
break;
case 0x2C14:
bufpush(0x2C44);
break;
case 0x2C15:
bufpush(0x2C45);
break;
case 0x2C16:
bufpush(0x2C46);
break;
case 0x2C17:
bufpush(0x2C47);
break;
case 0x2C18:
bufpush(0x2C48);
break;
case 0x2C19:
bufpush(0x2C49);
break;
case 0x2C1A:
bufpush(0x2C4A);
break;
case 0x2C1B:
bufpush(0x2C4B);
break;
case 0x2C1C:
bufpush(0x2C4C);
break;
case 0x2C1D:
bufpush(0x2C4D);
break;
case 0x2C1E:
bufpush(0x2C4E);
break;
case 0x2C1F:
bufpush(0x2C4F);
break;
case 0x2C20:
bufpush(0x2C50);
break;
case 0x2C21:
bufpush(0x2C51);
break;
case 0x2C22:
bufpush(0x2C52);
break;
case 0x2C23:
bufpush(0x2C53);
break;
case 0x2C24:
bufpush(0x2C54);
break;
case 0x2C25:
bufpush(0x2C55);
break;
case 0x2C26:
bufpush(0x2C56);
break;
case 0x2C27:
bufpush(0x2C57);
break;
case 0x2C28:
bufpush(0x2C58);
break;
case 0x2C29:
bufpush(0x2C59);
break;
case 0x2C2A:
bufpush(0x2C5A);
break;
case 0x2C2B:
bufpush(0x2C5B);
break;
case 0x2C2C:
bufpush(0x2C5C);
break;
case 0x2C2D:
bufpush(0x2C5D);
break;
case 0x2C2E:
bufpush(0x2C5E);
break;
case 0x2C60:
bufpush(0x2C61);
break;
case 0x2C62:
bufpush(0x026B);
break;
case 0x2C63:
bufpush(0x1D7D);
break;
case 0x2C64:
bufpush(0x027D);
break;
case 0x2C67:
bufpush(0x2C68);
break;
case 0x2C69:
bufpush(0x2C6A);
break;
case 0x2C6B:
bufpush(0x2C6C);
break;
case 0x2C6D:
bufpush(0x0251);
break;
case 0x2C6E:
bufpush(0x0271);
break;
case 0x2C6F:
bufpush(0x0250);
break;
case 0x2C70:
bufpush(0x0252);
break;
case 0x2C72:
bufpush(0x2C73);
break;
case 0x2C75:
bufpush(0x2C76);
break;
case 0x2C7E:
bufpush(0x023F);
break;
case 0x2C7F:
bufpush(0x0240);
break;
case 0x2C80:
bufpush(0x2C81);
break;
case 0x2C82:
bufpush(0x2C83);
break;
case 0x2C84:
bufpush(0x2C85);
break;
case 0x2C86:
bufpush(0x2C87);
break;
case 0x2C88:
bufpush(0x2C89);
break;
case 0x2C8A:
bufpush(0x2C8B);
break;
case 0x2C8C:
bufpush(0x2C8D);
break;
case 0x2C8E:
bufpush(0x2C8F);
break;
case 0x2C90:
bufpush(0x2C91);
break;
case 0x2C92:
bufpush(0x2C93);
break;
case 0x2C94:
bufpush(0x2C95);
break;
case 0x2C96:
bufpush(0x2C97);
break;
case 0x2C98:
bufpush(0x2C99);
break;
case 0x2C9A:
bufpush(0x2C9B);
break;
case 0x2C9C:
bufpush(0x2C9D);
break;
case 0x2C9E:
bufpush(0x2C9F);
break;
case 0x2CA0:
bufpush(0x2CA1);
break;
case 0x2CA2:
bufpush(0x2CA3);
break;
case 0x2CA4:
bufpush(0x2CA5);
break;
case 0x2CA6:
bufpush(0x2CA7);
break;
case 0x2CA8:
bufpush(0x2CA9);
break;
case 0x2CAA:
bufpush(0x2CAB);
break;
case 0x2CAC:
bufpush(0x2CAD);
break;
case 0x2CAE:
bufpush(0x2CAF);
break;
case 0x2CB0:
bufpush(0x2CB1);
break;
case 0x2CB2:
bufpush(0x2CB3);
break;
case 0x2CB4:
bufpush(0x2CB5);
break;
case 0x2CB6:
bufpush(0x2CB7);
break;
case 0x2CB8:
bufpush(0x2CB9);
break;
case 0x2CBA:
bufpush(0x2CBB);
break;
case 0x2CBC:
bufpush(0x2CBD);
break;
case 0x2CBE:
bufpush(0x2CBF);
break;
case 0x2CC0:
bufpush(0x2CC1);
break;
case 0x2CC2:
bufpush(0x2CC3);
break;
case 0x2CC4:
bufpush(0x2CC5);
break;
case 0x2CC6:
bufpush(0x2CC7);
break;
case 0x2CC8:
bufpush(0x2CC9);
break;
case 0x2CCA:
bufpush(0x2CCB);
break;
case 0x2CCC:
bufpush(0x2CCD);
break;
case 0x2CCE:
bufpush(0x2CCF);
break;
case 0x2CD0:
bufpush(0x2CD1);
break;
case 0x2CD2:
bufpush(0x2CD3);
break;
case 0x2CD4:
bufpush(0x2CD5);
break;
case 0x2CD6:
bufpush(0x2CD7);
break;
case 0x2CD8:
bufpush(0x2CD9);
break;
case 0x2CDA:
bufpush(0x2CDB);
break;
case 0x2CDC:
bufpush(0x2CDD);
break;
case 0x2CDE:
bufpush(0x2CDF);
break;
case 0x2CE0:
bufpush(0x2CE1);
break;
case 0x2CE2:
bufpush(0x2CE3);
break;
case 0x2CEB:
bufpush(0x2CEC);
break;
case 0x2CED:
bufpush(0x2CEE);
break;
case 0x2CF2:
bufpush(0x2CF3);
break;
case 0xA640:
bufpush(0xA641);
break;
case 0xA642:
bufpush(0xA643);
break;
case 0xA644:
bufpush(0xA645);
break;
case 0xA646:
bufpush(0xA647);
break;
case 0xA648:
bufpush(0xA649);
break;
case 0xA64A:
bufpush(0xA64B);
break;
case 0xA64C:
bufpush(0xA64D);
break;
case 0xA64E:
bufpush(0xA64F);
break;
case 0xA650:
bufpush(0xA651);
break;
case 0xA652:
bufpush(0xA653);
break;
case 0xA654:
bufpush(0xA655);
break;
case 0xA656:
bufpush(0xA657);
break;
case 0xA658:
bufpush(0xA659);
break;
case 0xA65A:
bufpush(0xA65B);
break;
case 0xA65C:
bufpush(0xA65D);
break;
case 0xA65E:
bufpush(0xA65F);
break;
case 0xA660:
bufpush(0xA661);
break;
case 0xA662:
bufpush(0xA663);
break;
case 0xA664:
bufpush(0xA665);
break;
case 0xA666:
bufpush(0xA667);
break;
case 0xA668:
bufpush(0xA669);
break;
case 0xA66A:
bufpush(0xA66B);
break;
case 0xA66C:
bufpush(0xA66D);
break;
case 0xA680:
bufpush(0xA681);
break;
case 0xA682:
bufpush(0xA683);
break;
case 0xA684:
bufpush(0xA685);
break;
case 0xA686:
bufpush(0xA687);
break;
case 0xA688:
bufpush(0xA689);
break;
case 0xA68A:
bufpush(0xA68B);
break;
case 0xA68C:
bufpush(0xA68D);
break;
case 0xA68E:
bufpush(0xA68F);
break;
case 0xA690:
bufpush(0xA691);
break;
case 0xA692:
bufpush(0xA693);
break;
case 0xA694:
bufpush(0xA695);
break;
case 0xA696:
bufpush(0xA697);
break;
case 0xA698:
bufpush(0xA699);
break;
case 0xA69A:
bufpush(0xA69B);
break;
case 0xA722:
bufpush(0xA723);
break;
case 0xA724:
bufpush(0xA725);
break;
case 0xA726:
bufpush(0xA727);
break;
case 0xA728:
bufpush(0xA729);
break;
case 0xA72A:
bufpush(0xA72B);
break;
case 0xA72C:
bufpush(0xA72D);
break;
case 0xA72E:
bufpush(0xA72F);
break;
case 0xA732:
bufpush(0xA733);
break;
case 0xA734:
bufpush(0xA735);
break;
case 0xA736:
bufpush(0xA737);
break;
case 0xA738:
bufpush(0xA739);
break;
case 0xA73A:
bufpush(0xA73B);
break;
case 0xA73C:
bufpush(0xA73D);
break;
case 0xA73E:
bufpush(0xA73F);
break;
case 0xA740:
bufpush(0xA741);
break;
case 0xA742:
bufpush(0xA743);
break;
case 0xA744:
bufpush(0xA745);
break;
case 0xA746:
bufpush(0xA747);
break;
case 0xA748:
bufpush(0xA749);
break;
case 0xA74A:
bufpush(0xA74B);
break;
case 0xA74C:
bufpush(0xA74D);
break;
case 0xA74E:
bufpush(0xA74F);
break;
case 0xA750:
bufpush(0xA751);
break;
case 0xA752:
bufpush(0xA753);
break;
case 0xA754:
bufpush(0xA755);
break;
case 0xA756:
bufpush(0xA757);
break;
case 0xA758:
bufpush(0xA759);
break;
case 0xA75A:
bufpush(0xA75B);
break;
case 0xA75C:
bufpush(0xA75D);
break;
case 0xA75E:
bufpush(0xA75F);
break;
case 0xA760:
bufpush(0xA761);
break;
case 0xA762:
bufpush(0xA763);
break;
case 0xA764:
bufpush(0xA765);
break;
case 0xA766:
bufpush(0xA767);
break;
case 0xA768:
bufpush(0xA769);
break;
case 0xA76A:
bufpush(0xA76B);
break;
case 0xA76C:
bufpush(0xA76D);
break;
case 0xA76E:
bufpush(0xA76F);
break;
case 0xA779:
bufpush(0xA77A);
break;
case 0xA77B:
bufpush(0xA77C);
break;
case 0xA77D:
bufpush(0x1D79);
break;
case 0xA77E:
bufpush(0xA77F);
break;
case 0xA780:
bufpush(0xA781);
break;
case 0xA782:
bufpush(0xA783);
break;
case 0xA784:
bufpush(0xA785);
break;
case 0xA786:
bufpush(0xA787);
break;
case 0xA78B:
bufpush(0xA78C);
break;
case 0xA78D:
bufpush(0x0265);
break;
case 0xA790:
bufpush(0xA791);
break;
case 0xA792:
bufpush(0xA793);
break;
case 0xA796:
bufpush(0xA797);
break;
case 0xA798:
bufpush(0xA799);
break;
case 0xA79A:
bufpush(0xA79B);
break;
case 0xA79C:
bufpush(0xA79D);
break;
case 0xA79E:
bufpush(0xA79F);
break;
case 0xA7A0:
bufpush(0xA7A1);
break;
case 0xA7A2:
bufpush(0xA7A3);
break;
case 0xA7A4:
bufpush(0xA7A5);
break;
case 0xA7A6:
bufpush(0xA7A7);
break;
case 0xA7A8:
bufpush(0xA7A9);
break;
case 0xA7AA:
bufpush(0x0266);
break;
case 0xA7AB:
bufpush(0x025C);
break;
case 0xA7AC:
bufpush(0x0261);
break;
case 0xA7AD:
bufpush(0x026C);
break;
case 0xA7AE:
bufpush(0x026A);
break;
case 0xA7B0:
bufpush(0x029E);
break;
case 0xA7B1:
bufpush(0x0287);
break;
case 0xA7B2:
bufpush(0x029D);
break;
case 0xA7B3:
bufpush(0xAB53);
break;
case 0xA7B4:
bufpush(0xA7B5);
break;
case 0xA7B6:
bufpush(0xA7B7);
break;
case 0xAB70:
bufpush(0x13A0);
break;
case 0xAB71:
bufpush(0x13A1);
break;
case 0xAB72:
bufpush(0x13A2);
break;
case 0xAB73:
bufpush(0x13A3);
break;
case 0xAB74:
bufpush(0x13A4);
break;
case 0xAB75:
bufpush(0x13A5);
break;
case 0xAB76:
bufpush(0x13A6);
break;
case 0xAB77:
bufpush(0x13A7);
break;
case 0xAB78:
bufpush(0x13A8);
break;
case 0xAB79:
bufpush(0x13A9);
break;
case 0xAB7A:
bufpush(0x13AA);
break;
case 0xAB7B:
bufpush(0x13AB);
break;
case 0xAB7C:
bufpush(0x13AC);
break;
case 0xAB7D:
bufpush(0x13AD);
break;
case 0xAB7E:
bufpush(0x13AE);
break;
case 0xAB7F:
bufpush(0x13AF);
break;
case 0xAB80:
bufpush(0x13B0);
break;
case 0xAB81:
bufpush(0x13B1);
break;
case 0xAB82:
bufpush(0x13B2);
break;
case 0xAB83:
bufpush(0x13B3);
break;
case 0xAB84:
bufpush(0x13B4);
break;
case 0xAB85:
bufpush(0x13B5);
break;
case 0xAB86:
bufpush(0x13B6);
break;
case 0xAB87:
bufpush(0x13B7);
break;
case 0xAB88:
bufpush(0x13B8);
break;
case 0xAB89:
bufpush(0x13B9);
break;
case 0xAB8A:
bufpush(0x13BA);
break;
case 0xAB8B:
bufpush(0x13BB);
break;
case 0xAB8C:
bufpush(0x13BC);
break;
case 0xAB8D:
bufpush(0x13BD);
break;
case 0xAB8E:
bufpush(0x13BE);
break;
case 0xAB8F:
bufpush(0x13BF);
break;
case 0xAB90:
bufpush(0x13C0);
break;
case 0xAB91:
bufpush(0x13C1);
break;
case 0xAB92:
bufpush(0x13C2);
break;
case 0xAB93:
bufpush(0x13C3);
break;
case 0xAB94:
bufpush(0x13C4);
break;
case 0xAB95:
bufpush(0x13C5);
break;
case 0xAB96:
bufpush(0x13C6);
break;
case 0xAB97:
bufpush(0x13C7);
break;
case 0xAB98:
bufpush(0x13C8);
break;
case 0xAB99:
bufpush(0x13C9);
break;
case 0xAB9A:
bufpush(0x13CA);
break;
case 0xAB9B:
bufpush(0x13CB);
break;
case 0xAB9C:
bufpush(0x13CC);
break;
case 0xAB9D:
bufpush(0x13CD);
break;
case 0xAB9E:
bufpush(0x13CE);
break;
case 0xAB9F:
bufpush(0x13CF);
break;
case 0xABA0:
bufpush(0x13D0);
break;
case 0xABA1:
bufpush(0x13D1);
break;
case 0xABA2:
bufpush(0x13D2);
break;
case 0xABA3:
bufpush(0x13D3);
break;
case 0xABA4:
bufpush(0x13D4);
break;
case 0xABA5:
bufpush(0x13D5);
break;
case 0xABA6:
bufpush(0x13D6);
break;
case 0xABA7:
bufpush(0x13D7);
break;
case 0xABA8:
bufpush(0x13D8);
break;
case 0xABA9:
bufpush(0x13D9);
break;
case 0xABAA:
bufpush(0x13DA);
break;
case 0xABAB:
bufpush(0x13DB);
break;
case 0xABAC:
bufpush(0x13DC);
break;
case 0xABAD:
bufpush(0x13DD);
break;
case 0xABAE:
bufpush(0x13DE);
break;
case 0xABAF:
bufpush(0x13DF);
break;
case 0xABB0:
bufpush(0x13E0);
break;
case 0xABB1:
bufpush(0x13E1);
break;
case 0xABB2:
bufpush(0x13E2);
break;
case 0xABB3:
bufpush(0x13E3);
break;
case 0xABB4:
bufpush(0x13E4);
break;
case 0xABB5:
bufpush(0x13E5);
break;
case 0xABB6:
bufpush(0x13E6);
break;
case 0xABB7:
bufpush(0x13E7);
break;
case 0xABB8:
bufpush(0x13E8);
break;
case 0xABB9:
bufpush(0x13E9);
break;
case 0xABBA:
bufpush(0x13EA);
break;
case 0xABBB:
bufpush(0x13EB);
break;
case 0xABBC:
bufpush(0x13EC);
break;
case 0xABBD:
bufpush(0x13ED);
break;
case 0xABBE:
bufpush(0x13EE);
break;
case 0xABBF:
bufpush(0x13EF);
break;
case 0xFB00:
bufpush(0x0066);
bufpush(0x0066);
break;
case 0xFB01:
bufpush(0x0066);
bufpush(0x0069);
break;
case 0xFB02:
bufpush(0x0066);
bufpush(0x006C);
break;
case 0xFB03:
bufpush(0x0066);
bufpush(0x0066);
bufpush(0x0069);
break;
case 0xFB04:
bufpush(0x0066);
bufpush(0x0066);
bufpush(0x006C);
break;
case 0xFB05:
bufpush(0x0073);
bufpush(0x0074);
break;
case 0xFB06:
bufpush(0x0073);
bufpush(0x0074);
break;
case 0xFB13:
bufpush(0x0574);
bufpush(0x0576);
break;
case 0xFB14:
bufpush(0x0574);
bufpush(0x0565);
break;
case 0xFB15:
bufpush(0x0574);
bufpush(0x056B);
break;
case 0xFB16:
bufpush(0x057E);
bufpush(0x0576);
break;
case 0xFB17:
bufpush(0x0574);
bufpush(0x056D);
break;
case 0xFF21:
bufpush(0xFF41);
break;
case 0xFF22:
bufpush(0xFF42);
break;
case 0xFF23:
bufpush(0xFF43);
break;
case 0xFF24:
bufpush(0xFF44);
break;
case 0xFF25:
bufpush(0xFF45);
break;
case 0xFF26:
bufpush(0xFF46);
break;
case 0xFF27:
bufpush(0xFF47);
break;
case 0xFF28:
bufpush(0xFF48);
break;
case 0xFF29:
bufpush(0xFF49);
break;
case 0xFF2A:
bufpush(0xFF4A);
break;
case 0xFF2B:
bufpush(0xFF4B);
break;
case 0xFF2C:
bufpush(0xFF4C);
break;
case 0xFF2D:
bufpush(0xFF4D);
break;
case 0xFF2E:
bufpush(0xFF4E);
break;
case 0xFF2F:
bufpush(0xFF4F);
break;
case 0xFF30:
bufpush(0xFF50);
break;
case 0xFF31:
bufpush(0xFF51);
break;
case 0xFF32:
bufpush(0xFF52);
break;
case 0xFF33:
bufpush(0xFF53);
break;
case 0xFF34:
bufpush(0xFF54);
break;
case 0xFF35:
bufpush(0xFF55);
break;
case 0xFF36:
bufpush(0xFF56);
break;
case 0xFF37:
bufpush(0xFF57);
break;
case 0xFF38:
bufpush(0xFF58);
break;
case 0xFF39:
bufpush(0xFF59);
break;
case 0xFF3A:
bufpush(0xFF5A);
break;
case 0x10400:
bufpush(0x10428);
break;
case 0x10401:
bufpush(0x10429);
break;
case 0x10402:
bufpush(0x1042A);
break;
case 0x10403:
bufpush(0x1042B);
break;
case 0x10404:
bufpush(0x1042C);
break;
case 0x10405:
bufpush(0x1042D);
break;
case 0x10406:
bufpush(0x1042E);
break;
case 0x10407:
bufpush(0x1042F);
break;
case 0x10408:
bufpush(0x10430);
break;
case 0x10409:
bufpush(0x10431);
break;
case 0x1040A:
bufpush(0x10432);
break;
case 0x1040B:
bufpush(0x10433);
break;
case 0x1040C:
bufpush(0x10434);
break;
case 0x1040D:
bufpush(0x10435);
break;
case 0x1040E:
bufpush(0x10436);
break;
case 0x1040F:
bufpush(0x10437);
break;
case 0x10410:
bufpush(0x10438);
break;
case 0x10411:
bufpush(0x10439);
break;
case 0x10412:
bufpush(0x1043A);
break;
case 0x10413:
bufpush(0x1043B);
break;
case 0x10414:
bufpush(0x1043C);
break;
case 0x10415:
bufpush(0x1043D);
break;
case 0x10416:
bufpush(0x1043E);
break;
case 0x10417:
bufpush(0x1043F);
break;
case 0x10418:
bufpush(0x10440);
break;
case 0x10419:
bufpush(0x10441);
break;
case 0x1041A:
bufpush(0x10442);
break;
case 0x1041B:
bufpush(0x10443);
break;
case 0x1041C:
bufpush(0x10444);
break;
case 0x1041D:
bufpush(0x10445);
break;
case 0x1041E:
bufpush(0x10446);
break;
case 0x1041F:
bufpush(0x10447);
break;
case 0x10420:
bufpush(0x10448);
break;
case 0x10421:
bufpush(0x10449);
break;
case 0x10422:
bufpush(0x1044A);
break;
case 0x10423:
bufpush(0x1044B);
break;
case 0x10424:
bufpush(0x1044C);
break;
case 0x10425:
bufpush(0x1044D);
break;
case 0x10426:
bufpush(0x1044E);
break;
case 0x10427:
bufpush(0x1044F);
break;
case 0x104B0:
bufpush(0x104D8);
break;
case 0x104B1:
bufpush(0x104D9);
break;
case 0x104B2:
bufpush(0x104DA);
break;
case 0x104B3:
bufpush(0x104DB);
break;
case 0x104B4:
bufpush(0x104DC);
break;
case 0x104B5:
bufpush(0x104DD);
break;
case 0x104B6:
bufpush(0x104DE);
break;
case 0x104B7:
bufpush(0x104DF);
break;
case 0x104B8:
bufpush(0x104E0);
break;
case 0x104B9:
bufpush(0x104E1);
break;
case 0x104BA:
bufpush(0x104E2);
break;
case 0x104BB:
bufpush(0x104E3);
break;
case 0x104BC:
bufpush(0x104E4);
break;
case 0x104BD:
bufpush(0x104E5);
break;
case 0x104BE:
bufpush(0x104E6);
break;
case 0x104BF:
bufpush(0x104E7);
break;
case 0x104C0:
bufpush(0x104E8);
break;
case 0x104C1:
bufpush(0x104E9);
break;
case 0x104C2:
bufpush(0x104EA);
break;
case 0x104C3:
bufpush(0x104EB);
break;
case 0x104C4:
bufpush(0x104EC);
break;
case 0x104C5:
bufpush(0x104ED);
break;
case 0x104C6:
bufpush(0x104EE);
break;
case 0x104C7:
bufpush(0x104EF);
break;
case 0x104C8:
bufpush(0x104F0);
break;
case 0x104C9:
bufpush(0x104F1);
break;
case 0x104CA:
bufpush(0x104F2);
break;
case 0x104CB:
bufpush(0x104F3);
break;
case 0x104CC:
bufpush(0x104F4);
break;
case 0x104CD:
bufpush(0x104F5);
break;
case 0x104CE:
bufpush(0x104F6);
break;
case 0x104CF:
bufpush(0x104F7);
break;
case 0x104D0:
bufpush(0x104F8);
break;
case 0x104D1:
bufpush(0x104F9);
break;
case 0x104D2:
bufpush(0x104FA);
break;
case 0x104D3:
bufpush(0x104FB);
break;
case 0x10C80:
bufpush(0x10CC0);
break;
case 0x10C81:
bufpush(0x10CC1);
break;
case 0x10C82:
bufpush(0x10CC2);
break;
case 0x10C83:
bufpush(0x10CC3);
break;
case 0x10C84:
bufpush(0x10CC4);
break;
case 0x10C85:
bufpush(0x10CC5);
break;
case 0x10C86:
bufpush(0x10CC6);
break;
case 0x10C87:
bufpush(0x10CC7);
break;
case 0x10C88:
bufpush(0x10CC8);
break;
case 0x10C89:
bufpush(0x10CC9);
break;
case 0x10C8A:
bufpush(0x10CCA);
break;
case 0x10C8B:
bufpush(0x10CCB);
break;
case 0x10C8C:
bufpush(0x10CCC);
break;
case 0x10C8D:
bufpush(0x10CCD);
break;
case 0x10C8E:
bufpush(0x10CCE);
break;
case 0x10C8F:
bufpush(0x10CCF);
break;
case 0x10C90:
bufpush(0x10CD0);
break;
case 0x10C91:
bufpush(0x10CD1);
break;
case 0x10C92:
bufpush(0x10CD2);
break;
case 0x10C93:
bufpush(0x10CD3);
break;
case 0x10C94:
bufpush(0x10CD4);
break;
case 0x10C95:
bufpush(0x10CD5);
break;
case 0x10C96:
bufpush(0x10CD6);
break;
case 0x10C97:
bufpush(0x10CD7);
break;
case 0x10C98:
bufpush(0x10CD8);
break;
case 0x10C99:
bufpush(0x10CD9);
break;
case 0x10C9A:
bufpush(0x10CDA);
break;
case 0x10C9B:
bufpush(0x10CDB);
break;
case 0x10C9C:
bufpush(0x10CDC);
break;
case 0x10C9D:
bufpush(0x10CDD);
break;
case 0x10C9E:
bufpush(0x10CDE);
break;
case 0x10C9F:
bufpush(0x10CDF);
break;
case 0x10CA0:
bufpush(0x10CE0);
break;
case 0x10CA1:
bufpush(0x10CE1);
break;
case 0x10CA2:
bufpush(0x10CE2);
break;
case 0x10CA3:
bufpush(0x10CE3);
break;
case 0x10CA4:
bufpush(0x10CE4);
break;
case 0x10CA5:
bufpush(0x10CE5);
break;
case 0x10CA6:
bufpush(0x10CE6);
break;
case 0x10CA7:
bufpush(0x10CE7);
break;
case 0x10CA8:
bufpush(0x10CE8);
break;
case 0x10CA9:
bufpush(0x10CE9);
break;
case 0x10CAA:
bufpush(0x10CEA);
break;
case 0x10CAB:
bufpush(0x10CEB);
break;
case 0x10CAC:
bufpush(0x10CEC);
break;
case 0x10CAD:
bufpush(0x10CED);
break;
case 0x10CAE:
bufpush(0x10CEE);
break;
case 0x10CAF:
bufpush(0x10CEF);
break;
case 0x10CB0:
bufpush(0x10CF0);
break;
case 0x10CB1:
bufpush(0x10CF1);
break;
case 0x10CB2:
bufpush(0x10CF2);
break;
case 0x118A0:
bufpush(0x118C0);
break;
case 0x118A1:
bufpush(0x118C1);
break;
case 0x118A2:
bufpush(0x118C2);
break;
case 0x118A3:
bufpush(0x118C3);
break;
case 0x118A4:
bufpush(0x118C4);
break;
case 0x118A5:
bufpush(0x118C5);
break;
case 0x118A6:
bufpush(0x118C6);
break;
case 0x118A7:
bufpush(0x118C7);
break;
case 0x118A8:
bufpush(0x118C8);
break;
case 0x118A9:
bufpush(0x118C9);
break;
case 0x118AA:
bufpush(0x118CA);
break;
case 0x118AB:
bufpush(0x118CB);
break;
case 0x118AC:
bufpush(0x118CC);
break;
case 0x118AD:
bufpush(0x118CD);
break;
case 0x118AE:
bufpush(0x118CE);
break;
case 0x118AF:
bufpush(0x118CF);
break;
case 0x118B0:
bufpush(0x118D0);
break;
case 0x118B1:
bufpush(0x118D1);
break;
case 0x118B2:
bufpush(0x118D2);
break;
case 0x118B3:
bufpush(0x118D3);
break;
case 0x118B4:
bufpush(0x118D4);
break;
case 0x118B5:
bufpush(0x118D5);
break;
case 0x118B6:
bufpush(0x118D6);
break;
case 0x118B7:
bufpush(0x118D7);
break;
case 0x118B8:
bufpush(0x118D8);
break;
case 0x118B9:
bufpush(0x118D9);
break;
case 0x118BA:
bufpush(0x118DA);
break;
case 0x118BB:
bufpush(0x118DB);
break;
case 0x118BC:
bufpush(0x118DC);
break;
case 0x118BD:
bufpush(0x118DD);
break;
case 0x118BE:
bufpush(0x118DE);
break;
case 0x118BF:
bufpush(0x118DF);
break;
case 0x1E900:
bufpush(0x1E922);
break;
case 0x1E901:
bufpush(0x1E923);
break;
case 0x1E902:
bufpush(0x1E924);
break;
case 0x1E903:
bufpush(0x1E925);
break;
case 0x1E904:
bufpush(0x1E926);
break;
case 0x1E905:
bufpush(0x1E927);
break;
case 0x1E906:
bufpush(0x1E928);
break;
case 0x1E907:
bufpush(0x1E929);
break;
case 0x1E908:
bufpush(0x1E92A);
break;
case 0x1E909:
bufpush(0x1E92B);
break;
case 0x1E90A:
bufpush(0x1E92C);
break;
case 0x1E90B:
bufpush(0x1E92D);
break;
case 0x1E90C:
bufpush(0x1E92E);
break;
case 0x1E90D:
bufpush(0x1E92F);
break;
case 0x1E90E:
bufpush(0x1E930);
break;
case 0x1E90F:
bufpush(0x1E931);
break;
case 0x1E910:
bufpush(0x1E932);
break;
case 0x1E911:
bufpush(0x1E933);
break;
case 0x1E912:
bufpush(0x1E934);
break;
case 0x1E913:
bufpush(0x1E935);
break;
case 0x1E914:
bufpush(0x1E936);
break;
case 0x1E915:
bufpush(0x1E937);
break;
case 0x1E916:
bufpush(0x1E938);
break;
case 0x1E917:
bufpush(0x1E939);
break;
case 0x1E918:
bufpush(0x1E93A);
break;
case 0x1E919:
bufpush(0x1E93B);
break;
case 0x1E91A:
bufpush(0x1E93C);
break;
case 0x1E91B:
bufpush(0x1E93D);
break;
case 0x1E91C:
bufpush(0x1E93E);
break;
case 0x1E91D:
bufpush(0x1E93F);
break;
case 0x1E91E:
bufpush(0x1E940);
break;
case 0x1E91F:
bufpush(0x1E941);
break;
case 0x1E920:
bufpush(0x1E942);
break;
case 0x1E921:
bufpush(0x1E943);
break;
default:
bufpush(c);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/html.h | #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
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/cmark_ctype.h | #ifndef CMARK_CMARK_CTYPE_H
#define CMARK_CMARK_CTYPE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cmark-gfm_export.h"
/** Locale-independent versions of functions from ctype.h.
* We want cmark to behave the same no matter what the system locale.
*/
CMARK_GFM_EXPORT
int cmark_isspace(char c);
CMARK_GFM_EXPORT
int cmark_ispunct(char c);
CMARK_GFM_EXPORT
int cmark_isalnum(char c);
CMARK_GFM_EXPORT
int cmark_isdigit(char c);
CMARK_GFM_EXPORT
int cmark_isalpha(char c);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/houdini_href_e.c | #include <assert.h>
#include <stdio.h>
#include <string.h>
#include "houdini.h"
/*
* The following characters will not be escaped:
*
* -_.+!*'(),%#@?=;:/,+&$~ alphanum
*
* Note that this character set is the addition of:
*
* - The characters which are safe to be in an URL
* - The characters which are *not* safe to be in
* an URL because they are RESERVED characters.
*
* We assume (lazily) that any RESERVED char that
* appears inside an URL is actually meant to
* have its native function (i.e. as an URL
* component/separator) and hence needs no escaping.
*
* There are two exceptions: the chacters & (amp)
* and ' (single quote) do not appear in the table.
* They are meant to appear in the URL as components,
* yet they require special HTML-entity escaping
* to generate valid HTML markup.
*
* All other characters will be escaped to %XX.
*
*/
static const char HREF_SAFE[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) {
static const uint8_t hex_chars[] = "0123456789ABCDEF";
bufsize_t i = 0, org;
uint8_t hex_str[3];
hex_str[0] = '%';
while (i < size) {
org = i;
while (i < size && HREF_SAFE[src[i]] != 0)
i++;
if (likely(i > org))
cmark_strbuf_put(ob, src + org, i - org);
/* escaping */
if (i >= size)
break;
switch (src[i]) {
/* amp appears all the time in URLs, but needs
* HTML-entity escaping to be inside an href */
case '&':
cmark_strbuf_puts(ob, "&");
break;
/* the single quote is a valid URL character
* according to the standard; it needs HTML
* entity escaping too */
case '\'':
cmark_strbuf_puts(ob, "'");
break;
/* the space can be escaped to %20 or a plus
* sign. we're going with the generic escape
* for now. the plus thing is more commonly seen
* when building GET strings */
#if 0
case ' ':
cmark_strbuf_putc(ob, '+');
break;
#endif
/* every other character goes with a %XX escaping */
default:
hex_str[1] = hex_chars[(src[i] >> 4) & 0xF];
hex_str[2] = hex_chars[src[i] & 0xF];
cmark_strbuf_put(ob, hex_str, 3);
}
i++;
}
return 1;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/src/entities.inc | /* Autogenerated by tools/make_headers_inc.py */
struct cmark_entity_node {
unsigned char *entity;
unsigned char bytes[8];
};
#define CMARK_ENTITY_MIN_LENGTH 2
#define CMARK_ENTITY_MAX_LENGTH 32
#define CMARK_NUM_ENTITIES 2125
static const struct cmark_entity_node cmark_entities[] = {
{(unsigned char*)"AElig", {195, 134, 0}},
{(unsigned char*)"AMP", {38, 0}},
{(unsigned char*)"Aacute", {195, 129, 0}},
{(unsigned char*)"Abreve", {196, 130, 0}},
{(unsigned char*)"Acirc", {195, 130, 0}},
{(unsigned char*)"Acy", {208, 144, 0}},
{(unsigned char*)"Afr", {240, 157, 148, 132, 0}},
{(unsigned char*)"Agrave", {195, 128, 0}},
{(unsigned char*)"Alpha", {206, 145, 0}},
{(unsigned char*)"Amacr", {196, 128, 0}},
{(unsigned char*)"And", {226, 169, 147, 0}},
{(unsigned char*)"Aogon", {196, 132, 0}},
{(unsigned char*)"Aopf", {240, 157, 148, 184, 0}},
{(unsigned char*)"ApplyFunction", {226, 129, 161, 0}},
{(unsigned char*)"Aring", {195, 133, 0}},
{(unsigned char*)"Ascr", {240, 157, 146, 156, 0}},
{(unsigned char*)"Assign", {226, 137, 148, 0}},
{(unsigned char*)"Atilde", {195, 131, 0}},
{(unsigned char*)"Auml", {195, 132, 0}},
{(unsigned char*)"Backslash", {226, 136, 150, 0}},
{(unsigned char*)"Barv", {226, 171, 167, 0}},
{(unsigned char*)"Barwed", {226, 140, 134, 0}},
{(unsigned char*)"Bcy", {208, 145, 0}},
{(unsigned char*)"Because", {226, 136, 181, 0}},
{(unsigned char*)"Bernoullis", {226, 132, 172, 0}},
{(unsigned char*)"Beta", {206, 146, 0}},
{(unsigned char*)"Bfr", {240, 157, 148, 133, 0}},
{(unsigned char*)"Bopf", {240, 157, 148, 185, 0}},
{(unsigned char*)"Breve", {203, 152, 0}},
{(unsigned char*)"Bscr", {226, 132, 172, 0}},
{(unsigned char*)"Bumpeq", {226, 137, 142, 0}},
{(unsigned char*)"CHcy", {208, 167, 0}},
{(unsigned char*)"COPY", {194, 169, 0}},
{(unsigned char*)"Cacute", {196, 134, 0}},
{(unsigned char*)"Cap", {226, 139, 146, 0}},
{(unsigned char*)"CapitalDifferentialD", {226, 133, 133, 0}},
{(unsigned char*)"Cayleys", {226, 132, 173, 0}},
{(unsigned char*)"Ccaron", {196, 140, 0}},
{(unsigned char*)"Ccedil", {195, 135, 0}},
{(unsigned char*)"Ccirc", {196, 136, 0}},
{(unsigned char*)"Cconint", {226, 136, 176, 0}},
{(unsigned char*)"Cdot", {196, 138, 0}},
{(unsigned char*)"Cedilla", {194, 184, 0}},
{(unsigned char*)"CenterDot", {194, 183, 0}},
{(unsigned char*)"Cfr", {226, 132, 173, 0}},
{(unsigned char*)"Chi", {206, 167, 0}},
{(unsigned char*)"CircleDot", {226, 138, 153, 0}},
{(unsigned char*)"CircleMinus", {226, 138, 150, 0}},
{(unsigned char*)"CirclePlus", {226, 138, 149, 0}},
{(unsigned char*)"CircleTimes", {226, 138, 151, 0}},
{(unsigned char*)"ClockwiseContourIntegral", {226, 136, 178, 0}},
{(unsigned char*)"CloseCurlyDoubleQuote", {226, 128, 157, 0}},
{(unsigned char*)"CloseCurlyQuote", {226, 128, 153, 0}},
{(unsigned char*)"Colon", {226, 136, 183, 0}},
{(unsigned char*)"Colone", {226, 169, 180, 0}},
{(unsigned char*)"Congruent", {226, 137, 161, 0}},
{(unsigned char*)"Conint", {226, 136, 175, 0}},
{(unsigned char*)"ContourIntegral", {226, 136, 174, 0}},
{(unsigned char*)"Copf", {226, 132, 130, 0}},
{(unsigned char*)"Coproduct", {226, 136, 144, 0}},
{(unsigned char*)"CounterClockwiseContourIntegral", {226, 136, 179, 0}},
{(unsigned char*)"Cross", {226, 168, 175, 0}},
{(unsigned char*)"Cscr", {240, 157, 146, 158, 0}},
{(unsigned char*)"Cup", {226, 139, 147, 0}},
{(unsigned char*)"CupCap", {226, 137, 141, 0}},
{(unsigned char*)"DD", {226, 133, 133, 0}},
{(unsigned char*)"DDotrahd", {226, 164, 145, 0}},
{(unsigned char*)"DJcy", {208, 130, 0}},
{(unsigned char*)"DScy", {208, 133, 0}},
{(unsigned char*)"DZcy", {208, 143, 0}},
{(unsigned char*)"Dagger", {226, 128, 161, 0}},
{(unsigned char*)"Darr", {226, 134, 161, 0}},
{(unsigned char*)"Dashv", {226, 171, 164, 0}},
{(unsigned char*)"Dcaron", {196, 142, 0}},
{(unsigned char*)"Dcy", {208, 148, 0}},
{(unsigned char*)"Del", {226, 136, 135, 0}},
{(unsigned char*)"Delta", {206, 148, 0}},
{(unsigned char*)"Dfr", {240, 157, 148, 135, 0}},
{(unsigned char*)"DiacriticalAcute", {194, 180, 0}},
{(unsigned char*)"DiacriticalDot", {203, 153, 0}},
{(unsigned char*)"DiacriticalDoubleAcute", {203, 157, 0}},
{(unsigned char*)"DiacriticalGrave", {96, 0}},
{(unsigned char*)"DiacriticalTilde", {203, 156, 0}},
{(unsigned char*)"Diamond", {226, 139, 132, 0}},
{(unsigned char*)"DifferentialD", {226, 133, 134, 0}},
{(unsigned char*)"Dopf", {240, 157, 148, 187, 0}},
{(unsigned char*)"Dot", {194, 168, 0}},
{(unsigned char*)"DotDot", {226, 131, 156, 0}},
{(unsigned char*)"DotEqual", {226, 137, 144, 0}},
{(unsigned char*)"DoubleContourIntegral", {226, 136, 175, 0}},
{(unsigned char*)"DoubleDot", {194, 168, 0}},
{(unsigned char*)"DoubleDownArrow", {226, 135, 147, 0}},
{(unsigned char*)"DoubleLeftArrow", {226, 135, 144, 0}},
{(unsigned char*)"DoubleLeftRightArrow", {226, 135, 148, 0}},
{(unsigned char*)"DoubleLeftTee", {226, 171, 164, 0}},
{(unsigned char*)"DoubleLongLeftArrow", {226, 159, 184, 0}},
{(unsigned char*)"DoubleLongLeftRightArrow", {226, 159, 186, 0}},
{(unsigned char*)"DoubleLongRightArrow", {226, 159, 185, 0}},
{(unsigned char*)"DoubleRightArrow", {226, 135, 146, 0}},
{(unsigned char*)"DoubleRightTee", {226, 138, 168, 0}},
{(unsigned char*)"DoubleUpArrow", {226, 135, 145, 0}},
{(unsigned char*)"DoubleUpDownArrow", {226, 135, 149, 0}},
{(unsigned char*)"DoubleVerticalBar", {226, 136, 165, 0}},
{(unsigned char*)"DownArrow", {226, 134, 147, 0}},
{(unsigned char*)"DownArrowBar", {226, 164, 147, 0}},
{(unsigned char*)"DownArrowUpArrow", {226, 135, 181, 0}},
{(unsigned char*)"DownBreve", {204, 145, 0}},
{(unsigned char*)"DownLeftRightVector", {226, 165, 144, 0}},
{(unsigned char*)"DownLeftTeeVector", {226, 165, 158, 0}},
{(unsigned char*)"DownLeftVector", {226, 134, 189, 0}},
{(unsigned char*)"DownLeftVectorBar", {226, 165, 150, 0}},
{(unsigned char*)"DownRightTeeVector", {226, 165, 159, 0}},
{(unsigned char*)"DownRightVector", {226, 135, 129, 0}},
{(unsigned char*)"DownRightVectorBar", {226, 165, 151, 0}},
{(unsigned char*)"DownTee", {226, 138, 164, 0}},
{(unsigned char*)"DownTeeArrow", {226, 134, 167, 0}},
{(unsigned char*)"Downarrow", {226, 135, 147, 0}},
{(unsigned char*)"Dscr", {240, 157, 146, 159, 0}},
{(unsigned char*)"Dstrok", {196, 144, 0}},
{(unsigned char*)"ENG", {197, 138, 0}},
{(unsigned char*)"ETH", {195, 144, 0}},
{(unsigned char*)"Eacute", {195, 137, 0}},
{(unsigned char*)"Ecaron", {196, 154, 0}},
{(unsigned char*)"Ecirc", {195, 138, 0}},
{(unsigned char*)"Ecy", {208, 173, 0}},
{(unsigned char*)"Edot", {196, 150, 0}},
{(unsigned char*)"Efr", {240, 157, 148, 136, 0}},
{(unsigned char*)"Egrave", {195, 136, 0}},
{(unsigned char*)"Element", {226, 136, 136, 0}},
{(unsigned char*)"Emacr", {196, 146, 0}},
{(unsigned char*)"EmptySmallSquare", {226, 151, 187, 0}},
{(unsigned char*)"EmptyVerySmallSquare", {226, 150, 171, 0}},
{(unsigned char*)"Eogon", {196, 152, 0}},
{(unsigned char*)"Eopf", {240, 157, 148, 188, 0}},
{(unsigned char*)"Epsilon", {206, 149, 0}},
{(unsigned char*)"Equal", {226, 169, 181, 0}},
{(unsigned char*)"EqualTilde", {226, 137, 130, 0}},
{(unsigned char*)"Equilibrium", {226, 135, 140, 0}},
{(unsigned char*)"Escr", {226, 132, 176, 0}},
{(unsigned char*)"Esim", {226, 169, 179, 0}},
{(unsigned char*)"Eta", {206, 151, 0}},
{(unsigned char*)"Euml", {195, 139, 0}},
{(unsigned char*)"Exists", {226, 136, 131, 0}},
{(unsigned char*)"ExponentialE", {226, 133, 135, 0}},
{(unsigned char*)"Fcy", {208, 164, 0}},
{(unsigned char*)"Ffr", {240, 157, 148, 137, 0}},
{(unsigned char*)"FilledSmallSquare", {226, 151, 188, 0}},
{(unsigned char*)"FilledVerySmallSquare", {226, 150, 170, 0}},
{(unsigned char*)"Fopf", {240, 157, 148, 189, 0}},
{(unsigned char*)"ForAll", {226, 136, 128, 0}},
{(unsigned char*)"Fouriertrf", {226, 132, 177, 0}},
{(unsigned char*)"Fscr", {226, 132, 177, 0}},
{(unsigned char*)"GJcy", {208, 131, 0}},
{(unsigned char*)"GT", {62, 0}},
{(unsigned char*)"Gamma", {206, 147, 0}},
{(unsigned char*)"Gammad", {207, 156, 0}},
{(unsigned char*)"Gbreve", {196, 158, 0}},
{(unsigned char*)"Gcedil", {196, 162, 0}},
{(unsigned char*)"Gcirc", {196, 156, 0}},
{(unsigned char*)"Gcy", {208, 147, 0}},
{(unsigned char*)"Gdot", {196, 160, 0}},
{(unsigned char*)"Gfr", {240, 157, 148, 138, 0}},
{(unsigned char*)"Gg", {226, 139, 153, 0}},
{(unsigned char*)"Gopf", {240, 157, 148, 190, 0}},
{(unsigned char*)"GreaterEqual", {226, 137, 165, 0}},
{(unsigned char*)"GreaterEqualLess", {226, 139, 155, 0}},
{(unsigned char*)"GreaterFullEqual", {226, 137, 167, 0}},
{(unsigned char*)"GreaterGreater", {226, 170, 162, 0}},
{(unsigned char*)"GreaterLess", {226, 137, 183, 0}},
{(unsigned char*)"GreaterSlantEqual", {226, 169, 190, 0}},
{(unsigned char*)"GreaterTilde", {226, 137, 179, 0}},
{(unsigned char*)"Gscr", {240, 157, 146, 162, 0}},
{(unsigned char*)"Gt", {226, 137, 171, 0}},
{(unsigned char*)"HARDcy", {208, 170, 0}},
{(unsigned char*)"Hacek", {203, 135, 0}},
{(unsigned char*)"Hat", {94, 0}},
{(unsigned char*)"Hcirc", {196, 164, 0}},
{(unsigned char*)"Hfr", {226, 132, 140, 0}},
{(unsigned char*)"HilbertSpace", {226, 132, 139, 0}},
{(unsigned char*)"Hopf", {226, 132, 141, 0}},
{(unsigned char*)"HorizontalLine", {226, 148, 128, 0}},
{(unsigned char*)"Hscr", {226, 132, 139, 0}},
{(unsigned char*)"Hstrok", {196, 166, 0}},
{(unsigned char*)"HumpDownHump", {226, 137, 142, 0}},
{(unsigned char*)"HumpEqual", {226, 137, 143, 0}},
{(unsigned char*)"IEcy", {208, 149, 0}},
{(unsigned char*)"IJlig", {196, 178, 0}},
{(unsigned char*)"IOcy", {208, 129, 0}},
{(unsigned char*)"Iacute", {195, 141, 0}},
{(unsigned char*)"Icirc", {195, 142, 0}},
{(unsigned char*)"Icy", {208, 152, 0}},
{(unsigned char*)"Idot", {196, 176, 0}},
{(unsigned char*)"Ifr", {226, 132, 145, 0}},
{(unsigned char*)"Igrave", {195, 140, 0}},
{(unsigned char*)"Im", {226, 132, 145, 0}},
{(unsigned char*)"Imacr", {196, 170, 0}},
{(unsigned char*)"ImaginaryI", {226, 133, 136, 0}},
{(unsigned char*)"Implies", {226, 135, 146, 0}},
{(unsigned char*)"Int", {226, 136, 172, 0}},
{(unsigned char*)"Integral", {226, 136, 171, 0}},
{(unsigned char*)"Intersection", {226, 139, 130, 0}},
{(unsigned char*)"InvisibleComma", {226, 129, 163, 0}},
{(unsigned char*)"InvisibleTimes", {226, 129, 162, 0}},
{(unsigned char*)"Iogon", {196, 174, 0}},
{(unsigned char*)"Iopf", {240, 157, 149, 128, 0}},
{(unsigned char*)"Iota", {206, 153, 0}},
{(unsigned char*)"Iscr", {226, 132, 144, 0}},
{(unsigned char*)"Itilde", {196, 168, 0}},
{(unsigned char*)"Iukcy", {208, 134, 0}},
{(unsigned char*)"Iuml", {195, 143, 0}},
{(unsigned char*)"Jcirc", {196, 180, 0}},
{(unsigned char*)"Jcy", {208, 153, 0}},
{(unsigned char*)"Jfr", {240, 157, 148, 141, 0}},
{(unsigned char*)"Jopf", {240, 157, 149, 129, 0}},
{(unsigned char*)"Jscr", {240, 157, 146, 165, 0}},
{(unsigned char*)"Jsercy", {208, 136, 0}},
{(unsigned char*)"Jukcy", {208, 132, 0}},
{(unsigned char*)"KHcy", {208, 165, 0}},
{(unsigned char*)"KJcy", {208, 140, 0}},
{(unsigned char*)"Kappa", {206, 154, 0}},
{(unsigned char*)"Kcedil", {196, 182, 0}},
{(unsigned char*)"Kcy", {208, 154, 0}},
{(unsigned char*)"Kfr", {240, 157, 148, 142, 0}},
{(unsigned char*)"Kopf", {240, 157, 149, 130, 0}},
{(unsigned char*)"Kscr", {240, 157, 146, 166, 0}},
{(unsigned char*)"LJcy", {208, 137, 0}},
{(unsigned char*)"LT", {60, 0}},
{(unsigned char*)"Lacute", {196, 185, 0}},
{(unsigned char*)"Lambda", {206, 155, 0}},
{(unsigned char*)"Lang", {226, 159, 170, 0}},
{(unsigned char*)"Laplacetrf", {226, 132, 146, 0}},
{(unsigned char*)"Larr", {226, 134, 158, 0}},
{(unsigned char*)"Lcaron", {196, 189, 0}},
{(unsigned char*)"Lcedil", {196, 187, 0}},
{(unsigned char*)"Lcy", {208, 155, 0}},
{(unsigned char*)"LeftAngleBracket", {226, 159, 168, 0}},
{(unsigned char*)"LeftArrow", {226, 134, 144, 0}},
{(unsigned char*)"LeftArrowBar", {226, 135, 164, 0}},
{(unsigned char*)"LeftArrowRightArrow", {226, 135, 134, 0}},
{(unsigned char*)"LeftCeiling", {226, 140, 136, 0}},
{(unsigned char*)"LeftDoubleBracket", {226, 159, 166, 0}},
{(unsigned char*)"LeftDownTeeVector", {226, 165, 161, 0}},
{(unsigned char*)"LeftDownVector", {226, 135, 131, 0}},
{(unsigned char*)"LeftDownVectorBar", {226, 165, 153, 0}},
{(unsigned char*)"LeftFloor", {226, 140, 138, 0}},
{(unsigned char*)"LeftRightArrow", {226, 134, 148, 0}},
{(unsigned char*)"LeftRightVector", {226, 165, 142, 0}},
{(unsigned char*)"LeftTee", {226, 138, 163, 0}},
{(unsigned char*)"LeftTeeArrow", {226, 134, 164, 0}},
{(unsigned char*)"LeftTeeVector", {226, 165, 154, 0}},
{(unsigned char*)"LeftTriangle", {226, 138, 178, 0}},
{(unsigned char*)"LeftTriangleBar", {226, 167, 143, 0}},
{(unsigned char*)"LeftTriangleEqual", {226, 138, 180, 0}},
{(unsigned char*)"LeftUpDownVector", {226, 165, 145, 0}},
{(unsigned char*)"LeftUpTeeVector", {226, 165, 160, 0}},
{(unsigned char*)"LeftUpVector", {226, 134, 191, 0}},
{(unsigned char*)"LeftUpVectorBar", {226, 165, 152, 0}},
{(unsigned char*)"LeftVector", {226, 134, 188, 0}},
{(unsigned char*)"LeftVectorBar", {226, 165, 146, 0}},
{(unsigned char*)"Leftarrow", {226, 135, 144, 0}},
{(unsigned char*)"Leftrightarrow", {226, 135, 148, 0}},
{(unsigned char*)"LessEqualGreater", {226, 139, 154, 0}},
{(unsigned char*)"LessFullEqual", {226, 137, 166, 0}},
{(unsigned char*)"LessGreater", {226, 137, 182, 0}},
{(unsigned char*)"LessLess", {226, 170, 161, 0}},
{(unsigned char*)"LessSlantEqual", {226, 169, 189, 0}},
{(unsigned char*)"LessTilde", {226, 137, 178, 0}},
{(unsigned char*)"Lfr", {240, 157, 148, 143, 0}},
{(unsigned char*)"Ll", {226, 139, 152, 0}},
{(unsigned char*)"Lleftarrow", {226, 135, 154, 0}},
{(unsigned char*)"Lmidot", {196, 191, 0}},
{(unsigned char*)"LongLeftArrow", {226, 159, 181, 0}},
{(unsigned char*)"LongLeftRightArrow", {226, 159, 183, 0}},
{(unsigned char*)"LongRightArrow", {226, 159, 182, 0}},
{(unsigned char*)"Longleftarrow", {226, 159, 184, 0}},
{(unsigned char*)"Longleftrightarrow", {226, 159, 186, 0}},
{(unsigned char*)"Longrightarrow", {226, 159, 185, 0}},
{(unsigned char*)"Lopf", {240, 157, 149, 131, 0}},
{(unsigned char*)"LowerLeftArrow", {226, 134, 153, 0}},
{(unsigned char*)"LowerRightArrow", {226, 134, 152, 0}},
{(unsigned char*)"Lscr", {226, 132, 146, 0}},
{(unsigned char*)"Lsh", {226, 134, 176, 0}},
{(unsigned char*)"Lstrok", {197, 129, 0}},
{(unsigned char*)"Lt", {226, 137, 170, 0}},
{(unsigned char*)"Map", {226, 164, 133, 0}},
{(unsigned char*)"Mcy", {208, 156, 0}},
{(unsigned char*)"MediumSpace", {226, 129, 159, 0}},
{(unsigned char*)"Mellintrf", {226, 132, 179, 0}},
{(unsigned char*)"Mfr", {240, 157, 148, 144, 0}},
{(unsigned char*)"MinusPlus", {226, 136, 147, 0}},
{(unsigned char*)"Mopf", {240, 157, 149, 132, 0}},
{(unsigned char*)"Mscr", {226, 132, 179, 0}},
{(unsigned char*)"Mu", {206, 156, 0}},
{(unsigned char*)"NJcy", {208, 138, 0}},
{(unsigned char*)"Nacute", {197, 131, 0}},
{(unsigned char*)"Ncaron", {197, 135, 0}},
{(unsigned char*)"Ncedil", {197, 133, 0}},
{(unsigned char*)"Ncy", {208, 157, 0}},
{(unsigned char*)"NegativeMediumSpace", {226, 128, 139, 0}},
{(unsigned char*)"NegativeThickSpace", {226, 128, 139, 0}},
{(unsigned char*)"NegativeThinSpace", {226, 128, 139, 0}},
{(unsigned char*)"NegativeVeryThinSpace", {226, 128, 139, 0}},
{(unsigned char*)"NestedGreaterGreater", {226, 137, 171, 0}},
{(unsigned char*)"NestedLessLess", {226, 137, 170, 0}},
{(unsigned char*)"NewLine", {10, 0}},
{(unsigned char*)"Nfr", {240, 157, 148, 145, 0}},
{(unsigned char*)"NoBreak", {226, 129, 160, 0}},
{(unsigned char*)"NonBreakingSpace", {194, 160, 0}},
{(unsigned char*)"Nopf", {226, 132, 149, 0}},
{(unsigned char*)"Not", {226, 171, 172, 0}},
{(unsigned char*)"NotCongruent", {226, 137, 162, 0}},
{(unsigned char*)"NotCupCap", {226, 137, 173, 0}},
{(unsigned char*)"NotDoubleVerticalBar", {226, 136, 166, 0}},
{(unsigned char*)"NotElement", {226, 136, 137, 0}},
{(unsigned char*)"NotEqual", {226, 137, 160, 0}},
{(unsigned char*)"NotEqualTilde", {226, 137, 130, 204, 184, 0}},
{(unsigned char*)"NotExists", {226, 136, 132, 0}},
{(unsigned char*)"NotGreater", {226, 137, 175, 0}},
{(unsigned char*)"NotGreaterEqual", {226, 137, 177, 0}},
{(unsigned char*)"NotGreaterFullEqual", {226, 137, 167, 204, 184, 0}},
{(unsigned char*)"NotGreaterGreater", {226, 137, 171, 204, 184, 0}},
{(unsigned char*)"NotGreaterLess", {226, 137, 185, 0}},
{(unsigned char*)"NotGreaterSlantEqual", {226, 169, 190, 204, 184, 0}},
{(unsigned char*)"NotGreaterTilde", {226, 137, 181, 0}},
{(unsigned char*)"NotHumpDownHump", {226, 137, 142, 204, 184, 0}},
{(unsigned char*)"NotHumpEqual", {226, 137, 143, 204, 184, 0}},
{(unsigned char*)"NotLeftTriangle", {226, 139, 170, 0}},
{(unsigned char*)"NotLeftTriangleBar", {226, 167, 143, 204, 184, 0}},
{(unsigned char*)"NotLeftTriangleEqual", {226, 139, 172, 0}},
{(unsigned char*)"NotLess", {226, 137, 174, 0}},
{(unsigned char*)"NotLessEqual", {226, 137, 176, 0}},
{(unsigned char*)"NotLessGreater", {226, 137, 184, 0}},
{(unsigned char*)"NotLessLess", {226, 137, 170, 204, 184, 0}},
{(unsigned char*)"NotLessSlantEqual", {226, 169, 189, 204, 184, 0}},
{(unsigned char*)"NotLessTilde", {226, 137, 180, 0}},
{(unsigned char*)"NotNestedGreaterGreater", {226, 170, 162, 204, 184, 0}},
{(unsigned char*)"NotNestedLessLess", {226, 170, 161, 204, 184, 0}},
{(unsigned char*)"NotPrecedes", {226, 138, 128, 0}},
{(unsigned char*)"NotPrecedesEqual", {226, 170, 175, 204, 184, 0}},
{(unsigned char*)"NotPrecedesSlantEqual", {226, 139, 160, 0}},
{(unsigned char*)"NotReverseElement", {226, 136, 140, 0}},
{(unsigned char*)"NotRightTriangle", {226, 139, 171, 0}},
{(unsigned char*)"NotRightTriangleBar", {226, 167, 144, 204, 184, 0}},
{(unsigned char*)"NotRightTriangleEqual", {226, 139, 173, 0}},
{(unsigned char*)"NotSquareSubset", {226, 138, 143, 204, 184, 0}},
{(unsigned char*)"NotSquareSubsetEqual", {226, 139, 162, 0}},
{(unsigned char*)"NotSquareSuperset", {226, 138, 144, 204, 184, 0}},
{(unsigned char*)"NotSquareSupersetEqual", {226, 139, 163, 0}},
{(unsigned char*)"NotSubset", {226, 138, 130, 226, 131, 146, 0}},
{(unsigned char*)"NotSubsetEqual", {226, 138, 136, 0}},
{(unsigned char*)"NotSucceeds", {226, 138, 129, 0}},
{(unsigned char*)"NotSucceedsEqual", {226, 170, 176, 204, 184, 0}},
{(unsigned char*)"NotSucceedsSlantEqual", {226, 139, 161, 0}},
{(unsigned char*)"NotSucceedsTilde", {226, 137, 191, 204, 184, 0}},
{(unsigned char*)"NotSuperset", {226, 138, 131, 226, 131, 146, 0}},
{(unsigned char*)"NotSupersetEqual", {226, 138, 137, 0}},
{(unsigned char*)"NotTilde", {226, 137, 129, 0}},
{(unsigned char*)"NotTildeEqual", {226, 137, 132, 0}},
{(unsigned char*)"NotTildeFullEqual", {226, 137, 135, 0}},
{(unsigned char*)"NotTildeTilde", {226, 137, 137, 0}},
{(unsigned char*)"NotVerticalBar", {226, 136, 164, 0}},
{(unsigned char*)"Nscr", {240, 157, 146, 169, 0}},
{(unsigned char*)"Ntilde", {195, 145, 0}},
{(unsigned char*)"Nu", {206, 157, 0}},
{(unsigned char*)"OElig", {197, 146, 0}},
{(unsigned char*)"Oacute", {195, 147, 0}},
{(unsigned char*)"Ocirc", {195, 148, 0}},
{(unsigned char*)"Ocy", {208, 158, 0}},
{(unsigned char*)"Odblac", {197, 144, 0}},
{(unsigned char*)"Ofr", {240, 157, 148, 146, 0}},
{(unsigned char*)"Ograve", {195, 146, 0}},
{(unsigned char*)"Omacr", {197, 140, 0}},
{(unsigned char*)"Omega", {206, 169, 0}},
{(unsigned char*)"Omicron", {206, 159, 0}},
{(unsigned char*)"Oopf", {240, 157, 149, 134, 0}},
{(unsigned char*)"OpenCurlyDoubleQuote", {226, 128, 156, 0}},
{(unsigned char*)"OpenCurlyQuote", {226, 128, 152, 0}},
{(unsigned char*)"Or", {226, 169, 148, 0}},
{(unsigned char*)"Oscr", {240, 157, 146, 170, 0}},
{(unsigned char*)"Oslash", {195, 152, 0}},
{(unsigned char*)"Otilde", {195, 149, 0}},
{(unsigned char*)"Otimes", {226, 168, 183, 0}},
{(unsigned char*)"Ouml", {195, 150, 0}},
{(unsigned char*)"OverBar", {226, 128, 190, 0}},
{(unsigned char*)"OverBrace", {226, 143, 158, 0}},
{(unsigned char*)"OverBracket", {226, 142, 180, 0}},
{(unsigned char*)"OverParenthesis", {226, 143, 156, 0}},
{(unsigned char*)"PartialD", {226, 136, 130, 0}},
{(unsigned char*)"Pcy", {208, 159, 0}},
{(unsigned char*)"Pfr", {240, 157, 148, 147, 0}},
{(unsigned char*)"Phi", {206, 166, 0}},
{(unsigned char*)"Pi", {206, 160, 0}},
{(unsigned char*)"PlusMinus", {194, 177, 0}},
{(unsigned char*)"Poincareplane", {226, 132, 140, 0}},
{(unsigned char*)"Popf", {226, 132, 153, 0}},
{(unsigned char*)"Pr", {226, 170, 187, 0}},
{(unsigned char*)"Precedes", {226, 137, 186, 0}},
{(unsigned char*)"PrecedesEqual", {226, 170, 175, 0}},
{(unsigned char*)"PrecedesSlantEqual", {226, 137, 188, 0}},
{(unsigned char*)"PrecedesTilde", {226, 137, 190, 0}},
{(unsigned char*)"Prime", {226, 128, 179, 0}},
{(unsigned char*)"Product", {226, 136, 143, 0}},
{(unsigned char*)"Proportion", {226, 136, 183, 0}},
{(unsigned char*)"Proportional", {226, 136, 157, 0}},
{(unsigned char*)"Pscr", {240, 157, 146, 171, 0}},
{(unsigned char*)"Psi", {206, 168, 0}},
{(unsigned char*)"QUOT", {34, 0}},
{(unsigned char*)"Qfr", {240, 157, 148, 148, 0}},
{(unsigned char*)"Qopf", {226, 132, 154, 0}},
{(unsigned char*)"Qscr", {240, 157, 146, 172, 0}},
{(unsigned char*)"RBarr", {226, 164, 144, 0}},
{(unsigned char*)"REG", {194, 174, 0}},
{(unsigned char*)"Racute", {197, 148, 0}},
{(unsigned char*)"Rang", {226, 159, 171, 0}},
{(unsigned char*)"Rarr", {226, 134, 160, 0}},
{(unsigned char*)"Rarrtl", {226, 164, 150, 0}},
{(unsigned char*)"Rcaron", {197, 152, 0}},
{(unsigned char*)"Rcedil", {197, 150, 0}},
{(unsigned char*)"Rcy", {208, 160, 0}},
{(unsigned char*)"Re", {226, 132, 156, 0}},
{(unsigned char*)"ReverseElement", {226, 136, 139, 0}},
{(unsigned char*)"ReverseEquilibrium", {226, 135, 139, 0}},
{(unsigned char*)"ReverseUpEquilibrium", {226, 165, 175, 0}},
{(unsigned char*)"Rfr", {226, 132, 156, 0}},
{(unsigned char*)"Rho", {206, 161, 0}},
{(unsigned char*)"RightAngleBracket", {226, 159, 169, 0}},
{(unsigned char*)"RightArrow", {226, 134, 146, 0}},
{(unsigned char*)"RightArrowBar", {226, 135, 165, 0}},
{(unsigned char*)"RightArrowLeftArrow", {226, 135, 132, 0}},
{(unsigned char*)"RightCeiling", {226, 140, 137, 0}},
{(unsigned char*)"RightDoubleBracket", {226, 159, 167, 0}},
{(unsigned char*)"RightDownTeeVector", {226, 165, 157, 0}},
{(unsigned char*)"RightDownVector", {226, 135, 130, 0}},
{(unsigned char*)"RightDownVectorBar", {226, 165, 149, 0}},
{(unsigned char*)"RightFloor", {226, 140, 139, 0}},
{(unsigned char*)"RightTee", {226, 138, 162, 0}},
{(unsigned char*)"RightTeeArrow", {226, 134, 166, 0}},
{(unsigned char*)"RightTeeVector", {226, 165, 155, 0}},
{(unsigned char*)"RightTriangle", {226, 138, 179, 0}},
{(unsigned char*)"RightTriangleBar", {226, 167, 144, 0}},
{(unsigned char*)"RightTriangleEqual", {226, 138, 181, 0}},
{(unsigned char*)"RightUpDownVector", {226, 165, 143, 0}},
{(unsigned char*)"RightUpTeeVector", {226, 165, 156, 0}},
{(unsigned char*)"RightUpVector", {226, 134, 190, 0}},
{(unsigned char*)"RightUpVectorBar", {226, 165, 148, 0}},
{(unsigned char*)"RightVector", {226, 135, 128, 0}},
{(unsigned char*)"RightVectorBar", {226, 165, 147, 0}},
{(unsigned char*)"Rightarrow", {226, 135, 146, 0}},
{(unsigned char*)"Ropf", {226, 132, 157, 0}},
{(unsigned char*)"RoundImplies", {226, 165, 176, 0}},
{(unsigned char*)"Rrightarrow", {226, 135, 155, 0}},
{(unsigned char*)"Rscr", {226, 132, 155, 0}},
{(unsigned char*)"Rsh", {226, 134, 177, 0}},
{(unsigned char*)"RuleDelayed", {226, 167, 180, 0}},
{(unsigned char*)"SHCHcy", {208, 169, 0}},
{(unsigned char*)"SHcy", {208, 168, 0}},
{(unsigned char*)"SOFTcy", {208, 172, 0}},
{(unsigned char*)"Sacute", {197, 154, 0}},
{(unsigned char*)"Sc", {226, 170, 188, 0}},
{(unsigned char*)"Scaron", {197, 160, 0}},
{(unsigned char*)"Scedil", {197, 158, 0}},
{(unsigned char*)"Scirc", {197, 156, 0}},
{(unsigned char*)"Scy", {208, 161, 0}},
{(unsigned char*)"Sfr", {240, 157, 148, 150, 0}},
{(unsigned char*)"ShortDownArrow", {226, 134, 147, 0}},
{(unsigned char*)"ShortLeftArrow", {226, 134, 144, 0}},
{(unsigned char*)"ShortRightArrow", {226, 134, 146, 0}},
{(unsigned char*)"ShortUpArrow", {226, 134, 145, 0}},
{(unsigned char*)"Sigma", {206, 163, 0}},
{(unsigned char*)"SmallCircle", {226, 136, 152, 0}},
{(unsigned char*)"Sopf", {240, 157, 149, 138, 0}},
{(unsigned char*)"Sqrt", {226, 136, 154, 0}},
{(unsigned char*)"Square", {226, 150, 161, 0}},
{(unsigned char*)"SquareIntersection", {226, 138, 147, 0}},
{(unsigned char*)"SquareSubset", {226, 138, 143, 0}},
{(unsigned char*)"SquareSubsetEqual", {226, 138, 145, 0}},
{(unsigned char*)"SquareSuperset", {226, 138, 144, 0}},
{(unsigned char*)"SquareSupersetEqual", {226, 138, 146, 0}},
{(unsigned char*)"SquareUnion", {226, 138, 148, 0}},
{(unsigned char*)"Sscr", {240, 157, 146, 174, 0}},
{(unsigned char*)"Star", {226, 139, 134, 0}},
{(unsigned char*)"Sub", {226, 139, 144, 0}},
{(unsigned char*)"Subset", {226, 139, 144, 0}},
{(unsigned char*)"SubsetEqual", {226, 138, 134, 0}},
{(unsigned char*)"Succeeds", {226, 137, 187, 0}},
{(unsigned char*)"SucceedsEqual", {226, 170, 176, 0}},
{(unsigned char*)"SucceedsSlantEqual", {226, 137, 189, 0}},
{(unsigned char*)"SucceedsTilde", {226, 137, 191, 0}},
{(unsigned char*)"SuchThat", {226, 136, 139, 0}},
{(unsigned char*)"Sum", {226, 136, 145, 0}},
{(unsigned char*)"Sup", {226, 139, 145, 0}},
{(unsigned char*)"Superset", {226, 138, 131, 0}},
{(unsigned char*)"SupersetEqual", {226, 138, 135, 0}},
{(unsigned char*)"Supset", {226, 139, 145, 0}},
{(unsigned char*)"THORN", {195, 158, 0}},
{(unsigned char*)"TRADE", {226, 132, 162, 0}},
{(unsigned char*)"TSHcy", {208, 139, 0}},
{(unsigned char*)"TScy", {208, 166, 0}},
{(unsigned char*)"Tab", {9, 0}},
{(unsigned char*)"Tau", {206, 164, 0}},
{(unsigned char*)"Tcaron", {197, 164, 0}},
{(unsigned char*)"Tcedil", {197, 162, 0}},
{(unsigned char*)"Tcy", {208, 162, 0}},
{(unsigned char*)"Tfr", {240, 157, 148, 151, 0}},
{(unsigned char*)"Therefore", {226, 136, 180, 0}},
{(unsigned char*)"Theta", {206, 152, 0}},
{(unsigned char*)"ThickSpace", {226, 129, 159, 226, 128, 138, 0}},
{(unsigned char*)"ThinSpace", {226, 128, 137, 0}},
{(unsigned char*)"Tilde", {226, 136, 188, 0}},
{(unsigned char*)"TildeEqual", {226, 137, 131, 0}},
{(unsigned char*)"TildeFullEqual", {226, 137, 133, 0}},
{(unsigned char*)"TildeTilde", {226, 137, 136, 0}},
{(unsigned char*)"Topf", {240, 157, 149, 139, 0}},
{(unsigned char*)"TripleDot", {226, 131, 155, 0}},
{(unsigned char*)"Tscr", {240, 157, 146, 175, 0}},
{(unsigned char*)"Tstrok", {197, 166, 0}},
{(unsigned char*)"Uacute", {195, 154, 0}},
{(unsigned char*)"Uarr", {226, 134, 159, 0}},
{(unsigned char*)"Uarrocir", {226, 165, 137, 0}},
{(unsigned char*)"Ubrcy", {208, 142, 0}},
{(unsigned char*)"Ubreve", {197, 172, 0}},
{(unsigned char*)"Ucirc", {195, 155, 0}},
{(unsigned char*)"Ucy", {208, 163, 0}},
{(unsigned char*)"Udblac", {197, 176, 0}},
{(unsigned char*)"Ufr", {240, 157, 148, 152, 0}},
{(unsigned char*)"Ugrave", {195, 153, 0}},
{(unsigned char*)"Umacr", {197, 170, 0}},
{(unsigned char*)"UnderBar", {95, 0}},
{(unsigned char*)"UnderBrace", {226, 143, 159, 0}},
{(unsigned char*)"UnderBracket", {226, 142, 181, 0}},
{(unsigned char*)"UnderParenthesis", {226, 143, 157, 0}},
{(unsigned char*)"Union", {226, 139, 131, 0}},
{(unsigned char*)"UnionPlus", {226, 138, 142, 0}},
{(unsigned char*)"Uogon", {197, 178, 0}},
{(unsigned char*)"Uopf", {240, 157, 149, 140, 0}},
{(unsigned char*)"UpArrow", {226, 134, 145, 0}},
{(unsigned char*)"UpArrowBar", {226, 164, 146, 0}},
{(unsigned char*)"UpArrowDownArrow", {226, 135, 133, 0}},
{(unsigned char*)"UpDownArrow", {226, 134, 149, 0}},
{(unsigned char*)"UpEquilibrium", {226, 165, 174, 0}},
{(unsigned char*)"UpTee", {226, 138, 165, 0}},
{(unsigned char*)"UpTeeArrow", {226, 134, 165, 0}},
{(unsigned char*)"Uparrow", {226, 135, 145, 0}},
{(unsigned char*)"Updownarrow", {226, 135, 149, 0}},
{(unsigned char*)"UpperLeftArrow", {226, 134, 150, 0}},
{(unsigned char*)"UpperRightArrow", {226, 134, 151, 0}},
{(unsigned char*)"Upsi", {207, 146, 0}},
{(unsigned char*)"Upsilon", {206, 165, 0}},
{(unsigned char*)"Uring", {197, 174, 0}},
{(unsigned char*)"Uscr", {240, 157, 146, 176, 0}},
{(unsigned char*)"Utilde", {197, 168, 0}},
{(unsigned char*)"Uuml", {195, 156, 0}},
{(unsigned char*)"VDash", {226, 138, 171, 0}},
{(unsigned char*)"Vbar", {226, 171, 171, 0}},
{(unsigned char*)"Vcy", {208, 146, 0}},
{(unsigned char*)"Vdash", {226, 138, 169, 0}},
{(unsigned char*)"Vdashl", {226, 171, 166, 0}},
{(unsigned char*)"Vee", {226, 139, 129, 0}},
{(unsigned char*)"Verbar", {226, 128, 150, 0}},
{(unsigned char*)"Vert", {226, 128, 150, 0}},
{(unsigned char*)"VerticalBar", {226, 136, 163, 0}},
{(unsigned char*)"VerticalLine", {124, 0}},
{(unsigned char*)"VerticalSeparator", {226, 157, 152, 0}},
{(unsigned char*)"VerticalTilde", {226, 137, 128, 0}},
{(unsigned char*)"VeryThinSpace", {226, 128, 138, 0}},
{(unsigned char*)"Vfr", {240, 157, 148, 153, 0}},
{(unsigned char*)"Vopf", {240, 157, 149, 141, 0}},
{(unsigned char*)"Vscr", {240, 157, 146, 177, 0}},
{(unsigned char*)"Vvdash", {226, 138, 170, 0}},
{(unsigned char*)"Wcirc", {197, 180, 0}},
{(unsigned char*)"Wedge", {226, 139, 128, 0}},
{(unsigned char*)"Wfr", {240, 157, 148, 154, 0}},
{(unsigned char*)"Wopf", {240, 157, 149, 142, 0}},
{(unsigned char*)"Wscr", {240, 157, 146, 178, 0}},
{(unsigned char*)"Xfr", {240, 157, 148, 155, 0}},
{(unsigned char*)"Xi", {206, 158, 0}},
{(unsigned char*)"Xopf", {240, 157, 149, 143, 0}},
{(unsigned char*)"Xscr", {240, 157, 146, 179, 0}},
{(unsigned char*)"YAcy", {208, 175, 0}},
{(unsigned char*)"YIcy", {208, 135, 0}},
{(unsigned char*)"YUcy", {208, 174, 0}},
{(unsigned char*)"Yacute", {195, 157, 0}},
{(unsigned char*)"Ycirc", {197, 182, 0}},
{(unsigned char*)"Ycy", {208, 171, 0}},
{(unsigned char*)"Yfr", {240, 157, 148, 156, 0}},
{(unsigned char*)"Yopf", {240, 157, 149, 144, 0}},
{(unsigned char*)"Yscr", {240, 157, 146, 180, 0}},
{(unsigned char*)"Yuml", {197, 184, 0}},
{(unsigned char*)"ZHcy", {208, 150, 0}},
{(unsigned char*)"Zacute", {197, 185, 0}},
{(unsigned char*)"Zcaron", {197, 189, 0}},
{(unsigned char*)"Zcy", {208, 151, 0}},
{(unsigned char*)"Zdot", {197, 187, 0}},
{(unsigned char*)"ZeroWidthSpace", {226, 128, 139, 0}},
{(unsigned char*)"Zeta", {206, 150, 0}},
{(unsigned char*)"Zfr", {226, 132, 168, 0}},
{(unsigned char*)"Zopf", {226, 132, 164, 0}},
{(unsigned char*)"Zscr", {240, 157, 146, 181, 0}},
{(unsigned char*)"aacute", {195, 161, 0}},
{(unsigned char*)"abreve", {196, 131, 0}},
{(unsigned char*)"ac", {226, 136, 190, 0}},
{(unsigned char*)"acE", {226, 136, 190, 204, 179, 0}},
{(unsigned char*)"acd", {226, 136, 191, 0}},
{(unsigned char*)"acirc", {195, 162, 0}},
{(unsigned char*)"acute", {194, 180, 0}},
{(unsigned char*)"acy", {208, 176, 0}},
{(unsigned char*)"aelig", {195, 166, 0}},
{(unsigned char*)"af", {226, 129, 161, 0}},
{(unsigned char*)"afr", {240, 157, 148, 158, 0}},
{(unsigned char*)"agrave", {195, 160, 0}},
{(unsigned char*)"alefsym", {226, 132, 181, 0}},
{(unsigned char*)"aleph", {226, 132, 181, 0}},
{(unsigned char*)"alpha", {206, 177, 0}},
{(unsigned char*)"amacr", {196, 129, 0}},
{(unsigned char*)"amalg", {226, 168, 191, 0}},
{(unsigned char*)"amp", {38, 0}},
{(unsigned char*)"and", {226, 136, 167, 0}},
{(unsigned char*)"andand", {226, 169, 149, 0}},
{(unsigned char*)"andd", {226, 169, 156, 0}},
{(unsigned char*)"andslope", {226, 169, 152, 0}},
{(unsigned char*)"andv", {226, 169, 154, 0}},
{(unsigned char*)"ang", {226, 136, 160, 0}},
{(unsigned char*)"ange", {226, 166, 164, 0}},
{(unsigned char*)"angle", {226, 136, 160, 0}},
{(unsigned char*)"angmsd", {226, 136, 161, 0}},
{(unsigned char*)"angmsdaa", {226, 166, 168, 0}},
{(unsigned char*)"angmsdab", {226, 166, 169, 0}},
{(unsigned char*)"angmsdac", {226, 166, 170, 0}},
{(unsigned char*)"angmsdad", {226, 166, 171, 0}},
{(unsigned char*)"angmsdae", {226, 166, 172, 0}},
{(unsigned char*)"angmsdaf", {226, 166, 173, 0}},
{(unsigned char*)"angmsdag", {226, 166, 174, 0}},
{(unsigned char*)"angmsdah", {226, 166, 175, 0}},
{(unsigned char*)"angrt", {226, 136, 159, 0}},
{(unsigned char*)"angrtvb", {226, 138, 190, 0}},
{(unsigned char*)"angrtvbd", {226, 166, 157, 0}},
{(unsigned char*)"angsph", {226, 136, 162, 0}},
{(unsigned char*)"angst", {195, 133, 0}},
{(unsigned char*)"angzarr", {226, 141, 188, 0}},
{(unsigned char*)"aogon", {196, 133, 0}},
{(unsigned char*)"aopf", {240, 157, 149, 146, 0}},
{(unsigned char*)"ap", {226, 137, 136, 0}},
{(unsigned char*)"apE", {226, 169, 176, 0}},
{(unsigned char*)"apacir", {226, 169, 175, 0}},
{(unsigned char*)"ape", {226, 137, 138, 0}},
{(unsigned char*)"apid", {226, 137, 139, 0}},
{(unsigned char*)"apos", {39, 0}},
{(unsigned char*)"approx", {226, 137, 136, 0}},
{(unsigned char*)"approxeq", {226, 137, 138, 0}},
{(unsigned char*)"aring", {195, 165, 0}},
{(unsigned char*)"ascr", {240, 157, 146, 182, 0}},
{(unsigned char*)"ast", {42, 0}},
{(unsigned char*)"asymp", {226, 137, 136, 0}},
{(unsigned char*)"asympeq", {226, 137, 141, 0}},
{(unsigned char*)"atilde", {195, 163, 0}},
{(unsigned char*)"auml", {195, 164, 0}},
{(unsigned char*)"awconint", {226, 136, 179, 0}},
{(unsigned char*)"awint", {226, 168, 145, 0}},
{(unsigned char*)"bNot", {226, 171, 173, 0}},
{(unsigned char*)"backcong", {226, 137, 140, 0}},
{(unsigned char*)"backepsilon", {207, 182, 0}},
{(unsigned char*)"backprime", {226, 128, 181, 0}},
{(unsigned char*)"backsim", {226, 136, 189, 0}},
{(unsigned char*)"backsimeq", {226, 139, 141, 0}},
{(unsigned char*)"barvee", {226, 138, 189, 0}},
{(unsigned char*)"barwed", {226, 140, 133, 0}},
{(unsigned char*)"barwedge", {226, 140, 133, 0}},
{(unsigned char*)"bbrk", {226, 142, 181, 0}},
{(unsigned char*)"bbrktbrk", {226, 142, 182, 0}},
{(unsigned char*)"bcong", {226, 137, 140, 0}},
{(unsigned char*)"bcy", {208, 177, 0}},
{(unsigned char*)"bdquo", {226, 128, 158, 0}},
{(unsigned char*)"becaus", {226, 136, 181, 0}},
{(unsigned char*)"because", {226, 136, 181, 0}},
{(unsigned char*)"bemptyv", {226, 166, 176, 0}},
{(unsigned char*)"bepsi", {207, 182, 0}},
{(unsigned char*)"bernou", {226, 132, 172, 0}},
{(unsigned char*)"beta", {206, 178, 0}},
{(unsigned char*)"beth", {226, 132, 182, 0}},
{(unsigned char*)"between", {226, 137, 172, 0}},
{(unsigned char*)"bfr", {240, 157, 148, 159, 0}},
{(unsigned char*)"bigcap", {226, 139, 130, 0}},
{(unsigned char*)"bigcirc", {226, 151, 175, 0}},
{(unsigned char*)"bigcup", {226, 139, 131, 0}},
{(unsigned char*)"bigodot", {226, 168, 128, 0}},
{(unsigned char*)"bigoplus", {226, 168, 129, 0}},
{(unsigned char*)"bigotimes", {226, 168, 130, 0}},
{(unsigned char*)"bigsqcup", {226, 168, 134, 0}},
{(unsigned char*)"bigstar", {226, 152, 133, 0}},
{(unsigned char*)"bigtriangledown", {226, 150, 189, 0}},
{(unsigned char*)"bigtriangleup", {226, 150, 179, 0}},
{(unsigned char*)"biguplus", {226, 168, 132, 0}},
{(unsigned char*)"bigvee", {226, 139, 129, 0}},
{(unsigned char*)"bigwedge", {226, 139, 128, 0}},
{(unsigned char*)"bkarow", {226, 164, 141, 0}},
{(unsigned char*)"blacklozenge", {226, 167, 171, 0}},
{(unsigned char*)"blacksquare", {226, 150, 170, 0}},
{(unsigned char*)"blacktriangle", {226, 150, 180, 0}},
{(unsigned char*)"blacktriangledown", {226, 150, 190, 0}},
{(unsigned char*)"blacktriangleleft", {226, 151, 130, 0}},
{(unsigned char*)"blacktriangleright", {226, 150, 184, 0}},
{(unsigned char*)"blank", {226, 144, 163, 0}},
{(unsigned char*)"blk12", {226, 150, 146, 0}},
{(unsigned char*)"blk14", {226, 150, 145, 0}},
{(unsigned char*)"blk34", {226, 150, 147, 0}},
{(unsigned char*)"block", {226, 150, 136, 0}},
{(unsigned char*)"bne", {61, 226, 131, 165, 0}},
{(unsigned char*)"bnequiv", {226, 137, 161, 226, 131, 165, 0}},
{(unsigned char*)"bnot", {226, 140, 144, 0}},
{(unsigned char*)"bopf", {240, 157, 149, 147, 0}},
{(unsigned char*)"bot", {226, 138, 165, 0}},
{(unsigned char*)"bottom", {226, 138, 165, 0}},
{(unsigned char*)"bowtie", {226, 139, 136, 0}},
{(unsigned char*)"boxDL", {226, 149, 151, 0}},
{(unsigned char*)"boxDR", {226, 149, 148, 0}},
{(unsigned char*)"boxDl", {226, 149, 150, 0}},
{(unsigned char*)"boxDr", {226, 149, 147, 0}},
{(unsigned char*)"boxH", {226, 149, 144, 0}},
{(unsigned char*)"boxHD", {226, 149, 166, 0}},
{(unsigned char*)"boxHU", {226, 149, 169, 0}},
{(unsigned char*)"boxHd", {226, 149, 164, 0}},
{(unsigned char*)"boxHu", {226, 149, 167, 0}},
{(unsigned char*)"boxUL", {226, 149, 157, 0}},
{(unsigned char*)"boxUR", {226, 149, 154, 0}},
{(unsigned char*)"boxUl", {226, 149, 156, 0}},
{(unsigned char*)"boxUr", {226, 149, 153, 0}},
{(unsigned char*)"boxV", {226, 149, 145, 0}},
{(unsigned char*)"boxVH", {226, 149, 172, 0}},
{(unsigned char*)"boxVL", {226, 149, 163, 0}},
{(unsigned char*)"boxVR", {226, 149, 160, 0}},
{(unsigned char*)"boxVh", {226, 149, 171, 0}},
{(unsigned char*)"boxVl", {226, 149, 162, 0}},
{(unsigned char*)"boxVr", {226, 149, 159, 0}},
{(unsigned char*)"boxbox", {226, 167, 137, 0}},
{(unsigned char*)"boxdL", {226, 149, 149, 0}},
{(unsigned char*)"boxdR", {226, 149, 146, 0}},
{(unsigned char*)"boxdl", {226, 148, 144, 0}},
{(unsigned char*)"boxdr", {226, 148, 140, 0}},
{(unsigned char*)"boxh", {226, 148, 128, 0}},
{(unsigned char*)"boxhD", {226, 149, 165, 0}},
{(unsigned char*)"boxhU", {226, 149, 168, 0}},
{(unsigned char*)"boxhd", {226, 148, 172, 0}},
{(unsigned char*)"boxhu", {226, 148, 180, 0}},
{(unsigned char*)"boxminus", {226, 138, 159, 0}},
{(unsigned char*)"boxplus", {226, 138, 158, 0}},
{(unsigned char*)"boxtimes", {226, 138, 160, 0}},
{(unsigned char*)"boxuL", {226, 149, 155, 0}},
{(unsigned char*)"boxuR", {226, 149, 152, 0}},
{(unsigned char*)"boxul", {226, 148, 152, 0}},
{(unsigned char*)"boxur", {226, 148, 148, 0}},
{(unsigned char*)"boxv", {226, 148, 130, 0}},
{(unsigned char*)"boxvH", {226, 149, 170, 0}},
{(unsigned char*)"boxvL", {226, 149, 161, 0}},
{(unsigned char*)"boxvR", {226, 149, 158, 0}},
{(unsigned char*)"boxvh", {226, 148, 188, 0}},
{(unsigned char*)"boxvl", {226, 148, 164, 0}},
{(unsigned char*)"boxvr", {226, 148, 156, 0}},
{(unsigned char*)"bprime", {226, 128, 181, 0}},
{(unsigned char*)"breve", {203, 152, 0}},
{(unsigned char*)"brvbar", {194, 166, 0}},
{(unsigned char*)"bscr", {240, 157, 146, 183, 0}},
{(unsigned char*)"bsemi", {226, 129, 143, 0}},
{(unsigned char*)"bsim", {226, 136, 189, 0}},
{(unsigned char*)"bsime", {226, 139, 141, 0}},
{(unsigned char*)"bsol", {92, 0}},
{(unsigned char*)"bsolb", {226, 167, 133, 0}},
{(unsigned char*)"bsolhsub", {226, 159, 136, 0}},
{(unsigned char*)"bull", {226, 128, 162, 0}},
{(unsigned char*)"bullet", {226, 128, 162, 0}},
{(unsigned char*)"bump", {226, 137, 142, 0}},
{(unsigned char*)"bumpE", {226, 170, 174, 0}},
{(unsigned char*)"bumpe", {226, 137, 143, 0}},
{(unsigned char*)"bumpeq", {226, 137, 143, 0}},
{(unsigned char*)"cacute", {196, 135, 0}},
{(unsigned char*)"cap", {226, 136, 169, 0}},
{(unsigned char*)"capand", {226, 169, 132, 0}},
{(unsigned char*)"capbrcup", {226, 169, 137, 0}},
{(unsigned char*)"capcap", {226, 169, 139, 0}},
{(unsigned char*)"capcup", {226, 169, 135, 0}},
{(unsigned char*)"capdot", {226, 169, 128, 0}},
{(unsigned char*)"caps", {226, 136, 169, 239, 184, 128, 0}},
{(unsigned char*)"caret", {226, 129, 129, 0}},
{(unsigned char*)"caron", {203, 135, 0}},
{(unsigned char*)"ccaps", {226, 169, 141, 0}},
{(unsigned char*)"ccaron", {196, 141, 0}},
{(unsigned char*)"ccedil", {195, 167, 0}},
{(unsigned char*)"ccirc", {196, 137, 0}},
{(unsigned char*)"ccups", {226, 169, 140, 0}},
{(unsigned char*)"ccupssm", {226, 169, 144, 0}},
{(unsigned char*)"cdot", {196, 139, 0}},
{(unsigned char*)"cedil", {194, 184, 0}},
{(unsigned char*)"cemptyv", {226, 166, 178, 0}},
{(unsigned char*)"cent", {194, 162, 0}},
{(unsigned char*)"centerdot", {194, 183, 0}},
{(unsigned char*)"cfr", {240, 157, 148, 160, 0}},
{(unsigned char*)"chcy", {209, 135, 0}},
{(unsigned char*)"check", {226, 156, 147, 0}},
{(unsigned char*)"checkmark", {226, 156, 147, 0}},
{(unsigned char*)"chi", {207, 135, 0}},
{(unsigned char*)"cir", {226, 151, 139, 0}},
{(unsigned char*)"cirE", {226, 167, 131, 0}},
{(unsigned char*)"circ", {203, 134, 0}},
{(unsigned char*)"circeq", {226, 137, 151, 0}},
{(unsigned char*)"circlearrowleft", {226, 134, 186, 0}},
{(unsigned char*)"circlearrowright", {226, 134, 187, 0}},
{(unsigned char*)"circledR", {194, 174, 0}},
{(unsigned char*)"circledS", {226, 147, 136, 0}},
{(unsigned char*)"circledast", {226, 138, 155, 0}},
{(unsigned char*)"circledcirc", {226, 138, 154, 0}},
{(unsigned char*)"circleddash", {226, 138, 157, 0}},
{(unsigned char*)"cire", {226, 137, 151, 0}},
{(unsigned char*)"cirfnint", {226, 168, 144, 0}},
{(unsigned char*)"cirmid", {226, 171, 175, 0}},
{(unsigned char*)"cirscir", {226, 167, 130, 0}},
{(unsigned char*)"clubs", {226, 153, 163, 0}},
{(unsigned char*)"clubsuit", {226, 153, 163, 0}},
{(unsigned char*)"colon", {58, 0}},
{(unsigned char*)"colone", {226, 137, 148, 0}},
{(unsigned char*)"coloneq", {226, 137, 148, 0}},
{(unsigned char*)"comma", {44, 0}},
{(unsigned char*)"commat", {64, 0}},
{(unsigned char*)"comp", {226, 136, 129, 0}},
{(unsigned char*)"compfn", {226, 136, 152, 0}},
{(unsigned char*)"complement", {226, 136, 129, 0}},
{(unsigned char*)"complexes", {226, 132, 130, 0}},
{(unsigned char*)"cong", {226, 137, 133, 0}},
{(unsigned char*)"congdot", {226, 169, 173, 0}},
{(unsigned char*)"conint", {226, 136, 174, 0}},
{(unsigned char*)"copf", {240, 157, 149, 148, 0}},
{(unsigned char*)"coprod", {226, 136, 144, 0}},
{(unsigned char*)"copy", {194, 169, 0}},
{(unsigned char*)"copysr", {226, 132, 151, 0}},
{(unsigned char*)"crarr", {226, 134, 181, 0}},
{(unsigned char*)"cross", {226, 156, 151, 0}},
{(unsigned char*)"cscr", {240, 157, 146, 184, 0}},
{(unsigned char*)"csub", {226, 171, 143, 0}},
{(unsigned char*)"csube", {226, 171, 145, 0}},
{(unsigned char*)"csup", {226, 171, 144, 0}},
{(unsigned char*)"csupe", {226, 171, 146, 0}},
{(unsigned char*)"ctdot", {226, 139, 175, 0}},
{(unsigned char*)"cudarrl", {226, 164, 184, 0}},
{(unsigned char*)"cudarrr", {226, 164, 181, 0}},
{(unsigned char*)"cuepr", {226, 139, 158, 0}},
{(unsigned char*)"cuesc", {226, 139, 159, 0}},
{(unsigned char*)"cularr", {226, 134, 182, 0}},
{(unsigned char*)"cularrp", {226, 164, 189, 0}},
{(unsigned char*)"cup", {226, 136, 170, 0}},
{(unsigned char*)"cupbrcap", {226, 169, 136, 0}},
{(unsigned char*)"cupcap", {226, 169, 134, 0}},
{(unsigned char*)"cupcup", {226, 169, 138, 0}},
{(unsigned char*)"cupdot", {226, 138, 141, 0}},
{(unsigned char*)"cupor", {226, 169, 133, 0}},
{(unsigned char*)"cups", {226, 136, 170, 239, 184, 128, 0}},
{(unsigned char*)"curarr", {226, 134, 183, 0}},
{(unsigned char*)"curarrm", {226, 164, 188, 0}},
{(unsigned char*)"curlyeqprec", {226, 139, 158, 0}},
{(unsigned char*)"curlyeqsucc", {226, 139, 159, 0}},
{(unsigned char*)"curlyvee", {226, 139, 142, 0}},
{(unsigned char*)"curlywedge", {226, 139, 143, 0}},
{(unsigned char*)"curren", {194, 164, 0}},
{(unsigned char*)"curvearrowleft", {226, 134, 182, 0}},
{(unsigned char*)"curvearrowright", {226, 134, 183, 0}},
{(unsigned char*)"cuvee", {226, 139, 142, 0}},
{(unsigned char*)"cuwed", {226, 139, 143, 0}},
{(unsigned char*)"cwconint", {226, 136, 178, 0}},
{(unsigned char*)"cwint", {226, 136, 177, 0}},
{(unsigned char*)"cylcty", {226, 140, 173, 0}},
{(unsigned char*)"dArr", {226, 135, 147, 0}},
{(unsigned char*)"dHar", {226, 165, 165, 0}},
{(unsigned char*)"dagger", {226, 128, 160, 0}},
{(unsigned char*)"daleth", {226, 132, 184, 0}},
{(unsigned char*)"darr", {226, 134, 147, 0}},
{(unsigned char*)"dash", {226, 128, 144, 0}},
{(unsigned char*)"dashv", {226, 138, 163, 0}},
{(unsigned char*)"dbkarow", {226, 164, 143, 0}},
{(unsigned char*)"dblac", {203, 157, 0}},
{(unsigned char*)"dcaron", {196, 143, 0}},
{(unsigned char*)"dcy", {208, 180, 0}},
{(unsigned char*)"dd", {226, 133, 134, 0}},
{(unsigned char*)"ddagger", {226, 128, 161, 0}},
{(unsigned char*)"ddarr", {226, 135, 138, 0}},
{(unsigned char*)"ddotseq", {226, 169, 183, 0}},
{(unsigned char*)"deg", {194, 176, 0}},
{(unsigned char*)"delta", {206, 180, 0}},
{(unsigned char*)"demptyv", {226, 166, 177, 0}},
{(unsigned char*)"dfisht", {226, 165, 191, 0}},
{(unsigned char*)"dfr", {240, 157, 148, 161, 0}},
{(unsigned char*)"dharl", {226, 135, 131, 0}},
{(unsigned char*)"dharr", {226, 135, 130, 0}},
{(unsigned char*)"diam", {226, 139, 132, 0}},
{(unsigned char*)"diamond", {226, 139, 132, 0}},
{(unsigned char*)"diamondsuit", {226, 153, 166, 0}},
{(unsigned char*)"diams", {226, 153, 166, 0}},
{(unsigned char*)"die", {194, 168, 0}},
{(unsigned char*)"digamma", {207, 157, 0}},
{(unsigned char*)"disin", {226, 139, 178, 0}},
{(unsigned char*)"div", {195, 183, 0}},
{(unsigned char*)"divide", {195, 183, 0}},
{(unsigned char*)"divideontimes", {226, 139, 135, 0}},
{(unsigned char*)"divonx", {226, 139, 135, 0}},
{(unsigned char*)"djcy", {209, 146, 0}},
{(unsigned char*)"dlcorn", {226, 140, 158, 0}},
{(unsigned char*)"dlcrop", {226, 140, 141, 0}},
{(unsigned char*)"dollar", {36, 0}},
{(unsigned char*)"dopf", {240, 157, 149, 149, 0}},
{(unsigned char*)"dot", {203, 153, 0}},
{(unsigned char*)"doteq", {226, 137, 144, 0}},
{(unsigned char*)"doteqdot", {226, 137, 145, 0}},
{(unsigned char*)"dotminus", {226, 136, 184, 0}},
{(unsigned char*)"dotplus", {226, 136, 148, 0}},
{(unsigned char*)"dotsquare", {226, 138, 161, 0}},
{(unsigned char*)"doublebarwedge", {226, 140, 134, 0}},
{(unsigned char*)"downarrow", {226, 134, 147, 0}},
{(unsigned char*)"downdownarrows", {226, 135, 138, 0}},
{(unsigned char*)"downharpoonleft", {226, 135, 131, 0}},
{(unsigned char*)"downharpoonright", {226, 135, 130, 0}},
{(unsigned char*)"drbkarow", {226, 164, 144, 0}},
{(unsigned char*)"drcorn", {226, 140, 159, 0}},
{(unsigned char*)"drcrop", {226, 140, 140, 0}},
{(unsigned char*)"dscr", {240, 157, 146, 185, 0}},
{(unsigned char*)"dscy", {209, 149, 0}},
{(unsigned char*)"dsol", {226, 167, 182, 0}},
{(unsigned char*)"dstrok", {196, 145, 0}},
{(unsigned char*)"dtdot", {226, 139, 177, 0}},
{(unsigned char*)"dtri", {226, 150, 191, 0}},
{(unsigned char*)"dtrif", {226, 150, 190, 0}},
{(unsigned char*)"duarr", {226, 135, 181, 0}},
{(unsigned char*)"duhar", {226, 165, 175, 0}},
{(unsigned char*)"dwangle", {226, 166, 166, 0}},
{(unsigned char*)"dzcy", {209, 159, 0}},
{(unsigned char*)"dzigrarr", {226, 159, 191, 0}},
{(unsigned char*)"eDDot", {226, 169, 183, 0}},
{(unsigned char*)"eDot", {226, 137, 145, 0}},
{(unsigned char*)"eacute", {195, 169, 0}},
{(unsigned char*)"easter", {226, 169, 174, 0}},
{(unsigned char*)"ecaron", {196, 155, 0}},
{(unsigned char*)"ecir", {226, 137, 150, 0}},
{(unsigned char*)"ecirc", {195, 170, 0}},
{(unsigned char*)"ecolon", {226, 137, 149, 0}},
{(unsigned char*)"ecy", {209, 141, 0}},
{(unsigned char*)"edot", {196, 151, 0}},
{(unsigned char*)"ee", {226, 133, 135, 0}},
{(unsigned char*)"efDot", {226, 137, 146, 0}},
{(unsigned char*)"efr", {240, 157, 148, 162, 0}},
{(unsigned char*)"eg", {226, 170, 154, 0}},
{(unsigned char*)"egrave", {195, 168, 0}},
{(unsigned char*)"egs", {226, 170, 150, 0}},
{(unsigned char*)"egsdot", {226, 170, 152, 0}},
{(unsigned char*)"el", {226, 170, 153, 0}},
{(unsigned char*)"elinters", {226, 143, 167, 0}},
{(unsigned char*)"ell", {226, 132, 147, 0}},
{(unsigned char*)"els", {226, 170, 149, 0}},
{(unsigned char*)"elsdot", {226, 170, 151, 0}},
{(unsigned char*)"emacr", {196, 147, 0}},
{(unsigned char*)"empty", {226, 136, 133, 0}},
{(unsigned char*)"emptyset", {226, 136, 133, 0}},
{(unsigned char*)"emptyv", {226, 136, 133, 0}},
{(unsigned char*)"emsp", {226, 128, 131, 0}},
{(unsigned char*)"emsp13", {226, 128, 132, 0}},
{(unsigned char*)"emsp14", {226, 128, 133, 0}},
{(unsigned char*)"eng", {197, 139, 0}},
{(unsigned char*)"ensp", {226, 128, 130, 0}},
{(unsigned char*)"eogon", {196, 153, 0}},
{(unsigned char*)"eopf", {240, 157, 149, 150, 0}},
{(unsigned char*)"epar", {226, 139, 149, 0}},
{(unsigned char*)"eparsl", {226, 167, 163, 0}},
{(unsigned char*)"eplus", {226, 169, 177, 0}},
{(unsigned char*)"epsi", {206, 181, 0}},
{(unsigned char*)"epsilon", {206, 181, 0}},
{(unsigned char*)"epsiv", {207, 181, 0}},
{(unsigned char*)"eqcirc", {226, 137, 150, 0}},
{(unsigned char*)"eqcolon", {226, 137, 149, 0}},
{(unsigned char*)"eqsim", {226, 137, 130, 0}},
{(unsigned char*)"eqslantgtr", {226, 170, 150, 0}},
{(unsigned char*)"eqslantless", {226, 170, 149, 0}},
{(unsigned char*)"equals", {61, 0}},
{(unsigned char*)"equest", {226, 137, 159, 0}},
{(unsigned char*)"equiv", {226, 137, 161, 0}},
{(unsigned char*)"equivDD", {226, 169, 184, 0}},
{(unsigned char*)"eqvparsl", {226, 167, 165, 0}},
{(unsigned char*)"erDot", {226, 137, 147, 0}},
{(unsigned char*)"erarr", {226, 165, 177, 0}},
{(unsigned char*)"escr", {226, 132, 175, 0}},
{(unsigned char*)"esdot", {226, 137, 144, 0}},
{(unsigned char*)"esim", {226, 137, 130, 0}},
{(unsigned char*)"eta", {206, 183, 0}},
{(unsigned char*)"eth", {195, 176, 0}},
{(unsigned char*)"euml", {195, 171, 0}},
{(unsigned char*)"euro", {226, 130, 172, 0}},
{(unsigned char*)"excl", {33, 0}},
{(unsigned char*)"exist", {226, 136, 131, 0}},
{(unsigned char*)"expectation", {226, 132, 176, 0}},
{(unsigned char*)"exponentiale", {226, 133, 135, 0}},
{(unsigned char*)"fallingdotseq", {226, 137, 146, 0}},
{(unsigned char*)"fcy", {209, 132, 0}},
{(unsigned char*)"female", {226, 153, 128, 0}},
{(unsigned char*)"ffilig", {239, 172, 131, 0}},
{(unsigned char*)"fflig", {239, 172, 128, 0}},
{(unsigned char*)"ffllig", {239, 172, 132, 0}},
{(unsigned char*)"ffr", {240, 157, 148, 163, 0}},
{(unsigned char*)"filig", {239, 172, 129, 0}},
{(unsigned char*)"fjlig", {102, 106, 0}},
{(unsigned char*)"flat", {226, 153, 173, 0}},
{(unsigned char*)"fllig", {239, 172, 130, 0}},
{(unsigned char*)"fltns", {226, 150, 177, 0}},
{(unsigned char*)"fnof", {198, 146, 0}},
{(unsigned char*)"fopf", {240, 157, 149, 151, 0}},
{(unsigned char*)"forall", {226, 136, 128, 0}},
{(unsigned char*)"fork", {226, 139, 148, 0}},
{(unsigned char*)"forkv", {226, 171, 153, 0}},
{(unsigned char*)"fpartint", {226, 168, 141, 0}},
{(unsigned char*)"frac12", {194, 189, 0}},
{(unsigned char*)"frac13", {226, 133, 147, 0}},
{(unsigned char*)"frac14", {194, 188, 0}},
{(unsigned char*)"frac15", {226, 133, 149, 0}},
{(unsigned char*)"frac16", {226, 133, 153, 0}},
{(unsigned char*)"frac18", {226, 133, 155, 0}},
{(unsigned char*)"frac23", {226, 133, 148, 0}},
{(unsigned char*)"frac25", {226, 133, 150, 0}},
{(unsigned char*)"frac34", {194, 190, 0}},
{(unsigned char*)"frac35", {226, 133, 151, 0}},
{(unsigned char*)"frac38", {226, 133, 156, 0}},
{(unsigned char*)"frac45", {226, 133, 152, 0}},
{(unsigned char*)"frac56", {226, 133, 154, 0}},
{(unsigned char*)"frac58", {226, 133, 157, 0}},
{(unsigned char*)"frac78", {226, 133, 158, 0}},
{(unsigned char*)"frasl", {226, 129, 132, 0}},
{(unsigned char*)"frown", {226, 140, 162, 0}},
{(unsigned char*)"fscr", {240, 157, 146, 187, 0}},
{(unsigned char*)"gE", {226, 137, 167, 0}},
{(unsigned char*)"gEl", {226, 170, 140, 0}},
{(unsigned char*)"gacute", {199, 181, 0}},
{(unsigned char*)"gamma", {206, 179, 0}},
{(unsigned char*)"gammad", {207, 157, 0}},
{(unsigned char*)"gap", {226, 170, 134, 0}},
{(unsigned char*)"gbreve", {196, 159, 0}},
{(unsigned char*)"gcirc", {196, 157, 0}},
{(unsigned char*)"gcy", {208, 179, 0}},
{(unsigned char*)"gdot", {196, 161, 0}},
{(unsigned char*)"ge", {226, 137, 165, 0}},
{(unsigned char*)"gel", {226, 139, 155, 0}},
{(unsigned char*)"geq", {226, 137, 165, 0}},
{(unsigned char*)"geqq", {226, 137, 167, 0}},
{(unsigned char*)"geqslant", {226, 169, 190, 0}},
{(unsigned char*)"ges", {226, 169, 190, 0}},
{(unsigned char*)"gescc", {226, 170, 169, 0}},
{(unsigned char*)"gesdot", {226, 170, 128, 0}},
{(unsigned char*)"gesdoto", {226, 170, 130, 0}},
{(unsigned char*)"gesdotol", {226, 170, 132, 0}},
{(unsigned char*)"gesl", {226, 139, 155, 239, 184, 128, 0}},
{(unsigned char*)"gesles", {226, 170, 148, 0}},
{(unsigned char*)"gfr", {240, 157, 148, 164, 0}},
{(unsigned char*)"gg", {226, 137, 171, 0}},
{(unsigned char*)"ggg", {226, 139, 153, 0}},
{(unsigned char*)"gimel", {226, 132, 183, 0}},
{(unsigned char*)"gjcy", {209, 147, 0}},
{(unsigned char*)"gl", {226, 137, 183, 0}},
{(unsigned char*)"glE", {226, 170, 146, 0}},
{(unsigned char*)"gla", {226, 170, 165, 0}},
{(unsigned char*)"glj", {226, 170, 164, 0}},
{(unsigned char*)"gnE", {226, 137, 169, 0}},
{(unsigned char*)"gnap", {226, 170, 138, 0}},
{(unsigned char*)"gnapprox", {226, 170, 138, 0}},
{(unsigned char*)"gne", {226, 170, 136, 0}},
{(unsigned char*)"gneq", {226, 170, 136, 0}},
{(unsigned char*)"gneqq", {226, 137, 169, 0}},
{(unsigned char*)"gnsim", {226, 139, 167, 0}},
{(unsigned char*)"gopf", {240, 157, 149, 152, 0}},
{(unsigned char*)"grave", {96, 0}},
{(unsigned char*)"gscr", {226, 132, 138, 0}},
{(unsigned char*)"gsim", {226, 137, 179, 0}},
{(unsigned char*)"gsime", {226, 170, 142, 0}},
{(unsigned char*)"gsiml", {226, 170, 144, 0}},
{(unsigned char*)"gt", {62, 0}},
{(unsigned char*)"gtcc", {226, 170, 167, 0}},
{(unsigned char*)"gtcir", {226, 169, 186, 0}},
{(unsigned char*)"gtdot", {226, 139, 151, 0}},
{(unsigned char*)"gtlPar", {226, 166, 149, 0}},
{(unsigned char*)"gtquest", {226, 169, 188, 0}},
{(unsigned char*)"gtrapprox", {226, 170, 134, 0}},
{(unsigned char*)"gtrarr", {226, 165, 184, 0}},
{(unsigned char*)"gtrdot", {226, 139, 151, 0}},
{(unsigned char*)"gtreqless", {226, 139, 155, 0}},
{(unsigned char*)"gtreqqless", {226, 170, 140, 0}},
{(unsigned char*)"gtrless", {226, 137, 183, 0}},
{(unsigned char*)"gtrsim", {226, 137, 179, 0}},
{(unsigned char*)"gvertneqq", {226, 137, 169, 239, 184, 128, 0}},
{(unsigned char*)"gvnE", {226, 137, 169, 239, 184, 128, 0}},
{(unsigned char*)"hArr", {226, 135, 148, 0}},
{(unsigned char*)"hairsp", {226, 128, 138, 0}},
{(unsigned char*)"half", {194, 189, 0}},
{(unsigned char*)"hamilt", {226, 132, 139, 0}},
{(unsigned char*)"hardcy", {209, 138, 0}},
{(unsigned char*)"harr", {226, 134, 148, 0}},
{(unsigned char*)"harrcir", {226, 165, 136, 0}},
{(unsigned char*)"harrw", {226, 134, 173, 0}},
{(unsigned char*)"hbar", {226, 132, 143, 0}},
{(unsigned char*)"hcirc", {196, 165, 0}},
{(unsigned char*)"hearts", {226, 153, 165, 0}},
{(unsigned char*)"heartsuit", {226, 153, 165, 0}},
{(unsigned char*)"hellip", {226, 128, 166, 0}},
{(unsigned char*)"hercon", {226, 138, 185, 0}},
{(unsigned char*)"hfr", {240, 157, 148, 165, 0}},
{(unsigned char*)"hksearow", {226, 164, 165, 0}},
{(unsigned char*)"hkswarow", {226, 164, 166, 0}},
{(unsigned char*)"hoarr", {226, 135, 191, 0}},
{(unsigned char*)"homtht", {226, 136, 187, 0}},
{(unsigned char*)"hookleftarrow", {226, 134, 169, 0}},
{(unsigned char*)"hookrightarrow", {226, 134, 170, 0}},
{(unsigned char*)"hopf", {240, 157, 149, 153, 0}},
{(unsigned char*)"horbar", {226, 128, 149, 0}},
{(unsigned char*)"hscr", {240, 157, 146, 189, 0}},
{(unsigned char*)"hslash", {226, 132, 143, 0}},
{(unsigned char*)"hstrok", {196, 167, 0}},
{(unsigned char*)"hybull", {226, 129, 131, 0}},
{(unsigned char*)"hyphen", {226, 128, 144, 0}},
{(unsigned char*)"iacute", {195, 173, 0}},
{(unsigned char*)"ic", {226, 129, 163, 0}},
{(unsigned char*)"icirc", {195, 174, 0}},
{(unsigned char*)"icy", {208, 184, 0}},
{(unsigned char*)"iecy", {208, 181, 0}},
{(unsigned char*)"iexcl", {194, 161, 0}},
{(unsigned char*)"iff", {226, 135, 148, 0}},
{(unsigned char*)"ifr", {240, 157, 148, 166, 0}},
{(unsigned char*)"igrave", {195, 172, 0}},
{(unsigned char*)"ii", {226, 133, 136, 0}},
{(unsigned char*)"iiiint", {226, 168, 140, 0}},
{(unsigned char*)"iiint", {226, 136, 173, 0}},
{(unsigned char*)"iinfin", {226, 167, 156, 0}},
{(unsigned char*)"iiota", {226, 132, 169, 0}},
{(unsigned char*)"ijlig", {196, 179, 0}},
{(unsigned char*)"imacr", {196, 171, 0}},
{(unsigned char*)"image", {226, 132, 145, 0}},
{(unsigned char*)"imagline", {226, 132, 144, 0}},
{(unsigned char*)"imagpart", {226, 132, 145, 0}},
{(unsigned char*)"imath", {196, 177, 0}},
{(unsigned char*)"imof", {226, 138, 183, 0}},
{(unsigned char*)"imped", {198, 181, 0}},
{(unsigned char*)"in", {226, 136, 136, 0}},
{(unsigned char*)"incare", {226, 132, 133, 0}},
{(unsigned char*)"infin", {226, 136, 158, 0}},
{(unsigned char*)"infintie", {226, 167, 157, 0}},
{(unsigned char*)"inodot", {196, 177, 0}},
{(unsigned char*)"int", {226, 136, 171, 0}},
{(unsigned char*)"intcal", {226, 138, 186, 0}},
{(unsigned char*)"integers", {226, 132, 164, 0}},
{(unsigned char*)"intercal", {226, 138, 186, 0}},
{(unsigned char*)"intlarhk", {226, 168, 151, 0}},
{(unsigned char*)"intprod", {226, 168, 188, 0}},
{(unsigned char*)"iocy", {209, 145, 0}},
{(unsigned char*)"iogon", {196, 175, 0}},
{(unsigned char*)"iopf", {240, 157, 149, 154, 0}},
{(unsigned char*)"iota", {206, 185, 0}},
{(unsigned char*)"iprod", {226, 168, 188, 0}},
{(unsigned char*)"iquest", {194, 191, 0}},
{(unsigned char*)"iscr", {240, 157, 146, 190, 0}},
{(unsigned char*)"isin", {226, 136, 136, 0}},
{(unsigned char*)"isinE", {226, 139, 185, 0}},
{(unsigned char*)"isindot", {226, 139, 181, 0}},
{(unsigned char*)"isins", {226, 139, 180, 0}},
{(unsigned char*)"isinsv", {226, 139, 179, 0}},
{(unsigned char*)"isinv", {226, 136, 136, 0}},
{(unsigned char*)"it", {226, 129, 162, 0}},
{(unsigned char*)"itilde", {196, 169, 0}},
{(unsigned char*)"iukcy", {209, 150, 0}},
{(unsigned char*)"iuml", {195, 175, 0}},
{(unsigned char*)"jcirc", {196, 181, 0}},
{(unsigned char*)"jcy", {208, 185, 0}},
{(unsigned char*)"jfr", {240, 157, 148, 167, 0}},
{(unsigned char*)"jmath", {200, 183, 0}},
{(unsigned char*)"jopf", {240, 157, 149, 155, 0}},
{(unsigned char*)"jscr", {240, 157, 146, 191, 0}},
{(unsigned char*)"jsercy", {209, 152, 0}},
{(unsigned char*)"jukcy", {209, 148, 0}},
{(unsigned char*)"kappa", {206, 186, 0}},
{(unsigned char*)"kappav", {207, 176, 0}},
{(unsigned char*)"kcedil", {196, 183, 0}},
{(unsigned char*)"kcy", {208, 186, 0}},
{(unsigned char*)"kfr", {240, 157, 148, 168, 0}},
{(unsigned char*)"kgreen", {196, 184, 0}},
{(unsigned char*)"khcy", {209, 133, 0}},
{(unsigned char*)"kjcy", {209, 156, 0}},
{(unsigned char*)"kopf", {240, 157, 149, 156, 0}},
{(unsigned char*)"kscr", {240, 157, 147, 128, 0}},
{(unsigned char*)"lAarr", {226, 135, 154, 0}},
{(unsigned char*)"lArr", {226, 135, 144, 0}},
{(unsigned char*)"lAtail", {226, 164, 155, 0}},
{(unsigned char*)"lBarr", {226, 164, 142, 0}},
{(unsigned char*)"lE", {226, 137, 166, 0}},
{(unsigned char*)"lEg", {226, 170, 139, 0}},
{(unsigned char*)"lHar", {226, 165, 162, 0}},
{(unsigned char*)"lacute", {196, 186, 0}},
{(unsigned char*)"laemptyv", {226, 166, 180, 0}},
{(unsigned char*)"lagran", {226, 132, 146, 0}},
{(unsigned char*)"lambda", {206, 187, 0}},
{(unsigned char*)"lang", {226, 159, 168, 0}},
{(unsigned char*)"langd", {226, 166, 145, 0}},
{(unsigned char*)"langle", {226, 159, 168, 0}},
{(unsigned char*)"lap", {226, 170, 133, 0}},
{(unsigned char*)"laquo", {194, 171, 0}},
{(unsigned char*)"larr", {226, 134, 144, 0}},
{(unsigned char*)"larrb", {226, 135, 164, 0}},
{(unsigned char*)"larrbfs", {226, 164, 159, 0}},
{(unsigned char*)"larrfs", {226, 164, 157, 0}},
{(unsigned char*)"larrhk", {226, 134, 169, 0}},
{(unsigned char*)"larrlp", {226, 134, 171, 0}},
{(unsigned char*)"larrpl", {226, 164, 185, 0}},
{(unsigned char*)"larrsim", {226, 165, 179, 0}},
{(unsigned char*)"larrtl", {226, 134, 162, 0}},
{(unsigned char*)"lat", {226, 170, 171, 0}},
{(unsigned char*)"latail", {226, 164, 153, 0}},
{(unsigned char*)"late", {226, 170, 173, 0}},
{(unsigned char*)"lates", {226, 170, 173, 239, 184, 128, 0}},
{(unsigned char*)"lbarr", {226, 164, 140, 0}},
{(unsigned char*)"lbbrk", {226, 157, 178, 0}},
{(unsigned char*)"lbrace", {123, 0}},
{(unsigned char*)"lbrack", {91, 0}},
{(unsigned char*)"lbrke", {226, 166, 139, 0}},
{(unsigned char*)"lbrksld", {226, 166, 143, 0}},
{(unsigned char*)"lbrkslu", {226, 166, 141, 0}},
{(unsigned char*)"lcaron", {196, 190, 0}},
{(unsigned char*)"lcedil", {196, 188, 0}},
{(unsigned char*)"lceil", {226, 140, 136, 0}},
{(unsigned char*)"lcub", {123, 0}},
{(unsigned char*)"lcy", {208, 187, 0}},
{(unsigned char*)"ldca", {226, 164, 182, 0}},
{(unsigned char*)"ldquo", {226, 128, 156, 0}},
{(unsigned char*)"ldquor", {226, 128, 158, 0}},
{(unsigned char*)"ldrdhar", {226, 165, 167, 0}},
{(unsigned char*)"ldrushar", {226, 165, 139, 0}},
{(unsigned char*)"ldsh", {226, 134, 178, 0}},
{(unsigned char*)"le", {226, 137, 164, 0}},
{(unsigned char*)"leftarrow", {226, 134, 144, 0}},
{(unsigned char*)"leftarrowtail", {226, 134, 162, 0}},
{(unsigned char*)"leftharpoondown", {226, 134, 189, 0}},
{(unsigned char*)"leftharpoonup", {226, 134, 188, 0}},
{(unsigned char*)"leftleftarrows", {226, 135, 135, 0}},
{(unsigned char*)"leftrightarrow", {226, 134, 148, 0}},
{(unsigned char*)"leftrightarrows", {226, 135, 134, 0}},
{(unsigned char*)"leftrightharpoons", {226, 135, 139, 0}},
{(unsigned char*)"leftrightsquigarrow", {226, 134, 173, 0}},
{(unsigned char*)"leftthreetimes", {226, 139, 139, 0}},
{(unsigned char*)"leg", {226, 139, 154, 0}},
{(unsigned char*)"leq", {226, 137, 164, 0}},
{(unsigned char*)"leqq", {226, 137, 166, 0}},
{(unsigned char*)"leqslant", {226, 169, 189, 0}},
{(unsigned char*)"les", {226, 169, 189, 0}},
{(unsigned char*)"lescc", {226, 170, 168, 0}},
{(unsigned char*)"lesdot", {226, 169, 191, 0}},
{(unsigned char*)"lesdoto", {226, 170, 129, 0}},
{(unsigned char*)"lesdotor", {226, 170, 131, 0}},
{(unsigned char*)"lesg", {226, 139, 154, 239, 184, 128, 0}},
{(unsigned char*)"lesges", {226, 170, 147, 0}},
{(unsigned char*)"lessapprox", {226, 170, 133, 0}},
{(unsigned char*)"lessdot", {226, 139, 150, 0}},
{(unsigned char*)"lesseqgtr", {226, 139, 154, 0}},
{(unsigned char*)"lesseqqgtr", {226, 170, 139, 0}},
{(unsigned char*)"lessgtr", {226, 137, 182, 0}},
{(unsigned char*)"lesssim", {226, 137, 178, 0}},
{(unsigned char*)"lfisht", {226, 165, 188, 0}},
{(unsigned char*)"lfloor", {226, 140, 138, 0}},
{(unsigned char*)"lfr", {240, 157, 148, 169, 0}},
{(unsigned char*)"lg", {226, 137, 182, 0}},
{(unsigned char*)"lgE", {226, 170, 145, 0}},
{(unsigned char*)"lhard", {226, 134, 189, 0}},
{(unsigned char*)"lharu", {226, 134, 188, 0}},
{(unsigned char*)"lharul", {226, 165, 170, 0}},
{(unsigned char*)"lhblk", {226, 150, 132, 0}},
{(unsigned char*)"ljcy", {209, 153, 0}},
{(unsigned char*)"ll", {226, 137, 170, 0}},
{(unsigned char*)"llarr", {226, 135, 135, 0}},
{(unsigned char*)"llcorner", {226, 140, 158, 0}},
{(unsigned char*)"llhard", {226, 165, 171, 0}},
{(unsigned char*)"lltri", {226, 151, 186, 0}},
{(unsigned char*)"lmidot", {197, 128, 0}},
{(unsigned char*)"lmoust", {226, 142, 176, 0}},
{(unsigned char*)"lmoustache", {226, 142, 176, 0}},
{(unsigned char*)"lnE", {226, 137, 168, 0}},
{(unsigned char*)"lnap", {226, 170, 137, 0}},
{(unsigned char*)"lnapprox", {226, 170, 137, 0}},
{(unsigned char*)"lne", {226, 170, 135, 0}},
{(unsigned char*)"lneq", {226, 170, 135, 0}},
{(unsigned char*)"lneqq", {226, 137, 168, 0}},
{(unsigned char*)"lnsim", {226, 139, 166, 0}},
{(unsigned char*)"loang", {226, 159, 172, 0}},
{(unsigned char*)"loarr", {226, 135, 189, 0}},
{(unsigned char*)"lobrk", {226, 159, 166, 0}},
{(unsigned char*)"longleftarrow", {226, 159, 181, 0}},
{(unsigned char*)"longleftrightarrow", {226, 159, 183, 0}},
{(unsigned char*)"longmapsto", {226, 159, 188, 0}},
{(unsigned char*)"longrightarrow", {226, 159, 182, 0}},
{(unsigned char*)"looparrowleft", {226, 134, 171, 0}},
{(unsigned char*)"looparrowright", {226, 134, 172, 0}},
{(unsigned char*)"lopar", {226, 166, 133, 0}},
{(unsigned char*)"lopf", {240, 157, 149, 157, 0}},
{(unsigned char*)"loplus", {226, 168, 173, 0}},
{(unsigned char*)"lotimes", {226, 168, 180, 0}},
{(unsigned char*)"lowast", {226, 136, 151, 0}},
{(unsigned char*)"lowbar", {95, 0}},
{(unsigned char*)"loz", {226, 151, 138, 0}},
{(unsigned char*)"lozenge", {226, 151, 138, 0}},
{(unsigned char*)"lozf", {226, 167, 171, 0}},
{(unsigned char*)"lpar", {40, 0}},
{(unsigned char*)"lparlt", {226, 166, 147, 0}},
{(unsigned char*)"lrarr", {226, 135, 134, 0}},
{(unsigned char*)"lrcorner", {226, 140, 159, 0}},
{(unsigned char*)"lrhar", {226, 135, 139, 0}},
{(unsigned char*)"lrhard", {226, 165, 173, 0}},
{(unsigned char*)"lrm", {226, 128, 142, 0}},
{(unsigned char*)"lrtri", {226, 138, 191, 0}},
{(unsigned char*)"lsaquo", {226, 128, 185, 0}},
{(unsigned char*)"lscr", {240, 157, 147, 129, 0}},
{(unsigned char*)"lsh", {226, 134, 176, 0}},
{(unsigned char*)"lsim", {226, 137, 178, 0}},
{(unsigned char*)"lsime", {226, 170, 141, 0}},
{(unsigned char*)"lsimg", {226, 170, 143, 0}},
{(unsigned char*)"lsqb", {91, 0}},
{(unsigned char*)"lsquo", {226, 128, 152, 0}},
{(unsigned char*)"lsquor", {226, 128, 154, 0}},
{(unsigned char*)"lstrok", {197, 130, 0}},
{(unsigned char*)"lt", {60, 0}},
{(unsigned char*)"ltcc", {226, 170, 166, 0}},
{(unsigned char*)"ltcir", {226, 169, 185, 0}},
{(unsigned char*)"ltdot", {226, 139, 150, 0}},
{(unsigned char*)"lthree", {226, 139, 139, 0}},
{(unsigned char*)"ltimes", {226, 139, 137, 0}},
{(unsigned char*)"ltlarr", {226, 165, 182, 0}},
{(unsigned char*)"ltquest", {226, 169, 187, 0}},
{(unsigned char*)"ltrPar", {226, 166, 150, 0}},
{(unsigned char*)"ltri", {226, 151, 131, 0}},
{(unsigned char*)"ltrie", {226, 138, 180, 0}},
{(unsigned char*)"ltrif", {226, 151, 130, 0}},
{(unsigned char*)"lurdshar", {226, 165, 138, 0}},
{(unsigned char*)"luruhar", {226, 165, 166, 0}},
{(unsigned char*)"lvertneqq", {226, 137, 168, 239, 184, 128, 0}},
{(unsigned char*)"lvnE", {226, 137, 168, 239, 184, 128, 0}},
{(unsigned char*)"mDDot", {226, 136, 186, 0}},
{(unsigned char*)"macr", {194, 175, 0}},
{(unsigned char*)"male", {226, 153, 130, 0}},
{(unsigned char*)"malt", {226, 156, 160, 0}},
{(unsigned char*)"maltese", {226, 156, 160, 0}},
{(unsigned char*)"map", {226, 134, 166, 0}},
{(unsigned char*)"mapsto", {226, 134, 166, 0}},
{(unsigned char*)"mapstodown", {226, 134, 167, 0}},
{(unsigned char*)"mapstoleft", {226, 134, 164, 0}},
{(unsigned char*)"mapstoup", {226, 134, 165, 0}},
{(unsigned char*)"marker", {226, 150, 174, 0}},
{(unsigned char*)"mcomma", {226, 168, 169, 0}},
{(unsigned char*)"mcy", {208, 188, 0}},
{(unsigned char*)"mdash", {226, 128, 148, 0}},
{(unsigned char*)"measuredangle", {226, 136, 161, 0}},
{(unsigned char*)"mfr", {240, 157, 148, 170, 0}},
{(unsigned char*)"mho", {226, 132, 167, 0}},
{(unsigned char*)"micro", {194, 181, 0}},
{(unsigned char*)"mid", {226, 136, 163, 0}},
{(unsigned char*)"midast", {42, 0}},
{(unsigned char*)"midcir", {226, 171, 176, 0}},
{(unsigned char*)"middot", {194, 183, 0}},
{(unsigned char*)"minus", {226, 136, 146, 0}},
{(unsigned char*)"minusb", {226, 138, 159, 0}},
{(unsigned char*)"minusd", {226, 136, 184, 0}},
{(unsigned char*)"minusdu", {226, 168, 170, 0}},
{(unsigned char*)"mlcp", {226, 171, 155, 0}},
{(unsigned char*)"mldr", {226, 128, 166, 0}},
{(unsigned char*)"mnplus", {226, 136, 147, 0}},
{(unsigned char*)"models", {226, 138, 167, 0}},
{(unsigned char*)"mopf", {240, 157, 149, 158, 0}},
{(unsigned char*)"mp", {226, 136, 147, 0}},
{(unsigned char*)"mscr", {240, 157, 147, 130, 0}},
{(unsigned char*)"mstpos", {226, 136, 190, 0}},
{(unsigned char*)"mu", {206, 188, 0}},
{(unsigned char*)"multimap", {226, 138, 184, 0}},
{(unsigned char*)"mumap", {226, 138, 184, 0}},
{(unsigned char*)"nGg", {226, 139, 153, 204, 184, 0}},
{(unsigned char*)"nGt", {226, 137, 171, 226, 131, 146, 0}},
{(unsigned char*)"nGtv", {226, 137, 171, 204, 184, 0}},
{(unsigned char*)"nLeftarrow", {226, 135, 141, 0}},
{(unsigned char*)"nLeftrightarrow", {226, 135, 142, 0}},
{(unsigned char*)"nLl", {226, 139, 152, 204, 184, 0}},
{(unsigned char*)"nLt", {226, 137, 170, 226, 131, 146, 0}},
{(unsigned char*)"nLtv", {226, 137, 170, 204, 184, 0}},
{(unsigned char*)"nRightarrow", {226, 135, 143, 0}},
{(unsigned char*)"nVDash", {226, 138, 175, 0}},
{(unsigned char*)"nVdash", {226, 138, 174, 0}},
{(unsigned char*)"nabla", {226, 136, 135, 0}},
{(unsigned char*)"nacute", {197, 132, 0}},
{(unsigned char*)"nang", {226, 136, 160, 226, 131, 146, 0}},
{(unsigned char*)"nap", {226, 137, 137, 0}},
{(unsigned char*)"napE", {226, 169, 176, 204, 184, 0}},
{(unsigned char*)"napid", {226, 137, 139, 204, 184, 0}},
{(unsigned char*)"napos", {197, 137, 0}},
{(unsigned char*)"napprox", {226, 137, 137, 0}},
{(unsigned char*)"natur", {226, 153, 174, 0}},
{(unsigned char*)"natural", {226, 153, 174, 0}},
{(unsigned char*)"naturals", {226, 132, 149, 0}},
{(unsigned char*)"nbsp", {194, 160, 0}},
{(unsigned char*)"nbump", {226, 137, 142, 204, 184, 0}},
{(unsigned char*)"nbumpe", {226, 137, 143, 204, 184, 0}},
{(unsigned char*)"ncap", {226, 169, 131, 0}},
{(unsigned char*)"ncaron", {197, 136, 0}},
{(unsigned char*)"ncedil", {197, 134, 0}},
{(unsigned char*)"ncong", {226, 137, 135, 0}},
{(unsigned char*)"ncongdot", {226, 169, 173, 204, 184, 0}},
{(unsigned char*)"ncup", {226, 169, 130, 0}},
{(unsigned char*)"ncy", {208, 189, 0}},
{(unsigned char*)"ndash", {226, 128, 147, 0}},
{(unsigned char*)"ne", {226, 137, 160, 0}},
{(unsigned char*)"neArr", {226, 135, 151, 0}},
{(unsigned char*)"nearhk", {226, 164, 164, 0}},
{(unsigned char*)"nearr", {226, 134, 151, 0}},
{(unsigned char*)"nearrow", {226, 134, 151, 0}},
{(unsigned char*)"nedot", {226, 137, 144, 204, 184, 0}},
{(unsigned char*)"nequiv", {226, 137, 162, 0}},
{(unsigned char*)"nesear", {226, 164, 168, 0}},
{(unsigned char*)"nesim", {226, 137, 130, 204, 184, 0}},
{(unsigned char*)"nexist", {226, 136, 132, 0}},
{(unsigned char*)"nexists", {226, 136, 132, 0}},
{(unsigned char*)"nfr", {240, 157, 148, 171, 0}},
{(unsigned char*)"ngE", {226, 137, 167, 204, 184, 0}},
{(unsigned char*)"nge", {226, 137, 177, 0}},
{(unsigned char*)"ngeq", {226, 137, 177, 0}},
{(unsigned char*)"ngeqq", {226, 137, 167, 204, 184, 0}},
{(unsigned char*)"ngeqslant", {226, 169, 190, 204, 184, 0}},
{(unsigned char*)"nges", {226, 169, 190, 204, 184, 0}},
{(unsigned char*)"ngsim", {226, 137, 181, 0}},
{(unsigned char*)"ngt", {226, 137, 175, 0}},
{(unsigned char*)"ngtr", {226, 137, 175, 0}},
{(unsigned char*)"nhArr", {226, 135, 142, 0}},
{(unsigned char*)"nharr", {226, 134, 174, 0}},
{(unsigned char*)"nhpar", {226, 171, 178, 0}},
{(unsigned char*)"ni", {226, 136, 139, 0}},
{(unsigned char*)"nis", {226, 139, 188, 0}},
{(unsigned char*)"nisd", {226, 139, 186, 0}},
{(unsigned char*)"niv", {226, 136, 139, 0}},
{(unsigned char*)"njcy", {209, 154, 0}},
{(unsigned char*)"nlArr", {226, 135, 141, 0}},
{(unsigned char*)"nlE", {226, 137, 166, 204, 184, 0}},
{(unsigned char*)"nlarr", {226, 134, 154, 0}},
{(unsigned char*)"nldr", {226, 128, 165, 0}},
{(unsigned char*)"nle", {226, 137, 176, 0}},
{(unsigned char*)"nleftarrow", {226, 134, 154, 0}},
{(unsigned char*)"nleftrightarrow", {226, 134, 174, 0}},
{(unsigned char*)"nleq", {226, 137, 176, 0}},
{(unsigned char*)"nleqq", {226, 137, 166, 204, 184, 0}},
{(unsigned char*)"nleqslant", {226, 169, 189, 204, 184, 0}},
{(unsigned char*)"nles", {226, 169, 189, 204, 184, 0}},
{(unsigned char*)"nless", {226, 137, 174, 0}},
{(unsigned char*)"nlsim", {226, 137, 180, 0}},
{(unsigned char*)"nlt", {226, 137, 174, 0}},
{(unsigned char*)"nltri", {226, 139, 170, 0}},
{(unsigned char*)"nltrie", {226, 139, 172, 0}},
{(unsigned char*)"nmid", {226, 136, 164, 0}},
{(unsigned char*)"nopf", {240, 157, 149, 159, 0}},
{(unsigned char*)"not", {194, 172, 0}},
{(unsigned char*)"notin", {226, 136, 137, 0}},
{(unsigned char*)"notinE", {226, 139, 185, 204, 184, 0}},
{(unsigned char*)"notindot", {226, 139, 181, 204, 184, 0}},
{(unsigned char*)"notinva", {226, 136, 137, 0}},
{(unsigned char*)"notinvb", {226, 139, 183, 0}},
{(unsigned char*)"notinvc", {226, 139, 182, 0}},
{(unsigned char*)"notni", {226, 136, 140, 0}},
{(unsigned char*)"notniva", {226, 136, 140, 0}},
{(unsigned char*)"notnivb", {226, 139, 190, 0}},
{(unsigned char*)"notnivc", {226, 139, 189, 0}},
{(unsigned char*)"npar", {226, 136, 166, 0}},
{(unsigned char*)"nparallel", {226, 136, 166, 0}},
{(unsigned char*)"nparsl", {226, 171, 189, 226, 131, 165, 0}},
{(unsigned char*)"npart", {226, 136, 130, 204, 184, 0}},
{(unsigned char*)"npolint", {226, 168, 148, 0}},
{(unsigned char*)"npr", {226, 138, 128, 0}},
{(unsigned char*)"nprcue", {226, 139, 160, 0}},
{(unsigned char*)"npre", {226, 170, 175, 204, 184, 0}},
{(unsigned char*)"nprec", {226, 138, 128, 0}},
{(unsigned char*)"npreceq", {226, 170, 175, 204, 184, 0}},
{(unsigned char*)"nrArr", {226, 135, 143, 0}},
{(unsigned char*)"nrarr", {226, 134, 155, 0}},
{(unsigned char*)"nrarrc", {226, 164, 179, 204, 184, 0}},
{(unsigned char*)"nrarrw", {226, 134, 157, 204, 184, 0}},
{(unsigned char*)"nrightarrow", {226, 134, 155, 0}},
{(unsigned char*)"nrtri", {226, 139, 171, 0}},
{(unsigned char*)"nrtrie", {226, 139, 173, 0}},
{(unsigned char*)"nsc", {226, 138, 129, 0}},
{(unsigned char*)"nsccue", {226, 139, 161, 0}},
{(unsigned char*)"nsce", {226, 170, 176, 204, 184, 0}},
{(unsigned char*)"nscr", {240, 157, 147, 131, 0}},
{(unsigned char*)"nshortmid", {226, 136, 164, 0}},
{(unsigned char*)"nshortparallel", {226, 136, 166, 0}},
{(unsigned char*)"nsim", {226, 137, 129, 0}},
{(unsigned char*)"nsime", {226, 137, 132, 0}},
{(unsigned char*)"nsimeq", {226, 137, 132, 0}},
{(unsigned char*)"nsmid", {226, 136, 164, 0}},
{(unsigned char*)"nspar", {226, 136, 166, 0}},
{(unsigned char*)"nsqsube", {226, 139, 162, 0}},
{(unsigned char*)"nsqsupe", {226, 139, 163, 0}},
{(unsigned char*)"nsub", {226, 138, 132, 0}},
{(unsigned char*)"nsubE", {226, 171, 133, 204, 184, 0}},
{(unsigned char*)"nsube", {226, 138, 136, 0}},
{(unsigned char*)"nsubset", {226, 138, 130, 226, 131, 146, 0}},
{(unsigned char*)"nsubseteq", {226, 138, 136, 0}},
{(unsigned char*)"nsubseteqq", {226, 171, 133, 204, 184, 0}},
{(unsigned char*)"nsucc", {226, 138, 129, 0}},
{(unsigned char*)"nsucceq", {226, 170, 176, 204, 184, 0}},
{(unsigned char*)"nsup", {226, 138, 133, 0}},
{(unsigned char*)"nsupE", {226, 171, 134, 204, 184, 0}},
{(unsigned char*)"nsupe", {226, 138, 137, 0}},
{(unsigned char*)"nsupset", {226, 138, 131, 226, 131, 146, 0}},
{(unsigned char*)"nsupseteq", {226, 138, 137, 0}},
{(unsigned char*)"nsupseteqq", {226, 171, 134, 204, 184, 0}},
{(unsigned char*)"ntgl", {226, 137, 185, 0}},
{(unsigned char*)"ntilde", {195, 177, 0}},
{(unsigned char*)"ntlg", {226, 137, 184, 0}},
{(unsigned char*)"ntriangleleft", {226, 139, 170, 0}},
{(unsigned char*)"ntrianglelefteq", {226, 139, 172, 0}},
{(unsigned char*)"ntriangleright", {226, 139, 171, 0}},
{(unsigned char*)"ntrianglerighteq", {226, 139, 173, 0}},
{(unsigned char*)"nu", {206, 189, 0}},
{(unsigned char*)"num", {35, 0}},
{(unsigned char*)"numero", {226, 132, 150, 0}},
{(unsigned char*)"numsp", {226, 128, 135, 0}},
{(unsigned char*)"nvDash", {226, 138, 173, 0}},
{(unsigned char*)"nvHarr", {226, 164, 132, 0}},
{(unsigned char*)"nvap", {226, 137, 141, 226, 131, 146, 0}},
{(unsigned char*)"nvdash", {226, 138, 172, 0}},
{(unsigned char*)"nvge", {226, 137, 165, 226, 131, 146, 0}},
{(unsigned char*)"nvgt", {62, 226, 131, 146, 0}},
{(unsigned char*)"nvinfin", {226, 167, 158, 0}},
{(unsigned char*)"nvlArr", {226, 164, 130, 0}},
{(unsigned char*)"nvle", {226, 137, 164, 226, 131, 146, 0}},
{(unsigned char*)"nvlt", {60, 226, 131, 146, 0}},
{(unsigned char*)"nvltrie", {226, 138, 180, 226, 131, 146, 0}},
{(unsigned char*)"nvrArr", {226, 164, 131, 0}},
{(unsigned char*)"nvrtrie", {226, 138, 181, 226, 131, 146, 0}},
{(unsigned char*)"nvsim", {226, 136, 188, 226, 131, 146, 0}},
{(unsigned char*)"nwArr", {226, 135, 150, 0}},
{(unsigned char*)"nwarhk", {226, 164, 163, 0}},
{(unsigned char*)"nwarr", {226, 134, 150, 0}},
{(unsigned char*)"nwarrow", {226, 134, 150, 0}},
{(unsigned char*)"nwnear", {226, 164, 167, 0}},
{(unsigned char*)"oS", {226, 147, 136, 0}},
{(unsigned char*)"oacute", {195, 179, 0}},
{(unsigned char*)"oast", {226, 138, 155, 0}},
{(unsigned char*)"ocir", {226, 138, 154, 0}},
{(unsigned char*)"ocirc", {195, 180, 0}},
{(unsigned char*)"ocy", {208, 190, 0}},
{(unsigned char*)"odash", {226, 138, 157, 0}},
{(unsigned char*)"odblac", {197, 145, 0}},
{(unsigned char*)"odiv", {226, 168, 184, 0}},
{(unsigned char*)"odot", {226, 138, 153, 0}},
{(unsigned char*)"odsold", {226, 166, 188, 0}},
{(unsigned char*)"oelig", {197, 147, 0}},
{(unsigned char*)"ofcir", {226, 166, 191, 0}},
{(unsigned char*)"ofr", {240, 157, 148, 172, 0}},
{(unsigned char*)"ogon", {203, 155, 0}},
{(unsigned char*)"ograve", {195, 178, 0}},
{(unsigned char*)"ogt", {226, 167, 129, 0}},
{(unsigned char*)"ohbar", {226, 166, 181, 0}},
{(unsigned char*)"ohm", {206, 169, 0}},
{(unsigned char*)"oint", {226, 136, 174, 0}},
{(unsigned char*)"olarr", {226, 134, 186, 0}},
{(unsigned char*)"olcir", {226, 166, 190, 0}},
{(unsigned char*)"olcross", {226, 166, 187, 0}},
{(unsigned char*)"oline", {226, 128, 190, 0}},
{(unsigned char*)"olt", {226, 167, 128, 0}},
{(unsigned char*)"omacr", {197, 141, 0}},
{(unsigned char*)"omega", {207, 137, 0}},
{(unsigned char*)"omicron", {206, 191, 0}},
{(unsigned char*)"omid", {226, 166, 182, 0}},
{(unsigned char*)"ominus", {226, 138, 150, 0}},
{(unsigned char*)"oopf", {240, 157, 149, 160, 0}},
{(unsigned char*)"opar", {226, 166, 183, 0}},
{(unsigned char*)"operp", {226, 166, 185, 0}},
{(unsigned char*)"oplus", {226, 138, 149, 0}},
{(unsigned char*)"or", {226, 136, 168, 0}},
{(unsigned char*)"orarr", {226, 134, 187, 0}},
{(unsigned char*)"ord", {226, 169, 157, 0}},
{(unsigned char*)"order", {226, 132, 180, 0}},
{(unsigned char*)"orderof", {226, 132, 180, 0}},
{(unsigned char*)"ordf", {194, 170, 0}},
{(unsigned char*)"ordm", {194, 186, 0}},
{(unsigned char*)"origof", {226, 138, 182, 0}},
{(unsigned char*)"oror", {226, 169, 150, 0}},
{(unsigned char*)"orslope", {226, 169, 151, 0}},
{(unsigned char*)"orv", {226, 169, 155, 0}},
{(unsigned char*)"oscr", {226, 132, 180, 0}},
{(unsigned char*)"oslash", {195, 184, 0}},
{(unsigned char*)"osol", {226, 138, 152, 0}},
{(unsigned char*)"otilde", {195, 181, 0}},
{(unsigned char*)"otimes", {226, 138, 151, 0}},
{(unsigned char*)"otimesas", {226, 168, 182, 0}},
{(unsigned char*)"ouml", {195, 182, 0}},
{(unsigned char*)"ovbar", {226, 140, 189, 0}},
{(unsigned char*)"par", {226, 136, 165, 0}},
{(unsigned char*)"para", {194, 182, 0}},
{(unsigned char*)"parallel", {226, 136, 165, 0}},
{(unsigned char*)"parsim", {226, 171, 179, 0}},
{(unsigned char*)"parsl", {226, 171, 189, 0}},
{(unsigned char*)"part", {226, 136, 130, 0}},
{(unsigned char*)"pcy", {208, 191, 0}},
{(unsigned char*)"percnt", {37, 0}},
{(unsigned char*)"period", {46, 0}},
{(unsigned char*)"permil", {226, 128, 176, 0}},
{(unsigned char*)"perp", {226, 138, 165, 0}},
{(unsigned char*)"pertenk", {226, 128, 177, 0}},
{(unsigned char*)"pfr", {240, 157, 148, 173, 0}},
{(unsigned char*)"phi", {207, 134, 0}},
{(unsigned char*)"phiv", {207, 149, 0}},
{(unsigned char*)"phmmat", {226, 132, 179, 0}},
{(unsigned char*)"phone", {226, 152, 142, 0}},
{(unsigned char*)"pi", {207, 128, 0}},
{(unsigned char*)"pitchfork", {226, 139, 148, 0}},
{(unsigned char*)"piv", {207, 150, 0}},
{(unsigned char*)"planck", {226, 132, 143, 0}},
{(unsigned char*)"planckh", {226, 132, 142, 0}},
{(unsigned char*)"plankv", {226, 132, 143, 0}},
{(unsigned char*)"plus", {43, 0}},
{(unsigned char*)"plusacir", {226, 168, 163, 0}},
{(unsigned char*)"plusb", {226, 138, 158, 0}},
{(unsigned char*)"pluscir", {226, 168, 162, 0}},
{(unsigned char*)"plusdo", {226, 136, 148, 0}},
{(unsigned char*)"plusdu", {226, 168, 165, 0}},
{(unsigned char*)"pluse", {226, 169, 178, 0}},
{(unsigned char*)"plusmn", {194, 177, 0}},
{(unsigned char*)"plussim", {226, 168, 166, 0}},
{(unsigned char*)"plustwo", {226, 168, 167, 0}},
{(unsigned char*)"pm", {194, 177, 0}},
{(unsigned char*)"pointint", {226, 168, 149, 0}},
{(unsigned char*)"popf", {240, 157, 149, 161, 0}},
{(unsigned char*)"pound", {194, 163, 0}},
{(unsigned char*)"pr", {226, 137, 186, 0}},
{(unsigned char*)"prE", {226, 170, 179, 0}},
{(unsigned char*)"prap", {226, 170, 183, 0}},
{(unsigned char*)"prcue", {226, 137, 188, 0}},
{(unsigned char*)"pre", {226, 170, 175, 0}},
{(unsigned char*)"prec", {226, 137, 186, 0}},
{(unsigned char*)"precapprox", {226, 170, 183, 0}},
{(unsigned char*)"preccurlyeq", {226, 137, 188, 0}},
{(unsigned char*)"preceq", {226, 170, 175, 0}},
{(unsigned char*)"precnapprox", {226, 170, 185, 0}},
{(unsigned char*)"precneqq", {226, 170, 181, 0}},
{(unsigned char*)"precnsim", {226, 139, 168, 0}},
{(unsigned char*)"precsim", {226, 137, 190, 0}},
{(unsigned char*)"prime", {226, 128, 178, 0}},
{(unsigned char*)"primes", {226, 132, 153, 0}},
{(unsigned char*)"prnE", {226, 170, 181, 0}},
{(unsigned char*)"prnap", {226, 170, 185, 0}},
{(unsigned char*)"prnsim", {226, 139, 168, 0}},
{(unsigned char*)"prod", {226, 136, 143, 0}},
{(unsigned char*)"profalar", {226, 140, 174, 0}},
{(unsigned char*)"profline", {226, 140, 146, 0}},
{(unsigned char*)"profsurf", {226, 140, 147, 0}},
{(unsigned char*)"prop", {226, 136, 157, 0}},
{(unsigned char*)"propto", {226, 136, 157, 0}},
{(unsigned char*)"prsim", {226, 137, 190, 0}},
{(unsigned char*)"prurel", {226, 138, 176, 0}},
{(unsigned char*)"pscr", {240, 157, 147, 133, 0}},
{(unsigned char*)"psi", {207, 136, 0}},
{(unsigned char*)"puncsp", {226, 128, 136, 0}},
{(unsigned char*)"qfr", {240, 157, 148, 174, 0}},
{(unsigned char*)"qint", {226, 168, 140, 0}},
{(unsigned char*)"qopf", {240, 157, 149, 162, 0}},
{(unsigned char*)"qprime", {226, 129, 151, 0}},
{(unsigned char*)"qscr", {240, 157, 147, 134, 0}},
{(unsigned char*)"quaternions", {226, 132, 141, 0}},
{(unsigned char*)"quatint", {226, 168, 150, 0}},
{(unsigned char*)"quest", {63, 0}},
{(unsigned char*)"questeq", {226, 137, 159, 0}},
{(unsigned char*)"quot", {34, 0}},
{(unsigned char*)"rAarr", {226, 135, 155, 0}},
{(unsigned char*)"rArr", {226, 135, 146, 0}},
{(unsigned char*)"rAtail", {226, 164, 156, 0}},
{(unsigned char*)"rBarr", {226, 164, 143, 0}},
{(unsigned char*)"rHar", {226, 165, 164, 0}},
{(unsigned char*)"race", {226, 136, 189, 204, 177, 0}},
{(unsigned char*)"racute", {197, 149, 0}},
{(unsigned char*)"radic", {226, 136, 154, 0}},
{(unsigned char*)"raemptyv", {226, 166, 179, 0}},
{(unsigned char*)"rang", {226, 159, 169, 0}},
{(unsigned char*)"rangd", {226, 166, 146, 0}},
{(unsigned char*)"range", {226, 166, 165, 0}},
{(unsigned char*)"rangle", {226, 159, 169, 0}},
{(unsigned char*)"raquo", {194, 187, 0}},
{(unsigned char*)"rarr", {226, 134, 146, 0}},
{(unsigned char*)"rarrap", {226, 165, 181, 0}},
{(unsigned char*)"rarrb", {226, 135, 165, 0}},
{(unsigned char*)"rarrbfs", {226, 164, 160, 0}},
{(unsigned char*)"rarrc", {226, 164, 179, 0}},
{(unsigned char*)"rarrfs", {226, 164, 158, 0}},
{(unsigned char*)"rarrhk", {226, 134, 170, 0}},
{(unsigned char*)"rarrlp", {226, 134, 172, 0}},
{(unsigned char*)"rarrpl", {226, 165, 133, 0}},
{(unsigned char*)"rarrsim", {226, 165, 180, 0}},
{(unsigned char*)"rarrtl", {226, 134, 163, 0}},
{(unsigned char*)"rarrw", {226, 134, 157, 0}},
{(unsigned char*)"ratail", {226, 164, 154, 0}},
{(unsigned char*)"ratio", {226, 136, 182, 0}},
{(unsigned char*)"rationals", {226, 132, 154, 0}},
{(unsigned char*)"rbarr", {226, 164, 141, 0}},
{(unsigned char*)"rbbrk", {226, 157, 179, 0}},
{(unsigned char*)"rbrace", {125, 0}},
{(unsigned char*)"rbrack", {93, 0}},
{(unsigned char*)"rbrke", {226, 166, 140, 0}},
{(unsigned char*)"rbrksld", {226, 166, 142, 0}},
{(unsigned char*)"rbrkslu", {226, 166, 144, 0}},
{(unsigned char*)"rcaron", {197, 153, 0}},
{(unsigned char*)"rcedil", {197, 151, 0}},
{(unsigned char*)"rceil", {226, 140, 137, 0}},
{(unsigned char*)"rcub", {125, 0}},
{(unsigned char*)"rcy", {209, 128, 0}},
{(unsigned char*)"rdca", {226, 164, 183, 0}},
{(unsigned char*)"rdldhar", {226, 165, 169, 0}},
{(unsigned char*)"rdquo", {226, 128, 157, 0}},
{(unsigned char*)"rdquor", {226, 128, 157, 0}},
{(unsigned char*)"rdsh", {226, 134, 179, 0}},
{(unsigned char*)"real", {226, 132, 156, 0}},
{(unsigned char*)"realine", {226, 132, 155, 0}},
{(unsigned char*)"realpart", {226, 132, 156, 0}},
{(unsigned char*)"reals", {226, 132, 157, 0}},
{(unsigned char*)"rect", {226, 150, 173, 0}},
{(unsigned char*)"reg", {194, 174, 0}},
{(unsigned char*)"rfisht", {226, 165, 189, 0}},
{(unsigned char*)"rfloor", {226, 140, 139, 0}},
{(unsigned char*)"rfr", {240, 157, 148, 175, 0}},
{(unsigned char*)"rhard", {226, 135, 129, 0}},
{(unsigned char*)"rharu", {226, 135, 128, 0}},
{(unsigned char*)"rharul", {226, 165, 172, 0}},
{(unsigned char*)"rho", {207, 129, 0}},
{(unsigned char*)"rhov", {207, 177, 0}},
{(unsigned char*)"rightarrow", {226, 134, 146, 0}},
{(unsigned char*)"rightarrowtail", {226, 134, 163, 0}},
{(unsigned char*)"rightharpoondown", {226, 135, 129, 0}},
{(unsigned char*)"rightharpoonup", {226, 135, 128, 0}},
{(unsigned char*)"rightleftarrows", {226, 135, 132, 0}},
{(unsigned char*)"rightleftharpoons", {226, 135, 140, 0}},
{(unsigned char*)"rightrightarrows", {226, 135, 137, 0}},
{(unsigned char*)"rightsquigarrow", {226, 134, 157, 0}},
{(unsigned char*)"rightthreetimes", {226, 139, 140, 0}},
{(unsigned char*)"ring", {203, 154, 0}},
{(unsigned char*)"risingdotseq", {226, 137, 147, 0}},
{(unsigned char*)"rlarr", {226, 135, 132, 0}},
{(unsigned char*)"rlhar", {226, 135, 140, 0}},
{(unsigned char*)"rlm", {226, 128, 143, 0}},
{(unsigned char*)"rmoust", {226, 142, 177, 0}},
{(unsigned char*)"rmoustache", {226, 142, 177, 0}},
{(unsigned char*)"rnmid", {226, 171, 174, 0}},
{(unsigned char*)"roang", {226, 159, 173, 0}},
{(unsigned char*)"roarr", {226, 135, 190, 0}},
{(unsigned char*)"robrk", {226, 159, 167, 0}},
{(unsigned char*)"ropar", {226, 166, 134, 0}},
{(unsigned char*)"ropf", {240, 157, 149, 163, 0}},
{(unsigned char*)"roplus", {226, 168, 174, 0}},
{(unsigned char*)"rotimes", {226, 168, 181, 0}},
{(unsigned char*)"rpar", {41, 0}},
{(unsigned char*)"rpargt", {226, 166, 148, 0}},
{(unsigned char*)"rppolint", {226, 168, 146, 0}},
{(unsigned char*)"rrarr", {226, 135, 137, 0}},
{(unsigned char*)"rsaquo", {226, 128, 186, 0}},
{(unsigned char*)"rscr", {240, 157, 147, 135, 0}},
{(unsigned char*)"rsh", {226, 134, 177, 0}},
{(unsigned char*)"rsqb", {93, 0}},
{(unsigned char*)"rsquo", {226, 128, 153, 0}},
{(unsigned char*)"rsquor", {226, 128, 153, 0}},
{(unsigned char*)"rthree", {226, 139, 140, 0}},
{(unsigned char*)"rtimes", {226, 139, 138, 0}},
{(unsigned char*)"rtri", {226, 150, 185, 0}},
{(unsigned char*)"rtrie", {226, 138, 181, 0}},
{(unsigned char*)"rtrif", {226, 150, 184, 0}},
{(unsigned char*)"rtriltri", {226, 167, 142, 0}},
{(unsigned char*)"ruluhar", {226, 165, 168, 0}},
{(unsigned char*)"rx", {226, 132, 158, 0}},
{(unsigned char*)"sacute", {197, 155, 0}},
{(unsigned char*)"sbquo", {226, 128, 154, 0}},
{(unsigned char*)"sc", {226, 137, 187, 0}},
{(unsigned char*)"scE", {226, 170, 180, 0}},
{(unsigned char*)"scap", {226, 170, 184, 0}},
{(unsigned char*)"scaron", {197, 161, 0}},
{(unsigned char*)"sccue", {226, 137, 189, 0}},
{(unsigned char*)"sce", {226, 170, 176, 0}},
{(unsigned char*)"scedil", {197, 159, 0}},
{(unsigned char*)"scirc", {197, 157, 0}},
{(unsigned char*)"scnE", {226, 170, 182, 0}},
{(unsigned char*)"scnap", {226, 170, 186, 0}},
{(unsigned char*)"scnsim", {226, 139, 169, 0}},
{(unsigned char*)"scpolint", {226, 168, 147, 0}},
{(unsigned char*)"scsim", {226, 137, 191, 0}},
{(unsigned char*)"scy", {209, 129, 0}},
{(unsigned char*)"sdot", {226, 139, 133, 0}},
{(unsigned char*)"sdotb", {226, 138, 161, 0}},
{(unsigned char*)"sdote", {226, 169, 166, 0}},
{(unsigned char*)"seArr", {226, 135, 152, 0}},
{(unsigned char*)"searhk", {226, 164, 165, 0}},
{(unsigned char*)"searr", {226, 134, 152, 0}},
{(unsigned char*)"searrow", {226, 134, 152, 0}},
{(unsigned char*)"sect", {194, 167, 0}},
{(unsigned char*)"semi", {59, 0}},
{(unsigned char*)"seswar", {226, 164, 169, 0}},
{(unsigned char*)"setminus", {226, 136, 150, 0}},
{(unsigned char*)"setmn", {226, 136, 150, 0}},
{(unsigned char*)"sext", {226, 156, 182, 0}},
{(unsigned char*)"sfr", {240, 157, 148, 176, 0}},
{(unsigned char*)"sfrown", {226, 140, 162, 0}},
{(unsigned char*)"sharp", {226, 153, 175, 0}},
{(unsigned char*)"shchcy", {209, 137, 0}},
{(unsigned char*)"shcy", {209, 136, 0}},
{(unsigned char*)"shortmid", {226, 136, 163, 0}},
{(unsigned char*)"shortparallel", {226, 136, 165, 0}},
{(unsigned char*)"shy", {194, 173, 0}},
{(unsigned char*)"sigma", {207, 131, 0}},
{(unsigned char*)"sigmaf", {207, 130, 0}},
{(unsigned char*)"sigmav", {207, 130, 0}},
{(unsigned char*)"sim", {226, 136, 188, 0}},
{(unsigned char*)"simdot", {226, 169, 170, 0}},
{(unsigned char*)"sime", {226, 137, 131, 0}},
{(unsigned char*)"simeq", {226, 137, 131, 0}},
{(unsigned char*)"simg", {226, 170, 158, 0}},
{(unsigned char*)"simgE", {226, 170, 160, 0}},
{(unsigned char*)"siml", {226, 170, 157, 0}},
{(unsigned char*)"simlE", {226, 170, 159, 0}},
{(unsigned char*)"simne", {226, 137, 134, 0}},
{(unsigned char*)"simplus", {226, 168, 164, 0}},
{(unsigned char*)"simrarr", {226, 165, 178, 0}},
{(unsigned char*)"slarr", {226, 134, 144, 0}},
{(unsigned char*)"smallsetminus", {226, 136, 150, 0}},
{(unsigned char*)"smashp", {226, 168, 179, 0}},
{(unsigned char*)"smeparsl", {226, 167, 164, 0}},
{(unsigned char*)"smid", {226, 136, 163, 0}},
{(unsigned char*)"smile", {226, 140, 163, 0}},
{(unsigned char*)"smt", {226, 170, 170, 0}},
{(unsigned char*)"smte", {226, 170, 172, 0}},
{(unsigned char*)"smtes", {226, 170, 172, 239, 184, 128, 0}},
{(unsigned char*)"softcy", {209, 140, 0}},
{(unsigned char*)"sol", {47, 0}},
{(unsigned char*)"solb", {226, 167, 132, 0}},
{(unsigned char*)"solbar", {226, 140, 191, 0}},
{(unsigned char*)"sopf", {240, 157, 149, 164, 0}},
{(unsigned char*)"spades", {226, 153, 160, 0}},
{(unsigned char*)"spadesuit", {226, 153, 160, 0}},
{(unsigned char*)"spar", {226, 136, 165, 0}},
{(unsigned char*)"sqcap", {226, 138, 147, 0}},
{(unsigned char*)"sqcaps", {226, 138, 147, 239, 184, 128, 0}},
{(unsigned char*)"sqcup", {226, 138, 148, 0}},
{(unsigned char*)"sqcups", {226, 138, 148, 239, 184, 128, 0}},
{(unsigned char*)"sqsub", {226, 138, 143, 0}},
{(unsigned char*)"sqsube", {226, 138, 145, 0}},
{(unsigned char*)"sqsubset", {226, 138, 143, 0}},
{(unsigned char*)"sqsubseteq", {226, 138, 145, 0}},
{(unsigned char*)"sqsup", {226, 138, 144, 0}},
{(unsigned char*)"sqsupe", {226, 138, 146, 0}},
{(unsigned char*)"sqsupset", {226, 138, 144, 0}},
{(unsigned char*)"sqsupseteq", {226, 138, 146, 0}},
{(unsigned char*)"squ", {226, 150, 161, 0}},
{(unsigned char*)"square", {226, 150, 161, 0}},
{(unsigned char*)"squarf", {226, 150, 170, 0}},
{(unsigned char*)"squf", {226, 150, 170, 0}},
{(unsigned char*)"srarr", {226, 134, 146, 0}},
{(unsigned char*)"sscr", {240, 157, 147, 136, 0}},
{(unsigned char*)"ssetmn", {226, 136, 150, 0}},
{(unsigned char*)"ssmile", {226, 140, 163, 0}},
{(unsigned char*)"sstarf", {226, 139, 134, 0}},
{(unsigned char*)"star", {226, 152, 134, 0}},
{(unsigned char*)"starf", {226, 152, 133, 0}},
{(unsigned char*)"straightepsilon", {207, 181, 0}},
{(unsigned char*)"straightphi", {207, 149, 0}},
{(unsigned char*)"strns", {194, 175, 0}},
{(unsigned char*)"sub", {226, 138, 130, 0}},
{(unsigned char*)"subE", {226, 171, 133, 0}},
{(unsigned char*)"subdot", {226, 170, 189, 0}},
{(unsigned char*)"sube", {226, 138, 134, 0}},
{(unsigned char*)"subedot", {226, 171, 131, 0}},
{(unsigned char*)"submult", {226, 171, 129, 0}},
{(unsigned char*)"subnE", {226, 171, 139, 0}},
{(unsigned char*)"subne", {226, 138, 138, 0}},
{(unsigned char*)"subplus", {226, 170, 191, 0}},
{(unsigned char*)"subrarr", {226, 165, 185, 0}},
{(unsigned char*)"subset", {226, 138, 130, 0}},
{(unsigned char*)"subseteq", {226, 138, 134, 0}},
{(unsigned char*)"subseteqq", {226, 171, 133, 0}},
{(unsigned char*)"subsetneq", {226, 138, 138, 0}},
{(unsigned char*)"subsetneqq", {226, 171, 139, 0}},
{(unsigned char*)"subsim", {226, 171, 135, 0}},
{(unsigned char*)"subsub", {226, 171, 149, 0}},
{(unsigned char*)"subsup", {226, 171, 147, 0}},
{(unsigned char*)"succ", {226, 137, 187, 0}},
{(unsigned char*)"succapprox", {226, 170, 184, 0}},
{(unsigned char*)"succcurlyeq", {226, 137, 189, 0}},
{(unsigned char*)"succeq", {226, 170, 176, 0}},
{(unsigned char*)"succnapprox", {226, 170, 186, 0}},
{(unsigned char*)"succneqq", {226, 170, 182, 0}},
{(unsigned char*)"succnsim", {226, 139, 169, 0}},
{(unsigned char*)"succsim", {226, 137, 191, 0}},
{(unsigned char*)"sum", {226, 136, 145, 0}},
{(unsigned char*)"sung", {226, 153, 170, 0}},
{(unsigned char*)"sup", {226, 138, 131, 0}},
{(unsigned char*)"sup1", {194, 185, 0}},
{(unsigned char*)"sup2", {194, 178, 0}},
{(unsigned char*)"sup3", {194, 179, 0}},
{(unsigned char*)"supE", {226, 171, 134, 0}},
{(unsigned char*)"supdot", {226, 170, 190, 0}},
{(unsigned char*)"supdsub", {226, 171, 152, 0}},
{(unsigned char*)"supe", {226, 138, 135, 0}},
{(unsigned char*)"supedot", {226, 171, 132, 0}},
{(unsigned char*)"suphsol", {226, 159, 137, 0}},
{(unsigned char*)"suphsub", {226, 171, 151, 0}},
{(unsigned char*)"suplarr", {226, 165, 187, 0}},
{(unsigned char*)"supmult", {226, 171, 130, 0}},
{(unsigned char*)"supnE", {226, 171, 140, 0}},
{(unsigned char*)"supne", {226, 138, 139, 0}},
{(unsigned char*)"supplus", {226, 171, 128, 0}},
{(unsigned char*)"supset", {226, 138, 131, 0}},
{(unsigned char*)"supseteq", {226, 138, 135, 0}},
{(unsigned char*)"supseteqq", {226, 171, 134, 0}},
{(unsigned char*)"supsetneq", {226, 138, 139, 0}},
{(unsigned char*)"supsetneqq", {226, 171, 140, 0}},
{(unsigned char*)"supsim", {226, 171, 136, 0}},
{(unsigned char*)"supsub", {226, 171, 148, 0}},
{(unsigned char*)"supsup", {226, 171, 150, 0}},
{(unsigned char*)"swArr", {226, 135, 153, 0}},
{(unsigned char*)"swarhk", {226, 164, 166, 0}},
{(unsigned char*)"swarr", {226, 134, 153, 0}},
{(unsigned char*)"swarrow", {226, 134, 153, 0}},
{(unsigned char*)"swnwar", {226, 164, 170, 0}},
{(unsigned char*)"szlig", {195, 159, 0}},
{(unsigned char*)"target", {226, 140, 150, 0}},
{(unsigned char*)"tau", {207, 132, 0}},
{(unsigned char*)"tbrk", {226, 142, 180, 0}},
{(unsigned char*)"tcaron", {197, 165, 0}},
{(unsigned char*)"tcedil", {197, 163, 0}},
{(unsigned char*)"tcy", {209, 130, 0}},
{(unsigned char*)"tdot", {226, 131, 155, 0}},
{(unsigned char*)"telrec", {226, 140, 149, 0}},
{(unsigned char*)"tfr", {240, 157, 148, 177, 0}},
{(unsigned char*)"there4", {226, 136, 180, 0}},
{(unsigned char*)"therefore", {226, 136, 180, 0}},
{(unsigned char*)"theta", {206, 184, 0}},
{(unsigned char*)"thetasym", {207, 145, 0}},
{(unsigned char*)"thetav", {207, 145, 0}},
{(unsigned char*)"thickapprox", {226, 137, 136, 0}},
{(unsigned char*)"thicksim", {226, 136, 188, 0}},
{(unsigned char*)"thinsp", {226, 128, 137, 0}},
{(unsigned char*)"thkap", {226, 137, 136, 0}},
{(unsigned char*)"thksim", {226, 136, 188, 0}},
{(unsigned char*)"thorn", {195, 190, 0}},
{(unsigned char*)"tilde", {203, 156, 0}},
{(unsigned char*)"times", {195, 151, 0}},
{(unsigned char*)"timesb", {226, 138, 160, 0}},
{(unsigned char*)"timesbar", {226, 168, 177, 0}},
{(unsigned char*)"timesd", {226, 168, 176, 0}},
{(unsigned char*)"tint", {226, 136, 173, 0}},
{(unsigned char*)"toea", {226, 164, 168, 0}},
{(unsigned char*)"top", {226, 138, 164, 0}},
{(unsigned char*)"topbot", {226, 140, 182, 0}},
{(unsigned char*)"topcir", {226, 171, 177, 0}},
{(unsigned char*)"topf", {240, 157, 149, 165, 0}},
{(unsigned char*)"topfork", {226, 171, 154, 0}},
{(unsigned char*)"tosa", {226, 164, 169, 0}},
{(unsigned char*)"tprime", {226, 128, 180, 0}},
{(unsigned char*)"trade", {226, 132, 162, 0}},
{(unsigned char*)"triangle", {226, 150, 181, 0}},
{(unsigned char*)"triangledown", {226, 150, 191, 0}},
{(unsigned char*)"triangleleft", {226, 151, 131, 0}},
{(unsigned char*)"trianglelefteq", {226, 138, 180, 0}},
{(unsigned char*)"triangleq", {226, 137, 156, 0}},
{(unsigned char*)"triangleright", {226, 150, 185, 0}},
{(unsigned char*)"trianglerighteq", {226, 138, 181, 0}},
{(unsigned char*)"tridot", {226, 151, 172, 0}},
{(unsigned char*)"trie", {226, 137, 156, 0}},
{(unsigned char*)"triminus", {226, 168, 186, 0}},
{(unsigned char*)"triplus", {226, 168, 185, 0}},
{(unsigned char*)"trisb", {226, 167, 141, 0}},
{(unsigned char*)"tritime", {226, 168, 187, 0}},
{(unsigned char*)"trpezium", {226, 143, 162, 0}},
{(unsigned char*)"tscr", {240, 157, 147, 137, 0}},
{(unsigned char*)"tscy", {209, 134, 0}},
{(unsigned char*)"tshcy", {209, 155, 0}},
{(unsigned char*)"tstrok", {197, 167, 0}},
{(unsigned char*)"twixt", {226, 137, 172, 0}},
{(unsigned char*)"twoheadleftarrow", {226, 134, 158, 0}},
{(unsigned char*)"twoheadrightarrow", {226, 134, 160, 0}},
{(unsigned char*)"uArr", {226, 135, 145, 0}},
{(unsigned char*)"uHar", {226, 165, 163, 0}},
{(unsigned char*)"uacute", {195, 186, 0}},
{(unsigned char*)"uarr", {226, 134, 145, 0}},
{(unsigned char*)"ubrcy", {209, 158, 0}},
{(unsigned char*)"ubreve", {197, 173, 0}},
{(unsigned char*)"ucirc", {195, 187, 0}},
{(unsigned char*)"ucy", {209, 131, 0}},
{(unsigned char*)"udarr", {226, 135, 133, 0}},
{(unsigned char*)"udblac", {197, 177, 0}},
{(unsigned char*)"udhar", {226, 165, 174, 0}},
{(unsigned char*)"ufisht", {226, 165, 190, 0}},
{(unsigned char*)"ufr", {240, 157, 148, 178, 0}},
{(unsigned char*)"ugrave", {195, 185, 0}},
{(unsigned char*)"uharl", {226, 134, 191, 0}},
{(unsigned char*)"uharr", {226, 134, 190, 0}},
{(unsigned char*)"uhblk", {226, 150, 128, 0}},
{(unsigned char*)"ulcorn", {226, 140, 156, 0}},
{(unsigned char*)"ulcorner", {226, 140, 156, 0}},
{(unsigned char*)"ulcrop", {226, 140, 143, 0}},
{(unsigned char*)"ultri", {226, 151, 184, 0}},
{(unsigned char*)"umacr", {197, 171, 0}},
{(unsigned char*)"uml", {194, 168, 0}},
{(unsigned char*)"uogon", {197, 179, 0}},
{(unsigned char*)"uopf", {240, 157, 149, 166, 0}},
{(unsigned char*)"uparrow", {226, 134, 145, 0}},
{(unsigned char*)"updownarrow", {226, 134, 149, 0}},
{(unsigned char*)"upharpoonleft", {226, 134, 191, 0}},
{(unsigned char*)"upharpoonright", {226, 134, 190, 0}},
{(unsigned char*)"uplus", {226, 138, 142, 0}},
{(unsigned char*)"upsi", {207, 133, 0}},
{(unsigned char*)"upsih", {207, 146, 0}},
{(unsigned char*)"upsilon", {207, 133, 0}},
{(unsigned char*)"upuparrows", {226, 135, 136, 0}},
{(unsigned char*)"urcorn", {226, 140, 157, 0}},
{(unsigned char*)"urcorner", {226, 140, 157, 0}},
{(unsigned char*)"urcrop", {226, 140, 142, 0}},
{(unsigned char*)"uring", {197, 175, 0}},
{(unsigned char*)"urtri", {226, 151, 185, 0}},
{(unsigned char*)"uscr", {240, 157, 147, 138, 0}},
{(unsigned char*)"utdot", {226, 139, 176, 0}},
{(unsigned char*)"utilde", {197, 169, 0}},
{(unsigned char*)"utri", {226, 150, 181, 0}},
{(unsigned char*)"utrif", {226, 150, 180, 0}},
{(unsigned char*)"uuarr", {226, 135, 136, 0}},
{(unsigned char*)"uuml", {195, 188, 0}},
{(unsigned char*)"uwangle", {226, 166, 167, 0}},
{(unsigned char*)"vArr", {226, 135, 149, 0}},
{(unsigned char*)"vBar", {226, 171, 168, 0}},
{(unsigned char*)"vBarv", {226, 171, 169, 0}},
{(unsigned char*)"vDash", {226, 138, 168, 0}},
{(unsigned char*)"vangrt", {226, 166, 156, 0}},
{(unsigned char*)"varepsilon", {207, 181, 0}},
{(unsigned char*)"varkappa", {207, 176, 0}},
{(unsigned char*)"varnothing", {226, 136, 133, 0}},
{(unsigned char*)"varphi", {207, 149, 0}},
{(unsigned char*)"varpi", {207, 150, 0}},
{(unsigned char*)"varpropto", {226, 136, 157, 0}},
{(unsigned char*)"varr", {226, 134, 149, 0}},
{(unsigned char*)"varrho", {207, 177, 0}},
{(unsigned char*)"varsigma", {207, 130, 0}},
{(unsigned char*)"varsubsetneq", {226, 138, 138, 239, 184, 128, 0}},
{(unsigned char*)"varsubsetneqq", {226, 171, 139, 239, 184, 128, 0}},
{(unsigned char*)"varsupsetneq", {226, 138, 139, 239, 184, 128, 0}},
{(unsigned char*)"varsupsetneqq", {226, 171, 140, 239, 184, 128, 0}},
{(unsigned char*)"vartheta", {207, 145, 0}},
{(unsigned char*)"vartriangleleft", {226, 138, 178, 0}},
{(unsigned char*)"vartriangleright", {226, 138, 179, 0}},
{(unsigned char*)"vcy", {208, 178, 0}},
{(unsigned char*)"vdash", {226, 138, 162, 0}},
{(unsigned char*)"vee", {226, 136, 168, 0}},
{(unsigned char*)"veebar", {226, 138, 187, 0}},
{(unsigned char*)"veeeq", {226, 137, 154, 0}},
{(unsigned char*)"vellip", {226, 139, 174, 0}},
{(unsigned char*)"verbar", {124, 0}},
{(unsigned char*)"vert", {124, 0}},
{(unsigned char*)"vfr", {240, 157, 148, 179, 0}},
{(unsigned char*)"vltri", {226, 138, 178, 0}},
{(unsigned char*)"vnsub", {226, 138, 130, 226, 131, 146, 0}},
{(unsigned char*)"vnsup", {226, 138, 131, 226, 131, 146, 0}},
{(unsigned char*)"vopf", {240, 157, 149, 167, 0}},
{(unsigned char*)"vprop", {226, 136, 157, 0}},
{(unsigned char*)"vrtri", {226, 138, 179, 0}},
{(unsigned char*)"vscr", {240, 157, 147, 139, 0}},
{(unsigned char*)"vsubnE", {226, 171, 139, 239, 184, 128, 0}},
{(unsigned char*)"vsubne", {226, 138, 138, 239, 184, 128, 0}},
{(unsigned char*)"vsupnE", {226, 171, 140, 239, 184, 128, 0}},
{(unsigned char*)"vsupne", {226, 138, 139, 239, 184, 128, 0}},
{(unsigned char*)"vzigzag", {226, 166, 154, 0}},
{(unsigned char*)"wcirc", {197, 181, 0}},
{(unsigned char*)"wedbar", {226, 169, 159, 0}},
{(unsigned char*)"wedge", {226, 136, 167, 0}},
{(unsigned char*)"wedgeq", {226, 137, 153, 0}},
{(unsigned char*)"weierp", {226, 132, 152, 0}},
{(unsigned char*)"wfr", {240, 157, 148, 180, 0}},
{(unsigned char*)"wopf", {240, 157, 149, 168, 0}},
{(unsigned char*)"wp", {226, 132, 152, 0}},
{(unsigned char*)"wr", {226, 137, 128, 0}},
{(unsigned char*)"wreath", {226, 137, 128, 0}},
{(unsigned char*)"wscr", {240, 157, 147, 140, 0}},
{(unsigned char*)"xcap", {226, 139, 130, 0}},
{(unsigned char*)"xcirc", {226, 151, 175, 0}},
{(unsigned char*)"xcup", {226, 139, 131, 0}},
{(unsigned char*)"xdtri", {226, 150, 189, 0}},
{(unsigned char*)"xfr", {240, 157, 148, 181, 0}},
{(unsigned char*)"xhArr", {226, 159, 186, 0}},
{(unsigned char*)"xharr", {226, 159, 183, 0}},
{(unsigned char*)"xi", {206, 190, 0}},
{(unsigned char*)"xlArr", {226, 159, 184, 0}},
{(unsigned char*)"xlarr", {226, 159, 181, 0}},
{(unsigned char*)"xmap", {226, 159, 188, 0}},
{(unsigned char*)"xnis", {226, 139, 187, 0}},
{(unsigned char*)"xodot", {226, 168, 128, 0}},
{(unsigned char*)"xopf", {240, 157, 149, 169, 0}},
{(unsigned char*)"xoplus", {226, 168, 129, 0}},
{(unsigned char*)"xotime", {226, 168, 130, 0}},
{(unsigned char*)"xrArr", {226, 159, 185, 0}},
{(unsigned char*)"xrarr", {226, 159, 182, 0}},
{(unsigned char*)"xscr", {240, 157, 147, 141, 0}},
{(unsigned char*)"xsqcup", {226, 168, 134, 0}},
{(unsigned char*)"xuplus", {226, 168, 132, 0}},
{(unsigned char*)"xutri", {226, 150, 179, 0}},
{(unsigned char*)"xvee", {226, 139, 129, 0}},
{(unsigned char*)"xwedge", {226, 139, 128, 0}},
{(unsigned char*)"yacute", {195, 189, 0}},
{(unsigned char*)"yacy", {209, 143, 0}},
{(unsigned char*)"ycirc", {197, 183, 0}},
{(unsigned char*)"ycy", {209, 139, 0}},
{(unsigned char*)"yen", {194, 165, 0}},
{(unsigned char*)"yfr", {240, 157, 148, 182, 0}},
{(unsigned char*)"yicy", {209, 151, 0}},
{(unsigned char*)"yopf", {240, 157, 149, 170, 0}},
{(unsigned char*)"yscr", {240, 157, 147, 142, 0}},
{(unsigned char*)"yucy", {209, 142, 0}},
{(unsigned char*)"yuml", {195, 191, 0}},
{(unsigned char*)"zacute", {197, 186, 0}},
{(unsigned char*)"zcaron", {197, 190, 0}},
{(unsigned char*)"zcy", {208, 183, 0}},
{(unsigned char*)"zdot", {197, 188, 0}},
{(unsigned char*)"zeetrf", {226, 132, 168, 0}},
{(unsigned char*)"zeta", {206, 182, 0}},
{(unsigned char*)"zfr", {240, 157, 148, 183, 0}},
{(unsigned char*)"zhcy", {208, 182, 0}},
{(unsigned char*)"zigrarr", {226, 135, 157, 0}},
{(unsigned char*)"zopf", {240, 157, 149, 171, 0}},
{(unsigned char*)"zscr", {240, 157, 147, 143, 0}},
{(unsigned char*)"zwj", {226, 128, 141, 0}},
{(unsigned char*)"zwnj", {226, 128, 140, 0}},
};
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/statistics.py | ## Module statistics.py
##
## Copyright (c) 2013 Steven D'Aprano <[email protected]>.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
"""
Basic statistics module.
This module provides functions for calculating statistics of data, including
averages, variance, and standard deviation.
Calculating averages
--------------------
================== =============================================
Function Description
================== =============================================
mean Arithmetic mean (average) of data.
median Median (middle value) of data.
median_low Low median of data.
median_high High median of data.
median_grouped Median, or 50th percentile, of grouped data.
mode Mode (most common value) of data.
================== =============================================
Calculate the arithmetic mean ("the average") of data:
>>> mean([-1.0, 2.5, 3.25, 5.75])
2.625
Calculate the standard median of discrete data:
>>> median([2, 3, 4, 5])
3.5
Calculate the median, or 50th percentile, of data grouped into class intervals
centred on the data values provided. E.g. if your data points are rounded to
the nearest whole number:
>>> median_grouped([2, 2, 3, 3, 3, 4]) #doctest: +ELLIPSIS
2.8333333333...
This should be interpreted in this way: you have two data points in the class
interval 1.5-2.5, three data points in the class interval 2.5-3.5, and one in
the class interval 3.5-4.5. The median of these data points is 2.8333...
Calculating variability or spread
---------------------------------
================== =============================================
Function Description
================== =============================================
pvariance Population variance of data.
variance Sample variance of data.
pstdev Population standard deviation of data.
stdev Sample standard deviation of data.
================== =============================================
Calculate the standard deviation of sample data:
>>> stdev([2.5, 3.25, 5.5, 11.25, 11.75]) #doctest: +ELLIPSIS
4.38961843444...
If you have previously calculated the mean, you can pass it as the optional
second argument to the four "spread" functions to avoid recalculating it:
>>> data = [1, 2, 2, 4, 4, 4, 5, 6]
>>> mu = mean(data)
>>> pvariance(data, mu)
2.5
Exceptions
----------
A single exception is defined: StatisticsError is a subclass of ValueError.
"""
__all__ = [ 'StatisticsError',
'pstdev', 'pvariance', 'stdev', 'variance',
'median', 'median_low', 'median_high', 'median_grouped',
'mean', 'mode',
]
import collections
import math
from fractions import Fraction
from decimal import Decimal
# === Exceptions ===
class StatisticsError(ValueError):
pass
# === Private utilities ===
def _sum(data, start=0):
"""_sum(data [, start]) -> value
Return a high-precision sum of the given numeric data. If optional
argument ``start`` is given, it is added to the total. If ``data`` is
empty, ``start`` (defaulting to 0) is returned.
Examples
--------
>>> _sum([3, 2.25, 4.5, -0.5, 1.0], 0.75)
11.0
Some sources of round-off error will be avoided:
>>> _sum([1e50, 1, -1e50] * 1000) # Built-in sum returns zero.
1000.0
Fractions and Decimals are also supported:
>>> from fractions import Fraction as F
>>> _sum([F(2, 3), F(7, 5), F(1, 4), F(5, 6)])
Fraction(63, 20)
>>> from decimal import Decimal as D
>>> data = [D("0.1375"), D("0.2108"), D("0.3061"), D("0.0419")]
>>> _sum(data)
Decimal('0.6963')
Mixed types are currently treated as an error, except that int is
allowed.
"""
# We fail as soon as we reach a value that is not an int or the type of
# the first value which is not an int. E.g. _sum([int, int, float, int])
# is okay, but sum([int, int, float, Fraction]) is not.
allowed_types = set([int, type(start)])
n, d = _exact_ratio(start)
partials = {d: n} # map {denominator: sum of numerators}
# Micro-optimizations.
exact_ratio = _exact_ratio
partials_get = partials.get
# Add numerators for each denominator.
for x in data:
_check_type(type(x), allowed_types)
n, d = exact_ratio(x)
partials[d] = partials_get(d, 0) + n
# Find the expected result type. If allowed_types has only one item, it
# will be int; if it has two, use the one which isn't int.
assert len(allowed_types) in (1, 2)
if len(allowed_types) == 1:
assert allowed_types.pop() is int
T = int
else:
T = (allowed_types - set([int])).pop()
if None in partials:
assert issubclass(T, (float, Decimal))
assert not math.isfinite(partials[None])
return T(partials[None])
total = Fraction()
for d, n in sorted(partials.items()):
total += Fraction(n, d)
if issubclass(T, int):
assert total.denominator == 1
return T(total.numerator)
if issubclass(T, Decimal):
return T(total.numerator)/total.denominator
return T(total)
def _check_type(T, allowed):
if T not in allowed:
if len(allowed) == 1:
allowed.add(T)
else:
types = ', '.join([t.__name__ for t in allowed] + [T.__name__])
raise TypeError("unsupported mixed types: %s" % types)
def _exact_ratio(x):
"""Convert Real number x exactly to (numerator, denominator) pair.
>>> _exact_ratio(0.25)
(1, 4)
x is expected to be an int, Fraction, Decimal or float.
"""
try:
try:
# int, Fraction
return (x.numerator, x.denominator)
except AttributeError:
# float
try:
return x.as_integer_ratio()
except AttributeError:
# Decimal
try:
return _decimal_to_ratio(x)
except AttributeError:
msg = "can't convert type '{}' to numerator/denominator"
raise TypeError(msg.format(type(x).__name__)) from None
except (OverflowError, ValueError):
# INF or NAN
if __debug__:
# Decimal signalling NANs cannot be converted to float :-(
if isinstance(x, Decimal):
assert not x.is_finite()
else:
assert not math.isfinite(x)
return (x, None)
# FIXME This is faster than Fraction.from_decimal, but still too slow.
def _decimal_to_ratio(d):
"""Convert Decimal d to exact integer ratio (numerator, denominator).
>>> from decimal import Decimal
>>> _decimal_to_ratio(Decimal("2.6"))
(26, 10)
"""
sign, digits, exp = d.as_tuple()
if exp in ('F', 'n', 'N'): # INF, NAN, sNAN
assert not d.is_finite()
raise ValueError
num = 0
for digit in digits:
num = num*10 + digit
if exp < 0:
den = 10**-exp
else:
num *= 10**exp
den = 1
if sign:
num = -num
return (num, den)
def _counts(data):
# Generate a table of sorted (value, frequency) pairs.
table = collections.Counter(iter(data)).most_common()
if not table:
return table
# Extract the values with the highest frequency.
maxfreq = table[0][1]
for i in range(1, len(table)):
if table[i][1] != maxfreq:
table = table[:i]
break
return table
# === Measures of central tendency (averages) ===
def mean(data):
"""Return the sample arithmetic mean of data.
>>> mean([1, 2, 3, 4, 4])
2.8
>>> from fractions import Fraction as F
>>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)])
Fraction(13, 21)
>>> from decimal import Decimal as D
>>> mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")])
Decimal('0.5625')
If ``data`` is empty, StatisticsError will be raised.
"""
if iter(data) is data:
data = list(data)
n = len(data)
if n < 1:
raise StatisticsError('mean requires at least one data point')
return _sum(data)/n
# FIXME: investigate ways to calculate medians without sorting? Quickselect?
def median(data):
"""Return the median (middle value) of numeric data.
When the number of data points is odd, return the middle data point.
When the number of data points is even, the median is interpolated by
taking the average of the two middle values:
>>> median([1, 3, 5])
3
>>> median([1, 3, 5, 7])
4.0
"""
data = sorted(data)
n = len(data)
if n == 0:
raise StatisticsError("no median for empty data")
if n%2 == 1:
return data[n//2]
else:
i = n//2
return (data[i - 1] + data[i])/2
def median_low(data):
"""Return the low median of numeric data.
When the number of data points is odd, the middle value is returned.
When it is even, the smaller of the two middle values is returned.
>>> median_low([1, 3, 5])
3
>>> median_low([1, 3, 5, 7])
3
"""
data = sorted(data)
n = len(data)
if n == 0:
raise StatisticsError("no median for empty data")
if n%2 == 1:
return data[n//2]
else:
return data[n//2 - 1]
def median_high(data):
"""Return the high median of data.
When the number of data points is odd, the middle value is returned.
When it is even, the larger of the two middle values is returned.
>>> median_high([1, 3, 5])
3
>>> median_high([1, 3, 5, 7])
5
"""
data = sorted(data)
n = len(data)
if n == 0:
raise StatisticsError("no median for empty data")
return data[n//2]
def median_grouped(data, interval=1):
""""Return the 50th percentile (median) of grouped continuous data.
>>> median_grouped([1, 2, 2, 3, 4, 4, 4, 4, 4, 5])
3.7
>>> median_grouped([52, 52, 53, 54])
52.5
This calculates the median as the 50th percentile, and should be
used when your data is continuous and grouped. In the above example,
the values 1, 2, 3, etc. actually represent the midpoint of classes
0.5-1.5, 1.5-2.5, 2.5-3.5, etc. The middle value falls somewhere in
class 3.5-4.5, and interpolation is used to estimate it.
Optional argument ``interval`` represents the class interval, and
defaults to 1. Changing the class interval naturally will change the
interpolated 50th percentile value:
>>> median_grouped([1, 3, 3, 5, 7], interval=1)
3.25
>>> median_grouped([1, 3, 3, 5, 7], interval=2)
3.5
This function does not check whether the data points are at least
``interval`` apart.
"""
data = sorted(data)
n = len(data)
if n == 0:
raise StatisticsError("no median for empty data")
elif n == 1:
return data[0]
# Find the value at the midpoint. Remember this corresponds to the
# centre of the class interval.
x = data[n//2]
for obj in (x, interval):
if isinstance(obj, (str, bytes)):
raise TypeError('expected number but got %r' % obj)
try:
L = x - interval/2 # The lower limit of the median interval.
except TypeError:
# Mixed type. For now we just coerce to float.
L = float(x) - float(interval)/2
cf = data.index(x) # Number of values below the median interval.
# FIXME The following line could be more efficient for big lists.
f = data.count(x) # Number of data points in the median interval.
return L + interval*(n/2 - cf)/f
def mode(data):
"""Return the most common data point from discrete or nominal data.
``mode`` assumes discrete data, and returns a single value. This is the
standard treatment of the mode as commonly taught in schools:
>>> mode([1, 1, 2, 3, 3, 3, 3, 4])
3
This also works with nominal (non-numeric) data:
>>> mode(["red", "blue", "blue", "red", "green", "red", "red"])
'red'
If there is not exactly one most common value, ``mode`` will raise
StatisticsError.
"""
# Generate a table of sorted (value, frequency) pairs.
table = _counts(data)
if len(table) == 1:
return table[0][0]
elif table:
raise StatisticsError(
'no unique mode; found %d equally common values' % len(table)
)
else:
raise StatisticsError('no mode for empty data')
# === Measures of spread ===
# See http://mathworld.wolfram.com/Variance.html
# http://mathworld.wolfram.com/SampleVariance.html
# http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
#
# Under no circumstances use the so-called "computational formula for
# variance", as that is only suitable for hand calculations with a small
# amount of low-precision data. It has terrible numeric properties.
#
# See a comparison of three computational methods here:
# http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/
def _ss(data, c=None):
"""Return sum of square deviations of sequence data.
If ``c`` is None, the mean is calculated in one pass, and the deviations
from the mean are calculated in a second pass. Otherwise, deviations are
calculated from ``c`` as given. Use the second case with care, as it can
lead to garbage results.
"""
if c is None:
c = mean(data)
ss = _sum((x-c)**2 for x in data)
# The following sum should mathematically equal zero, but due to rounding
# error may not.
ss -= _sum((x-c) for x in data)**2/len(data)
assert not ss < 0, 'negative sum of square deviations: %f' % ss
return ss
def variance(data, xbar=None):
"""Return the sample variance of data.
data should be an iterable of Real-valued numbers, with at least two
values. The optional argument xbar, if given, should be the mean of
the data. If it is missing or None, the mean is automatically calculated.
Use this function when your data is a sample from a population. To
calculate the variance from the entire population, see ``pvariance``.
Examples:
>>> data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5]
>>> variance(data)
1.3720238095238095
If you have already calculated the mean of your data, you can pass it as
the optional second argument ``xbar`` to avoid recalculating it:
>>> m = mean(data)
>>> variance(data, m)
1.3720238095238095
This function does not check that ``xbar`` is actually the mean of
``data``. Giving arbitrary values for ``xbar`` may lead to invalid or
impossible results.
Decimals and Fractions are supported:
>>> from decimal import Decimal as D
>>> variance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")])
Decimal('31.01875')
>>> from fractions import Fraction as F
>>> variance([F(1, 6), F(1, 2), F(5, 3)])
Fraction(67, 108)
"""
if iter(data) is data:
data = list(data)
n = len(data)
if n < 2:
raise StatisticsError('variance requires at least two data points')
ss = _ss(data, xbar)
return ss/(n-1)
def pvariance(data, mu=None):
"""Return the population variance of ``data``.
data should be an iterable of Real-valued numbers, with at least one
value. The optional argument mu, if given, should be the mean of
the data. If it is missing or None, the mean is automatically calculated.
Use this function to calculate the variance from the entire population.
To estimate the variance from a sample, the ``variance`` function is
usually a better choice.
Examples:
>>> data = [0.0, 0.25, 0.25, 1.25, 1.5, 1.75, 2.75, 3.25]
>>> pvariance(data)
1.25
If you have already calculated the mean of the data, you can pass it as
the optional second argument to avoid recalculating it:
>>> mu = mean(data)
>>> pvariance(data, mu)
1.25
This function does not check that ``mu`` is actually the mean of ``data``.
Giving arbitrary values for ``mu`` may lead to invalid or impossible
results.
Decimals and Fractions are supported:
>>> from decimal import Decimal as D
>>> pvariance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")])
Decimal('24.815')
>>> from fractions import Fraction as F
>>> pvariance([F(1, 4), F(5, 4), F(1, 2)])
Fraction(13, 72)
"""
if iter(data) is data:
data = list(data)
n = len(data)
if n < 1:
raise StatisticsError('pvariance requires at least one data point')
ss = _ss(data, mu)
return ss/n
def stdev(data, xbar=None):
"""Return the square root of the sample variance.
See ``variance`` for arguments and other details.
>>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75])
1.0810874155219827
"""
var = variance(data, xbar)
try:
return var.sqrt()
except AttributeError:
return math.sqrt(var)
def pstdev(data, mu=None):
"""Return the square root of the population variance.
See ``pvariance`` for arguments and other details.
>>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75])
0.986893273527251
"""
var = pvariance(data, mu)
try:
return var.sqrt()
except AttributeError:
return math.sqrt(var)
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/stats.py | #!/usr/bin/env python3
import sys
import statistics
def pairs(l, n):
return zip(*[l[i::n] for i in range(n)])
# data comes in pairs:
# n - time for running the program with no input
# m - time for running it with the benchmark input
# we measure (m - n)
values = [ float(y) - float(x) for (x,y) in pairs(sys.stdin.readlines(),2)]
print("mean = %.4f, median = %.4f, stdev = %.4f" %
(statistics.mean(values), statistics.median(values),
statistics.stdev(values)))
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-newlines.md |
this\
should\
be\
separated\
by\
newlines
this
should
be
separated
by
newlines
too
this
should
not
be
separated
by
newlines
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-code.md |
an
example
of
a code
block
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-list-flat.md | - tidy
- bullet
- list
- loose
- bullet
- list
0. ordered
1. list
2. example
-
-
-
-
1.
2.
3.
- an example
of a list item
with a continuation
this part is inside the list
this part is just a paragraph
1. test
- test
1. test
- test
111111111111111111111111111111111111111111. is this a valid bullet?
- _________________________
- this
- is
a
long
- loose
- list
- with
- some
tidy
- list
- items
- in
- between
- _________________________
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-em-worst.md | *this *is *a *worst *case *for *em *backtracking
__this __is __a __worst __case __for __em __backtracking
***this ***is ***a ***worst ***case ***for ***em ***backtracking
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-links-flat.md | Valid links:
[this is a link]()
[this is a link](<http://something.example.com/foo/bar>)
[this is a link](http://something.example.com/foo/bar 'test')
![this is an image]()


[escape test](<\>\>\>\>\>\>\>\>\>\>\>\>\>\>> '\'\'\'\'\'\'\'\'\'\'\'\'\'\'')
[escape test \]\]\]\]\]\]\]\]\]\]\]\]\]\]\]\]](\)\)\)\)\)\)\)\)\)\)\)\)\)\))
Invalid links:
[this is not a link
[this is not a link](
[this is not a link](http://something.example.com/foo/bar 'test'
[this is not a link](((((((((((((((((((((((((((((((((((((((((((((((
[this is not a link]((((((((((()))))))))) (((((((((()))))))))))
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-escape.md |
\t\e\s\t\i\n\g \e\s\c\a\p\e \s\e\q\u\e\n\c\e\s
\!\\\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?
\@ \[ \] \^ \_ \` \{ \| \} \~ \- \'
\
\\
\\\
\\\\
\\\\\
\<this\> \<is\> \<not\> \<html\>
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-ref-nested.md | [[[[[[[foo]]]]]]]
[[[[[[[foo]]]]]]]: bar
[[[[[[foo]]]]]]: bar
[[[[[foo]]]]]: bar
[[[[foo]]]]: bar
[[[foo]]]: bar
[[foo]]: bar
[foo]: bar
[*[*[*[*[foo]*]*]*]*]
[*[*[*[*[foo]*]*]*]*]: bar
[*[*[*[foo]*]*]*]: bar
[*[*[foo]*]*]: bar
[*[foo]*]: bar
[foo]: bar
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-html.md | <div class="this is an html block">
blah blah
</div>
<table>
<tr>
<td>
**test**
</td>
</tr>
</table>
<table>
<tr>
<td>
test
</td>
</tr>
</table>
<![CDATA[
[[[[[[[[[[[... *cdata section - this should not be parsed* ...]]]]]]]]]]]
]]>
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-em-flat.md | *this* *is* *your* *basic* *boring* *emphasis*
_this_ _is_ _your_ _basic_ _boring_ _emphasis_
**this** **is** **your** **basic** **boring** **emphasis**
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-links-nested.md | Valid links:
[[[[[[[[](test)](test)](test)](test)](test)](test)](test)]
[ [[[[[[[[[[[[[[[[[[ [](test) ]]]]]]]]]]]]]]]]]] ](test)
Invalid links:
[[[[[[[[[
[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [
 lobortis, sapien arcu mattis erat, vel aliquet sem urna et risus. Ut feugiat sapien vitae mi elementum laoreet. Suspendisse potenti. Aliquam erat nisl, aliquam pretium libero aliquet, sagittis eleifend nunc. In hac habitasse platea dictumst. Integer turpis augue, tincidunt dignissim mauris id, rhoncus dapibus purus. Maecenas et enim odio. Nullam massa metus, varius quis vehicula sed, pharetra mollis erat. In quis viverra velit. Vivamus placerat, est nec hendrerit varius, enim dui hendrerit magna, ut pulvinar nibh lorem vel lacus. Mauris a orci iaculis, hendrerit eros sed, gravida leo. In dictum mauris vel augue varius, ac ullamcorper nisl ornare. In eu posuere velit, ac fermentum arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam sed malesuada leo, at interdum elit.
Nullam ut tincidunt nunc. [Pellentesque][1] metus lacus, commodo eget justo ut, rutrum varius nunc. Sed non rhoncus risus. Morbi sodales gravida pulvinar. Duis malesuada, odio volutpat elementum vulputate, massa magna scelerisque ante, et accumsan tellus nunc in sem. Donec mattis arcu et velit aliquet, non sagittis justo vestibulum. Suspendisse volutpat felis lectus, nec consequat ipsum mattis id. Donec dapibus vehicula facilisis. In tincidunt mi nisi, nec faucibus tortor euismod nec. Suspendisse ante ligula, aliquet vitae libero eu, vulputate dapibus libero. Sed bibendum, sapien at posuere interdum, libero est sollicitudin magna, ac gravida tellus purus eu ipsum. Proin ut quam arcu.
Suspendisse potenti. Donec ante velit, ornare at augue quis, tristique laoreet sem. Etiam in ipsum elit. Nullam cursus dolor sit amet nulla feugiat tristique. Phasellus ac tellus tincidunt, imperdiet purus eget, ullamcorper ipsum. Cras eu tincidunt sem. Nullam sed dapibus magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In id venenatis tortor. In consectetur sollicitudin pharetra. Etiam convallis nisi nunc, et aliquam turpis viverra sit amet. Maecenas faucibus sodales tortor. Suspendisse lobortis mi eu leo viverra volutpat. Pellentesque velit ante, vehicula sodales congue ut, elementum a urna. Cras tempor, ipsum eget luctus rhoncus, arcu ligula fermentum urna, vulputate pharetra enim enim non libero.
Proin diam quam, elementum in eleifend id, elementum et metus. Cras in justo consequat justo semper ultrices. Sed dignissim lectus a ante mollis, nec vulputate ante molestie. Proin in porta nunc. Etiam pulvinar turpis sed velit porttitor, vel adipiscing velit fringilla. Cras ac tellus vitae purus pharetra tincidunt. Sed cursus aliquet aliquet. Cras eleifend commodo malesuada. In turpis turpis, ullamcorper ut tincidunt a, ullamcorper a nunc. Etiam luctus tellus ac dapibus gravida. Ut nec lacus laoreet neque ullamcorper volutpat.
Nunc et leo erat. Aenean mattis ultrices lorem, eget adipiscing dolor ultricies eu. In hac habitasse platea dictumst. Vivamus cursus feugiat sapien quis aliquam. Mauris quam libero, porta vel volutpat ut, blandit a purus. Vivamus vestibulum dui vel tortor molestie, sit amet feugiat sem commodo. Nulla facilisi. Sed molestie arcu eget tellus vestibulum tristique.
[1]: https://github.com/markdown-it
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-bq-flat.md | > the simple example of a blockquote
> the simple example of a blockquote
> the simple example of a blockquote
> the simple example of a blockquote
... continuation
... continuation
... continuation
... continuation
empty blockquote:
>
>
>
>
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-fences.md |
``````````text
an
example
```
of
a fenced
```
code
block
``````````
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-heading.md | # heading
### heading
##### heading
# heading #
### heading ###
##### heading \#\#\#\#\######
############ not a heading
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-list-nested.md |
- this
- is
- a
- deeply
- nested
- bullet
- list
1. this
2. is
3. a
4. deeply
5. nested
6. unordered
7. list
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- - - - - - - - - deeply-nested one-element item
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-html.md | Taking commonmark tests from the spec for benchmarking here:
<a><bab><c2c>
<a/><b2/>
<a /><b2
data="foo" >
<a foo="bar" bam = 'baz <em>"</em>'
_boolean zoop:33=zoop:33 />
<33> <__>
<a h*#ref="hi">
<a href="hi'> <a href=hi'>
< a><
foo><bar/ >
<a href='bar'title=title>
</a>
</foo >
</a href="foo">
foo <!-- this is a
comment - with hyphen -->
foo <!-- not a comment -- two hyphens -->
foo <?php echo $a; ?>
foo <!ELEMENT br EMPTY>
foo <![CDATA[>&<]]>
<a href="ö">
<a href="\*">
<a href="\"">
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/rawtabs.md |
this is a test for tab expansion, be careful not to replace them with spaces
1 4444
22 333
333 22
4444 1
tab-indented line
space-indented line
tab-indented line
a lot of spaces in between here
a lot of tabs in between here
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-em-nested.md | *this *is *a *bunch* of* nested* emphases*
__this __is __a __bunch__ of__ nested__ emphases__
***this ***is ***a ***bunch*** of*** nested*** emphases***
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-lheading.md | heading
---
heading
===================================
not a heading
----------------------------------- text
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-backticks.md | `lots`of`backticks`
``i``wonder``how``this``will``be``parsed``
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/block-ref-flat.md | [1] [2] [3] [1] [2] [3]
[looooooooooooooooooooooooooooooooooooooooooooooooooong label]
[1]: <http://something.example.com/foo/bar>
[2]: http://something.example.com/foo/bar 'test'
[3]:
http://foo/bar
[ looooooooooooooooooooooooooooooooooooooooooooooooooong label ]:
111
'test'
[[[[[[[[[[[[[[[[[[[[ this should not slow down anything ]]]]]]]]]]]]]]]]]]]]: q
(as long as it is not referenced anywhere)
[[[[[[[[[[[[[[[[[[[[]: this is not a valid reference
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/bench/samples/inline-entity.md | entities:
& © Æ Ď ¾ ℋ ⅆ ∲
# Ӓ Ϡ �
non-entities:
&18900987654321234567890; &1234567890098765432123456789009876543212345678987654;
&qwertyuioppoiuytrewqwer; &oiuytrewqwertyuioiuytrewqwertyuioytrewqwertyuiiuytri;
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/main.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CMARK_NO_SHORT_NAMES
#include "cmark-gfm.h"
#include "node.h"
#include "../extensions/cmark-gfm-core-extensions.h"
#include "harness.h"
#include "cplusplus.h"
#define UTF8_REPL "\xEF\xBF\xBD"
static const cmark_node_type node_types[] = {
CMARK_NODE_DOCUMENT, CMARK_NODE_BLOCK_QUOTE, CMARK_NODE_LIST,
CMARK_NODE_ITEM, CMARK_NODE_CODE_BLOCK, CMARK_NODE_HTML_BLOCK,
CMARK_NODE_PARAGRAPH, CMARK_NODE_HEADING, CMARK_NODE_THEMATIC_BREAK,
CMARK_NODE_TEXT, CMARK_NODE_SOFTBREAK, CMARK_NODE_LINEBREAK,
CMARK_NODE_CODE, CMARK_NODE_HTML_INLINE, CMARK_NODE_EMPH,
CMARK_NODE_STRONG, CMARK_NODE_LINK, CMARK_NODE_IMAGE};
static const int num_node_types = sizeof(node_types) / sizeof(*node_types);
static void test_md_to_html(test_batch_runner *runner, const char *markdown,
const char *expected_html, const char *msg);
static void test_content(test_batch_runner *runner, cmark_node_type type,
unsigned int *allowed_content);
static void test_char(test_batch_runner *runner, int valid, const char *utf8,
const char *msg);
static void test_incomplete_char(test_batch_runner *runner, const char *utf8,
const char *msg);
static void test_continuation_byte(test_batch_runner *runner, const char *utf8);
static void version(test_batch_runner *runner) {
INT_EQ(runner, cmark_version(), CMARK_GFM_VERSION, "cmark_version");
STR_EQ(runner, cmark_version_string(), CMARK_GFM_VERSION_STRING,
"cmark_version_string");
}
static void constructor(test_batch_runner *runner) {
for (int i = 0; i < num_node_types; ++i) {
cmark_node_type type = node_types[i];
cmark_node *node = cmark_node_new(type);
OK(runner, node != NULL, "new type %d", type);
INT_EQ(runner, cmark_node_get_type(node), type, "get_type %d", type);
switch (node->type) {
case CMARK_NODE_HEADING:
INT_EQ(runner, cmark_node_get_heading_level(node), 1,
"default heading level is 1");
node->as.heading.level = 1;
break;
case CMARK_NODE_LIST:
INT_EQ(runner, cmark_node_get_list_type(node), CMARK_BULLET_LIST,
"default is list type is bullet");
INT_EQ(runner, cmark_node_get_list_delim(node), CMARK_NO_DELIM,
"default is list delim is NO_DELIM");
INT_EQ(runner, cmark_node_get_list_start(node), 0,
"default is list start is 0");
INT_EQ(runner, cmark_node_get_list_tight(node), 0,
"default is list is loose");
break;
default:
break;
}
cmark_node_free(node);
}
}
static void accessors(test_batch_runner *runner) {
static const char markdown[] = "## Header\n"
"\n"
"* Item 1\n"
"* Item 2\n"
"\n"
"2. Item 1\n"
"\n"
"3. Item 2\n"
"\n"
"``` lang\n"
"fenced\n"
"```\n"
" code\n"
"\n"
"<div>html</div>\n"
"\n"
"[link](url 'title')\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
// Getters
cmark_node *heading = cmark_node_first_child(doc);
INT_EQ(runner, cmark_node_get_heading_level(heading), 2, "get_heading_level");
cmark_node *bullet_list = cmark_node_next(heading);
INT_EQ(runner, cmark_node_get_list_type(bullet_list), CMARK_BULLET_LIST,
"get_list_type bullet");
INT_EQ(runner, cmark_node_get_list_tight(bullet_list), 1,
"get_list_tight tight");
cmark_node *ordered_list = cmark_node_next(bullet_list);
INT_EQ(runner, cmark_node_get_list_type(ordered_list), CMARK_ORDERED_LIST,
"get_list_type ordered");
INT_EQ(runner, cmark_node_get_list_delim(ordered_list), CMARK_PERIOD_DELIM,
"get_list_delim ordered");
INT_EQ(runner, cmark_node_get_list_start(ordered_list), 2, "get_list_start");
INT_EQ(runner, cmark_node_get_list_tight(ordered_list), 0,
"get_list_tight loose");
cmark_node *fenced = cmark_node_next(ordered_list);
STR_EQ(runner, cmark_node_get_literal(fenced), "fenced\n",
"get_literal fenced code");
STR_EQ(runner, cmark_node_get_fence_info(fenced), "lang", "get_fence_info");
cmark_node *code = cmark_node_next(fenced);
STR_EQ(runner, cmark_node_get_literal(code), "code\n",
"get_literal indented code");
cmark_node *html = cmark_node_next(code);
STR_EQ(runner, cmark_node_get_literal(html), "<div>html</div>\n",
"get_literal html");
cmark_node *paragraph = cmark_node_next(html);
INT_EQ(runner, cmark_node_get_start_line(paragraph), 17, "get_start_line");
INT_EQ(runner, cmark_node_get_start_column(paragraph), 1, "get_start_column");
INT_EQ(runner, cmark_node_get_end_line(paragraph), 17, "get_end_line");
cmark_node *link = cmark_node_first_child(paragraph);
STR_EQ(runner, cmark_node_get_url(link), "url", "get_url");
STR_EQ(runner, cmark_node_get_title(link), "title", "get_title");
cmark_node *string = cmark_node_first_child(link);
STR_EQ(runner, cmark_node_get_literal(string), "link", "get_literal string");
// Setters
OK(runner, cmark_node_set_heading_level(heading, 3), "set_heading_level");
OK(runner, cmark_node_set_list_type(bullet_list, CMARK_ORDERED_LIST),
"set_list_type ordered");
OK(runner, cmark_node_set_list_delim(bullet_list, CMARK_PAREN_DELIM),
"set_list_delim paren");
OK(runner, cmark_node_set_list_start(bullet_list, 3), "set_list_start");
OK(runner, cmark_node_set_list_tight(bullet_list, 0), "set_list_tight loose");
OK(runner, cmark_node_set_list_type(ordered_list, CMARK_BULLET_LIST),
"set_list_type bullet");
OK(runner, cmark_node_set_list_tight(ordered_list, 1),
"set_list_tight tight");
OK(runner, cmark_node_set_literal(code, "CODE\n"),
"set_literal indented code");
OK(runner, cmark_node_set_literal(fenced, "FENCED\n"),
"set_literal fenced code");
OK(runner, cmark_node_set_fence_info(fenced, "LANG"), "set_fence_info");
OK(runner, cmark_node_set_literal(html, "<div>HTML</div>\n"),
"set_literal html");
OK(runner, cmark_node_set_url(link, "URL"), "set_url");
OK(runner, cmark_node_set_title(link, "TITLE"), "set_title");
OK(runner, cmark_node_set_literal(string, "prefix-LINK"),
"set_literal string");
// Set literal to suffix of itself (issue #139).
const char *literal = cmark_node_get_literal(string);
OK(runner, cmark_node_set_literal(string, literal + sizeof("prefix")),
"set_literal suffix");
char *rendered_html = cmark_render_html(doc, CMARK_OPT_DEFAULT | CMARK_OPT_UNSAFE, NULL);
static const char expected_html[] =
"<h3>Header</h3>\n"
"<ol start=\"3\">\n"
"<li>\n"
"<p>Item 1</p>\n"
"</li>\n"
"<li>\n"
"<p>Item 2</p>\n"
"</li>\n"
"</ol>\n"
"<ul>\n"
"<li>Item 1</li>\n"
"<li>Item 2</li>\n"
"</ul>\n"
"<pre><code class=\"language-LANG\">FENCED\n"
"</code></pre>\n"
"<pre><code>CODE\n"
"</code></pre>\n"
"<div>HTML</div>\n"
"<p><a href=\"URL\" title=\"TITLE\">LINK</a></p>\n";
STR_EQ(runner, rendered_html, expected_html, "setters work");
free(rendered_html);
// Getter errors
INT_EQ(runner, cmark_node_get_heading_level(bullet_list), 0,
"get_heading_level error");
INT_EQ(runner, cmark_node_get_list_type(heading), CMARK_NO_LIST,
"get_list_type error");
INT_EQ(runner, cmark_node_get_list_start(code), 0, "get_list_start error");
INT_EQ(runner, cmark_node_get_list_tight(fenced), 0, "get_list_tight error");
OK(runner, cmark_node_get_literal(ordered_list) == NULL, "get_literal error");
OK(runner, cmark_node_get_fence_info(paragraph) == NULL,
"get_fence_info error");
OK(runner, cmark_node_get_url(html) == NULL, "get_url error");
OK(runner, cmark_node_get_title(heading) == NULL, "get_title error");
// Setter errors
OK(runner, !cmark_node_set_heading_level(bullet_list, 3),
"set_heading_level error");
OK(runner, !cmark_node_set_list_type(heading, CMARK_ORDERED_LIST),
"set_list_type error");
OK(runner, !cmark_node_set_list_start(code, 3), "set_list_start error");
OK(runner, !cmark_node_set_list_tight(fenced, 0), "set_list_tight error");
OK(runner, !cmark_node_set_literal(ordered_list, "content\n"),
"set_literal error");
OK(runner, !cmark_node_set_fence_info(paragraph, "lang"),
"set_fence_info error");
OK(runner, !cmark_node_set_url(html, "url"), "set_url error");
OK(runner, !cmark_node_set_title(heading, "title"), "set_title error");
OK(runner, !cmark_node_set_heading_level(heading, 0),
"set_heading_level too small");
OK(runner, !cmark_node_set_heading_level(heading, 7),
"set_heading_level too large");
OK(runner, !cmark_node_set_list_type(bullet_list, CMARK_NO_LIST),
"set_list_type invalid");
OK(runner, !cmark_node_set_list_start(bullet_list, -1),
"set_list_start negative");
cmark_node_free(doc);
}
static void node_check(test_batch_runner *runner) {
// Construct an incomplete tree.
cmark_node *doc = cmark_node_new(CMARK_NODE_DOCUMENT);
cmark_node *p1 = cmark_node_new(CMARK_NODE_PARAGRAPH);
cmark_node *p2 = cmark_node_new(CMARK_NODE_PARAGRAPH);
doc->first_child = p1;
p1->next = p2;
INT_EQ(runner, cmark_node_check(doc, NULL), 4, "node_check works");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "node_check fixes tree");
cmark_node_free(doc);
}
static void iterator(test_batch_runner *runner) {
cmark_node *doc = cmark_parse_document("> a *b*\n\nc", 10, CMARK_OPT_DEFAULT);
int parnodes = 0;
cmark_event_type ev_type;
cmark_iter *iter = cmark_iter_new(doc);
cmark_node *cur;
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
if (cur->type == CMARK_NODE_PARAGRAPH && ev_type == CMARK_EVENT_ENTER) {
parnodes += 1;
}
}
INT_EQ(runner, parnodes, 2, "iterate correctly counts paragraphs");
cmark_iter_free(iter);
cmark_node_free(doc);
}
static void iterator_delete(test_batch_runner *runner) {
static const char md[] = "a *b* c\n"
"\n"
"* item1\n"
"* item2\n"
"\n"
"a `b` c\n"
"\n"
"* item1\n"
"* item2\n";
cmark_node *doc = cmark_parse_document(md, sizeof(md) - 1, CMARK_OPT_DEFAULT);
cmark_iter *iter = cmark_iter_new(doc);
cmark_event_type ev_type;
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cmark_node *node = cmark_iter_get_node(iter);
// Delete list, emph, and code nodes.
if ((ev_type == CMARK_EVENT_EXIT && node->type == CMARK_NODE_LIST) ||
(ev_type == CMARK_EVENT_EXIT && node->type == CMARK_NODE_EMPH) ||
(ev_type == CMARK_EVENT_ENTER && node->type == CMARK_NODE_CODE)) {
cmark_node_free(node);
}
}
char *html = cmark_render_html(doc, CMARK_OPT_DEFAULT, NULL);
static const char expected[] = "<p>a c</p>\n"
"<p>a c</p>\n";
STR_EQ(runner, html, expected, "iterate and delete nodes");
free(html);
cmark_iter_free(iter);
cmark_node_free(doc);
}
static void create_tree(test_batch_runner *runner) {
char *html;
cmark_node *doc = cmark_node_new(CMARK_NODE_DOCUMENT);
cmark_node *p = cmark_node_new(CMARK_NODE_PARAGRAPH);
OK(runner, !cmark_node_insert_before(doc, p), "insert before root fails");
OK(runner, !cmark_node_insert_after(doc, p), "insert after root fails");
OK(runner, cmark_node_append_child(doc, p), "append1");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append1 consistent");
OK(runner, cmark_node_parent(p) == doc, "node_parent");
cmark_node *emph = cmark_node_new(CMARK_NODE_EMPH);
OK(runner, cmark_node_prepend_child(p, emph), "prepend1");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "prepend1 consistent");
cmark_node *str1 = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(str1, "Hello, ");
OK(runner, cmark_node_prepend_child(p, str1), "prepend2");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "prepend2 consistent");
cmark_node *str3 = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(str3, "!");
OK(runner, cmark_node_append_child(p, str3), "append2");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append2 consistent");
cmark_node *str2 = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(str2, "world");
OK(runner, cmark_node_append_child(emph, str2), "append3");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append3 consistent");
html = cmark_render_html(doc, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "<p>Hello, <em>world</em>!</p>\n", "render_html");
free(html);
OK(runner, cmark_node_insert_before(str1, str3), "ins before1");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "ins before1 consistent");
// 31e
OK(runner, cmark_node_first_child(p) == str3, "ins before1 works");
OK(runner, cmark_node_insert_before(str1, emph), "ins before2");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "ins before2 consistent");
// 3e1
OK(runner, cmark_node_last_child(p) == str1, "ins before2 works");
OK(runner, cmark_node_insert_after(str1, str3), "ins after1");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "ins after1 consistent");
// e13
OK(runner, cmark_node_next(str1) == str3, "ins after1 works");
OK(runner, cmark_node_insert_after(str1, emph), "ins after2");
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "ins after2 consistent");
// 1e3
OK(runner, cmark_node_previous(emph) == str1, "ins after2 works");
cmark_node *str4 = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(str4, "brzz");
OK(runner, cmark_node_replace(str1, str4), "replace");
// The replaced node is not freed
cmark_node_free(str1);
INT_EQ(runner, cmark_node_check(doc, NULL), 0, "replace consistent");
OK(runner, cmark_node_previous(emph) == str4, "replace works");
INT_EQ(runner, cmark_node_replace(p, str4), 0, "replace str for p fails");
cmark_node_unlink(emph);
html = cmark_render_html(doc, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "<p>brzz!</p>\n", "render_html after shuffling");
free(html);
cmark_node_free(doc);
// TODO: Test that the contents of an unlinked inline are valid
// after the parent block was destroyed. This doesn't work so far.
cmark_node_free(emph);
}
static void custom_nodes(test_batch_runner *runner) {
char *html;
char *man;
cmark_node *doc = cmark_node_new(CMARK_NODE_DOCUMENT);
cmark_node *p = cmark_node_new(CMARK_NODE_PARAGRAPH);
cmark_node_append_child(doc, p);
cmark_node *ci = cmark_node_new(CMARK_NODE_CUSTOM_INLINE);
cmark_node *str1 = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(str1, "Hello");
OK(runner, cmark_node_append_child(ci, str1), "append1");
OK(runner, cmark_node_set_on_enter(ci, "<ON ENTER|"), "set_on_enter");
OK(runner, cmark_node_set_on_exit(ci, "|ON EXIT>"), "set_on_exit");
STR_EQ(runner, cmark_node_get_on_enter(ci), "<ON ENTER|", "get_on_enter");
STR_EQ(runner, cmark_node_get_on_exit(ci), "|ON EXIT>", "get_on_exit");
cmark_node_append_child(p, ci);
cmark_node *cb = cmark_node_new(CMARK_NODE_CUSTOM_BLOCK);
cmark_node_set_on_enter(cb, "<on enter|");
// leave on_exit unset
STR_EQ(runner, cmark_node_get_on_exit(cb), "", "get_on_exit (empty)");
cmark_node_append_child(doc, cb);
html = cmark_render_html(doc, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "<p><ON ENTER|Hello|ON EXIT></p>\n<on enter|\n",
"render_html");
free(html);
man = cmark_render_man(doc, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, man, ".PP\n<ON ENTER|Hello|ON EXIT>\n<on enter|\n",
"render_man");
free(man);
cmark_node_free(doc);
}
void hierarchy(test_batch_runner *runner) {
cmark_node *bquote1 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE);
cmark_node *bquote2 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE);
cmark_node *bquote3 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE);
OK(runner, cmark_node_append_child(bquote1, bquote2), "append bquote2");
OK(runner, cmark_node_append_child(bquote2, bquote3), "append bquote3");
OK(runner, !cmark_node_append_child(bquote3, bquote3),
"adding a node as child of itself fails");
OK(runner, !cmark_node_append_child(bquote3, bquote1),
"adding a parent as child fails");
cmark_node_free(bquote1);
unsigned int list_item_flag[] = {CMARK_NODE_ITEM, 0};
unsigned int top_level_blocks[] = {
CMARK_NODE_BLOCK_QUOTE, CMARK_NODE_LIST,
CMARK_NODE_CODE_BLOCK, CMARK_NODE_HTML_BLOCK,
CMARK_NODE_PARAGRAPH, CMARK_NODE_HEADING,
CMARK_NODE_THEMATIC_BREAK, 0};
unsigned int all_inlines[] = {
CMARK_NODE_TEXT, CMARK_NODE_SOFTBREAK,
CMARK_NODE_LINEBREAK, CMARK_NODE_CODE,
CMARK_NODE_HTML_INLINE, CMARK_NODE_EMPH,
CMARK_NODE_STRONG, CMARK_NODE_LINK,
CMARK_NODE_IMAGE, 0};
test_content(runner, CMARK_NODE_DOCUMENT, top_level_blocks);
test_content(runner, CMARK_NODE_BLOCK_QUOTE, top_level_blocks);
test_content(runner, CMARK_NODE_LIST, list_item_flag);
test_content(runner, CMARK_NODE_ITEM, top_level_blocks);
test_content(runner, CMARK_NODE_CODE_BLOCK, 0);
test_content(runner, CMARK_NODE_HTML_BLOCK, 0);
test_content(runner, CMARK_NODE_PARAGRAPH, all_inlines);
test_content(runner, CMARK_NODE_HEADING, all_inlines);
test_content(runner, CMARK_NODE_THEMATIC_BREAK, 0);
test_content(runner, CMARK_NODE_TEXT, 0);
test_content(runner, CMARK_NODE_SOFTBREAK, 0);
test_content(runner, CMARK_NODE_LINEBREAK, 0);
test_content(runner, CMARK_NODE_CODE, 0);
test_content(runner, CMARK_NODE_HTML_INLINE, 0);
test_content(runner, CMARK_NODE_EMPH, all_inlines);
test_content(runner, CMARK_NODE_STRONG, all_inlines);
test_content(runner, CMARK_NODE_LINK, all_inlines);
test_content(runner, CMARK_NODE_IMAGE, all_inlines);
}
static void test_content(test_batch_runner *runner, cmark_node_type type,
unsigned int *allowed_content) {
cmark_node *node = cmark_node_new(type);
for (int i = 0; i < num_node_types; ++i) {
cmark_node_type child_type = node_types[i];
cmark_node *child = cmark_node_new(child_type);
int got = cmark_node_append_child(node, child);
int expected = 0;
if (allowed_content)
for (unsigned int *p = allowed_content; *p; ++p)
expected |= *p == (unsigned int)child_type;
INT_EQ(runner, got, expected, "add %d as child of %d", child_type, type);
cmark_node_free(child);
}
cmark_node_free(node);
}
static void parser(test_batch_runner *runner) {
test_md_to_html(runner, "No newline", "<p>No newline</p>\n",
"document without trailing newline");
}
static void render_html(test_batch_runner *runner) {
char *html;
static const char markdown[] = "foo *bar*\n"
"\n"
"paragraph 2\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
cmark_node *paragraph = cmark_node_first_child(doc);
html = cmark_render_html(paragraph, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "<p>foo <em>bar</em></p>\n", "render single paragraph");
free(html);
cmark_node *string = cmark_node_first_child(paragraph);
html = cmark_render_html(string, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "foo ", "render single inline");
free(html);
cmark_node *emph = cmark_node_next(string);
html = cmark_render_html(emph, CMARK_OPT_DEFAULT, NULL);
STR_EQ(runner, html, "<em>bar</em>", "render inline with children");
free(html);
cmark_node_free(doc);
}
static void render_xml(test_batch_runner *runner) {
char *xml;
static const char markdown[] = "foo *bar*\n"
"\n"
"paragraph 2\n"
"\n"
"```\ncode\n```\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
xml = cmark_render_xml(doc, CMARK_OPT_DEFAULT);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<document xmlns=\"http://commonmark.org/xml/1.0\">\n"
" <paragraph>\n"
" <text xml:space=\"preserve\">foo </text>\n"
" <emph>\n"
" <text xml:space=\"preserve\">bar</text>\n"
" </emph>\n"
" </paragraph>\n"
" <paragraph>\n"
" <text xml:space=\"preserve\">paragraph 2</text>\n"
" </paragraph>\n"
" <code_block xml:space=\"preserve\">code\n"
"</code_block>\n"
"</document>\n",
"render document");
free(xml);
cmark_node *paragraph = cmark_node_first_child(doc);
xml = cmark_render_xml(paragraph, CMARK_OPT_DEFAULT | CMARK_OPT_SOURCEPOS);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<paragraph sourcepos=\"1:1-1:9\">\n"
" <text sourcepos=\"1:1-1:4\" xml:space=\"preserve\">foo </text>\n"
" <emph sourcepos=\"1:5-1:9\">\n"
" <text sourcepos=\"1:6-1:8\" xml:space=\"preserve\">bar</text>\n"
" </emph>\n"
"</paragraph>\n",
"render first paragraph with source pos");
free(xml);
cmark_node_free(doc);
}
static void render_man(test_batch_runner *runner) {
char *man;
static const char markdown[] = "foo *bar*\n"
"\n"
"- Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
"- sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
man = cmark_render_man(doc, CMARK_OPT_DEFAULT, 20);
STR_EQ(runner, man, ".PP\n"
"foo \\f[I]bar\\f[]\n"
".IP \\[bu] 2\n"
"Lorem ipsum dolor\n"
"sit amet,\n"
"consectetur\n"
"adipiscing elit,\n"
".IP \\[bu] 2\n"
"sed do eiusmod\n"
"tempor incididunt ut\n"
"labore et dolore\n"
"magna aliqua.\n",
"render document with wrapping");
free(man);
man = cmark_render_man(doc, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, man, ".PP\n"
"foo \\f[I]bar\\f[]\n"
".IP \\[bu] 2\n"
"Lorem ipsum dolor sit amet,\n"
"consectetur adipiscing elit,\n"
".IP \\[bu] 2\n"
"sed do eiusmod tempor incididunt\n"
"ut labore et dolore magna aliqua.\n",
"render document without wrapping");
free(man);
cmark_node_free(doc);
}
static void render_latex(test_batch_runner *runner) {
char *latex;
static const char markdown[] = "foo *bar* $%\n"
"\n"
"- Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
"- sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
latex = cmark_render_latex(doc, CMARK_OPT_DEFAULT, 20);
STR_EQ(runner, latex, "foo \\emph{bar} \\$\\%\n"
"\n"
"\\begin{itemize}\n"
"\\item Lorem ipsum\n"
"dolor sit amet,\n"
"consectetur\n"
"adipiscing elit,\n"
"\n"
"\\item sed do eiusmod\n"
"tempor incididunt ut\n"
"labore et dolore\n"
"magna aliqua.\n"
"\n"
"\\end{itemize}\n",
"render document with wrapping");
free(latex);
latex = cmark_render_latex(doc, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, latex, "foo \\emph{bar} \\$\\%\n"
"\n"
"\\begin{itemize}\n"
"\\item Lorem ipsum dolor sit amet,\n"
"consectetur adipiscing elit,\n"
"\n"
"\\item sed do eiusmod tempor incididunt\n"
"ut labore et dolore magna aliqua.\n"
"\n"
"\\end{itemize}\n",
"render document without wrapping");
free(latex);
cmark_node_free(doc);
}
static void render_commonmark(test_batch_runner *runner) {
char *commonmark;
static const char markdown[] = "> \\- foo *bar* \\*bar\\*\n"
"\n"
"- Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
"- sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
commonmark = cmark_render_commonmark(doc, CMARK_OPT_DEFAULT, 26);
STR_EQ(runner, commonmark, "> \\- foo *bar* \\*bar\\*\n"
"\n"
" - Lorem ipsum dolor sit\n"
" amet, consectetur\n"
" adipiscing elit,\n"
" - sed do eiusmod tempor\n"
" incididunt ut labore\n"
" et dolore magna\n"
" aliqua.\n",
"render document with wrapping");
free(commonmark);
commonmark = cmark_render_commonmark(doc, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, commonmark, "> \\- foo *bar* \\*bar\\*\n"
"\n"
" - Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
" - sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n",
"render document without wrapping");
free(commonmark);
cmark_node *text = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(text, "Hi");
commonmark = cmark_render_commonmark(text, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, commonmark, "Hi\n", "render single inline node");
free(commonmark);
cmark_node_free(text);
cmark_node_free(doc);
}
static void render_plaintext(test_batch_runner *runner) {
char *plaintext;
static const char markdown[] = "> \\- foo *bar* \\*bar\\*\n"
"\n"
"- Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
"- sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n";
cmark_node *doc =
cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
plaintext = cmark_render_plaintext(doc, CMARK_OPT_DEFAULT, 26);
STR_EQ(runner, plaintext, "- foo bar *bar*\n"
"\n"
" - Lorem ipsum dolor sit\n"
" amet, consectetur\n"
" adipiscing elit,\n"
" - sed do eiusmod tempor\n"
" incididunt ut labore\n"
" et dolore magna\n"
" aliqua.\n",
"render document with wrapping");
free(plaintext);
plaintext = cmark_render_plaintext(doc, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, plaintext, "- foo bar *bar*\n"
"\n"
" - Lorem ipsum dolor sit amet,\n"
" consectetur adipiscing elit,\n"
" - sed do eiusmod tempor incididunt\n"
" ut labore et dolore magna aliqua.\n",
"render document without wrapping");
free(plaintext);
cmark_node *text = cmark_node_new(CMARK_NODE_TEXT);
cmark_node_set_literal(text, "Hi");
plaintext = cmark_render_plaintext(text, CMARK_OPT_DEFAULT, 0);
STR_EQ(runner, plaintext, "Hi\n", "render single inline node");
free(plaintext);
cmark_node_free(text);
cmark_node_free(doc);
}
static void utf8(test_batch_runner *runner) {
// Ranges
test_char(runner, 1, "\x01", "valid utf8 01");
test_char(runner, 1, "\x7F", "valid utf8 7F");
test_char(runner, 0, "\x80", "invalid utf8 80");
test_char(runner, 0, "\xBF", "invalid utf8 BF");
test_char(runner, 0, "\xC0\x80", "invalid utf8 C080");
test_char(runner, 0, "\xC1\xBF", "invalid utf8 C1BF");
test_char(runner, 1, "\xC2\x80", "valid utf8 C280");
test_char(runner, 1, "\xDF\xBF", "valid utf8 DFBF");
test_char(runner, 0, "\xE0\x80\x80", "invalid utf8 E08080");
test_char(runner, 0, "\xE0\x9F\xBF", "invalid utf8 E09FBF");
test_char(runner, 1, "\xE0\xA0\x80", "valid utf8 E0A080");
test_char(runner, 1, "\xED\x9F\xBF", "valid utf8 ED9FBF");
test_char(runner, 0, "\xED\xA0\x80", "invalid utf8 EDA080");
test_char(runner, 0, "\xED\xBF\xBF", "invalid utf8 EDBFBF");
test_char(runner, 0, "\xF0\x80\x80\x80", "invalid utf8 F0808080");
test_char(runner, 0, "\xF0\x8F\xBF\xBF", "invalid utf8 F08FBFBF");
test_char(runner, 1, "\xF0\x90\x80\x80", "valid utf8 F0908080");
test_char(runner, 1, "\xF4\x8F\xBF\xBF", "valid utf8 F48FBFBF");
test_char(runner, 0, "\xF4\x90\x80\x80", "invalid utf8 F4908080");
test_char(runner, 0, "\xF7\xBF\xBF\xBF", "invalid utf8 F7BFBFBF");
test_char(runner, 0, "\xF8", "invalid utf8 F8");
test_char(runner, 0, "\xFF", "invalid utf8 FF");
// Incomplete byte sequences at end of input
test_incomplete_char(runner, "\xE0\xA0", "invalid utf8 E0A0");
test_incomplete_char(runner, "\xF0\x90\x80", "invalid utf8 F09080");
// Invalid continuation bytes
test_continuation_byte(runner, "\xC2\x80");
test_continuation_byte(runner, "\xE0\xA0\x80");
test_continuation_byte(runner, "\xF0\x90\x80\x80");
// Test string containing null character
static const char string_with_null[] = "((((\0))))";
char *html = cmark_markdown_to_html(
string_with_null, sizeof(string_with_null) - 1, CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<p>((((" UTF8_REPL "))))</p>\n", "utf8 with U+0000");
free(html);
// Test NUL followed by newline
static const char string_with_nul_lf[] = "```\n\0\n```\n";
html = cmark_markdown_to_html(
string_with_nul_lf, sizeof(string_with_nul_lf) - 1, CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<pre><code>\xef\xbf\xbd\n</code></pre>\n",
"utf8 with \\0\\n");
free(html);
// Test byte-order marker
static const char string_with_bom[] = "\xef\xbb\xbf# Hello\n";
html = cmark_markdown_to_html(
string_with_bom, sizeof(string_with_bom) - 1, CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<h1>Hello</h1>\n", "utf8 with BOM");
free(html);
}
static void test_char(test_batch_runner *runner, int valid, const char *utf8,
const char *msg) {
char buf[20];
sprintf(buf, "((((%s))))", utf8);
if (valid) {
char expected[30];
sprintf(expected, "<p>((((%s))))</p>\n", utf8);
test_md_to_html(runner, buf, expected, msg);
} else {
test_md_to_html(runner, buf, "<p>((((" UTF8_REPL "))))</p>\n", msg);
}
}
static void test_incomplete_char(test_batch_runner *runner, const char *utf8,
const char *msg) {
char buf[20];
sprintf(buf, "----%s", utf8);
test_md_to_html(runner, buf, "<p>----" UTF8_REPL "</p>\n", msg);
}
static void test_continuation_byte(test_batch_runner *runner,
const char *utf8) {
size_t len = strlen(utf8);
for (size_t pos = 1; pos < len; ++pos) {
char buf[20];
sprintf(buf, "((((%s))))", utf8);
buf[4 + pos] = '\x20';
char expected[50];
strcpy(expected, "<p>((((" UTF8_REPL "\x20");
for (size_t i = pos + 1; i < len; ++i) {
strcat(expected, UTF8_REPL);
}
strcat(expected, "))))</p>\n");
char *html =
cmark_markdown_to_html(buf, strlen(buf), CMARK_OPT_VALIDATE_UTF8);
STR_EQ(runner, html, expected, "invalid utf8 continuation byte %d/%d", pos,
len);
free(html);
}
}
static void line_endings(test_batch_runner *runner) {
// Test list with different line endings
static const char list_with_endings[] = "- a\n- b\r\n- c\r- d";
char *html = cmark_markdown_to_html(
list_with_endings, sizeof(list_with_endings) - 1, CMARK_OPT_DEFAULT);
STR_EQ(runner, html,
"<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d</li>\n</ul>\n",
"list with different line endings");
free(html);
static const char crlf_lines[] = "line\r\nline\r\n";
html = cmark_markdown_to_html(crlf_lines, sizeof(crlf_lines) - 1,
CMARK_OPT_DEFAULT | CMARK_OPT_HARDBREAKS);
STR_EQ(runner, html, "<p>line<br />\nline</p>\n",
"crlf endings with CMARK_OPT_HARDBREAKS");
free(html);
html = cmark_markdown_to_html(crlf_lines, sizeof(crlf_lines) - 1,
CMARK_OPT_DEFAULT | CMARK_OPT_NOBREAKS);
STR_EQ(runner, html, "<p>line line</p>\n",
"crlf endings with CMARK_OPT_NOBREAKS");
free(html);
static const char no_line_ending[] = "```\nline\n```";
html = cmark_markdown_to_html(no_line_ending, sizeof(no_line_ending) - 1,
CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<pre><code>line\n</code></pre>\n",
"fenced code block with no final newline");
free(html);
}
static void numeric_entities(test_batch_runner *runner) {
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0");
test_md_to_html(runner, "퟿", "<p>\xED\x9F\xBF</p>\n",
"Valid numeric entity 0xD7FF");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0xD800");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0xDFFF");
test_md_to_html(runner, "", "<p>\xEE\x80\x80</p>\n",
"Valid numeric entity 0xE000");
test_md_to_html(runner, "", "<p>\xF4\x8F\xBF\xBF</p>\n",
"Valid numeric entity 0x10FFFF");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0x110000");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0x80000000");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 0xFFFFFFFF");
test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n",
"Invalid numeric entity 99999999");
test_md_to_html(runner, "&#;", "<p>&#;</p>\n",
"Min decimal entity length");
test_md_to_html(runner, "&#x;", "<p>&#x;</p>\n",
"Min hexadecimal entity length");
test_md_to_html(runner, "�", "<p>&#999999999;</p>\n",
"Max decimal entity length");
test_md_to_html(runner, "A", "<p>&#x000000041;</p>\n",
"Max hexadecimal entity length");
}
static void test_safe(test_batch_runner *runner) {
// Test safe mode
static const char raw_html[] = "<div>\nhi\n</div>\n\n<a>hi</"
"a>\n[link](JAVAscript:alert('hi'))\n\n";
char *html = cmark_markdown_to_html(raw_html, sizeof(raw_html) - 1,
CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<!-- raw HTML omitted -->\n<p><!-- raw HTML omitted "
"-->hi<!-- raw HTML omitted -->\n<a "
"href=\"\">link</a>\n<img src=\"\" alt=\"image\" "
"/></p>\n",
"input with raw HTML and dangerous links");
free(html);
}
static void test_md_to_html(test_batch_runner *runner, const char *markdown,
const char *expected_html, const char *msg) {
char *html = cmark_markdown_to_html(markdown, strlen(markdown),
CMARK_OPT_VALIDATE_UTF8);
STR_EQ(runner, html, expected_html, msg);
free(html);
}
static void test_feed_across_line_ending(test_batch_runner *runner) {
// See #117
cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
cmark_parser_feed(parser, "line1\r", 6);
cmark_parser_feed(parser, "\nline2\r\n", 8);
cmark_node *document = cmark_parser_finish(parser);
OK(runner, document->first_child->next == NULL, "document has one paragraph");
cmark_parser_free(parser);
cmark_node_free(document);
}
#if !defined(_WIN32) || defined(__CYGWIN__)
# include <sys/time.h>
static struct timeval _before, _after;
static int _timing;
# define START_TIMING() \
gettimeofday(&_before, NULL)
# define END_TIMING() \
do { \
gettimeofday(&_after, NULL); \
_timing = (_after.tv_sec - _before.tv_sec) * 1000 + (_after.tv_usec - _before.tv_usec) / 1000; \
} while (0)
# define TIMING _timing
#else
# define START_TIMING()
# define END_TIMING()
# define TIMING 0
#endif
static void test_pathological_regressions(test_batch_runner *runner) {
{
// I don't care what the output is, so long as it doesn't take too long.
char path[] = "[a](b";
char *input = (char *)calloc(1, (sizeof(path) - 1) * 50000);
for (int i = 0; i < 50000; ++i)
memcpy(input + i * (sizeof(path) - 1), path, sizeof(path) - 1);
START_TIMING();
char *html = cmark_markdown_to_html(input, (sizeof(path) - 1) * 50000,
CMARK_OPT_VALIDATE_UTF8);
END_TIMING();
free(html);
free(input);
OK(runner, TIMING < 1000, "takes less than 1000ms to run");
}
{
char path[] = "[a](<b";
char *input = (char *)calloc(1, (sizeof(path) - 1) * 50000);
for (int i = 0; i < 50000; ++i)
memcpy(input + i * (sizeof(path) - 1), path, sizeof(path) - 1);
START_TIMING();
char *html = cmark_markdown_to_html(input, (sizeof(path) - 1) * 50000,
CMARK_OPT_VALIDATE_UTF8);
END_TIMING();
free(html);
free(input);
OK(runner, TIMING < 1000, "takes less than 1000ms to run");
}
}
static void source_pos(test_batch_runner *runner) {
static const char markdown[] =
"# Hi *there*.\n"
"\n"
"Hello “ <http://www.google.com>\n"
"there `hi` -- [okay](www.google.com (ok)).\n"
"\n"
"> 1. Okay.\n"
"> Sure.\n"
">\n"
"> 2. Yes, okay.\n"
"> \n";
cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
char *xml = cmark_render_xml(doc, CMARK_OPT_DEFAULT | CMARK_OPT_SOURCEPOS);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<document sourcepos=\"1:1-10:20\" xmlns=\"http://commonmark.org/xml/1.0\">\n"
" <heading sourcepos=\"1:1-1:13\" level=\"1\">\n"
" <text sourcepos=\"1:3-1:5\" xml:space=\"preserve\">Hi </text>\n"
" <emph sourcepos=\"1:6-1:12\">\n"
" <text sourcepos=\"1:7-1:11\" xml:space=\"preserve\">there</text>\n"
" </emph>\n"
" <text sourcepos=\"1:13-1:13\" xml:space=\"preserve\">.</text>\n"
" </heading>\n"
" <paragraph sourcepos=\"3:1-4:42\">\n"
" <text sourcepos=\"3:1-3:14\" xml:space=\"preserve\">Hello \xe2\x80\x9c </text>\n"
" <link sourcepos=\"3:15-3:37\" destination=\"http://www.google.com\" title=\"\">\n"
" <text sourcepos=\"3:16-3:36\" xml:space=\"preserve\">http://www.google.com</text>\n"
" </link>\n"
" <softbreak />\n"
" <text sourcepos=\"4:1-4:6\" xml:space=\"preserve\">there </text>\n"
" <code sourcepos=\"4:8-4:9\" xml:space=\"preserve\">hi</code>\n"
" <text sourcepos=\"4:11-4:14\" xml:space=\"preserve\"> -- </text>\n"
" <link sourcepos=\"4:15-4:41\" destination=\"www.google.com\" title=\"ok\">\n"
" <text sourcepos=\"4:16-4:19\" xml:space=\"preserve\">okay</text>\n"
" </link>\n"
" <text sourcepos=\"4:42-4:42\" xml:space=\"preserve\">.</text>\n"
" </paragraph>\n"
" <block_quote sourcepos=\"6:1-10:20\">\n"
" <list sourcepos=\"6:3-10:20\" type=\"ordered\" start=\"1\" delim=\"period\" tight=\"false\">\n"
" <item sourcepos=\"6:3-8:1\">\n"
" <paragraph sourcepos=\"6:6-7:10\">\n"
" <text sourcepos=\"6:6-6:10\" xml:space=\"preserve\">Okay.</text>\n"
" <softbreak />\n"
" <text sourcepos=\"7:6-7:10\" xml:space=\"preserve\">Sure.</text>\n"
" </paragraph>\n"
" </item>\n"
" <item sourcepos=\"9:3-10:20\">\n"
" <paragraph sourcepos=\"9:6-10:20\">\n"
" <text sourcepos=\"9:6-9:15\" xml:space=\"preserve\">Yes, okay.</text>\n"
" <softbreak />\n"
" <image sourcepos=\"10:6-10:20\" destination=\"hi\" title=\"yes\">\n"
" <text sourcepos=\"10:8-10:9\" xml:space=\"preserve\">ok</text>\n"
" </image>\n"
" </paragraph>\n"
" </item>\n"
" </list>\n"
" </block_quote>\n"
"</document>\n",
"sourcepos are as expected");
free(xml);
cmark_node_free(doc);
}
static void source_pos_inlines(test_batch_runner *runner) {
{
static const char markdown[] =
"*first*\n"
"second\n";
cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
char *xml = cmark_render_xml(doc, CMARK_OPT_DEFAULT | CMARK_OPT_SOURCEPOS);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<document sourcepos=\"1:1-2:6\" xmlns=\"http://commonmark.org/xml/1.0\">\n"
" <paragraph sourcepos=\"1:1-2:6\">\n"
" <emph sourcepos=\"1:1-1:7\">\n"
" <text sourcepos=\"1:2-1:6\" xml:space=\"preserve\">first</text>\n"
" </emph>\n"
" <softbreak />\n"
" <text sourcepos=\"2:1-2:6\" xml:space=\"preserve\">second</text>\n"
" </paragraph>\n"
"</document>\n",
"sourcepos are as expected");
free(xml);
cmark_node_free(doc);
}
{
static const char markdown[] =
"*first\n"
"second*\n";
cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
char *xml = cmark_render_xml(doc, CMARK_OPT_DEFAULT | CMARK_OPT_SOURCEPOS);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<document sourcepos=\"1:1-2:7\" xmlns=\"http://commonmark.org/xml/1.0\">\n"
" <paragraph sourcepos=\"1:1-2:7\">\n"
" <emph sourcepos=\"1:1-2:7\">\n"
" <text sourcepos=\"1:2-1:6\" xml:space=\"preserve\">first</text>\n"
" <softbreak />\n"
" <text sourcepos=\"2:1-2:6\" xml:space=\"preserve\">second</text>\n"
" </emph>\n"
" </paragraph>\n"
"</document>\n",
"sourcepos are as expected");
free(xml);
cmark_node_free(doc);
}
}
static void ref_source_pos(test_batch_runner *runner) {
static const char markdown[] =
"Let's try [reference] links.\n"
"\n"
"[reference]: https://github.com (GitHub)\n";
cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1, CMARK_OPT_DEFAULT);
char *xml = cmark_render_xml(doc, CMARK_OPT_DEFAULT | CMARK_OPT_SOURCEPOS);
STR_EQ(runner, xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"
"<document sourcepos=\"1:1-3:40\" xmlns=\"http://commonmark.org/xml/1.0\">\n"
" <paragraph sourcepos=\"1:1-1:28\">\n"
" <text sourcepos=\"1:1-1:10\" xml:space=\"preserve\">Let's try </text>\n"
" <link sourcepos=\"1:11-1:21\" destination=\"https://github.com\" title=\"GitHub\">\n"
" <text sourcepos=\"1:12-1:20\" xml:space=\"preserve\">reference</text>\n"
" </link>\n"
" <text sourcepos=\"1:22-1:28\" xml:space=\"preserve\"> links.</text>\n"
" </paragraph>\n"
"</document>\n",
"sourcepos are as expected");
free(xml);
cmark_node_free(doc);
}
int main() {
int retval;
test_batch_runner *runner = test_batch_runner_new();
version(runner);
constructor(runner);
accessors(runner);
node_check(runner);
iterator(runner);
iterator_delete(runner);
create_tree(runner);
custom_nodes(runner);
hierarchy(runner);
parser(runner);
render_html(runner);
render_xml(runner);
render_man(runner);
render_latex(runner);
render_commonmark(runner);
render_plaintext(runner);
utf8(runner);
line_endings(runner);
numeric_entities(runner);
test_cplusplus(runner);
test_safe(runner);
test_feed_across_line_ending(runner);
test_pathological_regressions(runner);
source_pos(runner);
source_pos_inlines(runner);
ref_source_pos(runner);
test_print_summary(runner);
retval = test_ok(runner) ? 0 : 1;
free(runner);
return retval;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/harness.c | #define _DEFAULT_SOURCE
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "harness.h"
test_batch_runner *test_batch_runner_new() {
return (test_batch_runner *)calloc(1, sizeof(test_batch_runner));
}
static void test_result(test_batch_runner *runner, int cond, const char *msg,
va_list ap) {
++runner->test_num;
if (cond) {
++runner->num_passed;
} else {
fprintf(stderr, "FAILED test %d: ", runner->test_num);
vfprintf(stderr, msg, ap);
fprintf(stderr, "\n");
++runner->num_failed;
}
}
void SKIP(test_batch_runner *runner, int num_tests) {
runner->test_num += num_tests;
runner->num_skipped += num_tests;
}
void OK(test_batch_runner *runner, int cond, const char *msg, ...) {
va_list ap;
va_start(ap, msg);
test_result(runner, cond, msg, ap);
va_end(ap);
}
void INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg,
...) {
int cond = got == expected;
va_list ap;
va_start(ap, msg);
test_result(runner, cond, msg, ap);
va_end(ap);
if (!cond) {
fprintf(stderr, " Got: %d\n", got);
fprintf(stderr, " Expected: %d\n", expected);
}
}
#ifndef _WIN32
#include <unistd.h>
static char *write_tmp(char const *header, char const *data) {
char *name = strdup("/tmp/fileXXXXXX");
int fd = mkstemp(name);
FILE *f = fdopen(fd, "w+");
fputs(header, f);
fwrite(data, 1, strlen(data), f);
fclose(f);
return name;
}
#endif
void STR_EQ(test_batch_runner *runner, const char *got, const char *expected,
const char *msg, ...) {
int cond = strcmp(got, expected) == 0;
va_list ap;
va_start(ap, msg);
test_result(runner, cond, msg, ap);
va_end(ap);
if (!cond) {
#ifndef _WIN32
char *got_fn = write_tmp("actual\n", got);
char *expected_fn = write_tmp("expected\n", expected);
char buf[1024];
snprintf(buf, sizeof(buf), "git diff --no-index %s %s", expected_fn, got_fn);
system(buf);
remove(got_fn);
remove(expected_fn);
free(got_fn);
free(expected_fn);
#else
fprintf(stderr, " Got: \"%s\"\n", got);
fprintf(stderr, " Expected: \"%s\"\n", expected);
#endif
}
}
int test_ok(test_batch_runner *runner) { return runner->num_failed == 0; }
void test_print_summary(test_batch_runner *runner) {
int num_passed = runner->num_passed;
int num_skipped = runner->num_skipped;
int num_failed = runner->num_failed;
fprintf(stderr, "%d tests passed, %d failed, %d skipped\n", num_passed,
num_failed, num_skipped);
if (test_ok(runner)) {
fprintf(stderr, "PASS\n");
} else {
fprintf(stderr, "FAIL\n");
}
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/cplusplus.h | #ifndef CMARK_API_TEST_CPLUSPLUS_H
#define CMARK_API_TEST_CPLUSPLUS_H
#include "harness.h"
#ifdef __cplusplus
extern "C" {
#endif
void test_cplusplus(test_batch_runner *runner);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/CMakeLists.txt | add_executable(api_test
cplusplus.cpp
harness.c
harness.h
main.c
)
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src
${PROJECT_BINARY_DIR}/extensions
)
if(CMARK_SHARED)
target_link_libraries(api_test libcmark-gfm-extensions libcmark-gfm)
else()
target_link_libraries(api_test libcmark-gfm-extensions_static libcmark-gfm_static)
endif()
# Compiler flags
if(MSVC)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4706 /D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP")
elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic")
endif()
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/cplusplus.cpp | #include <cstdlib>
#include "cmark-gfm.h"
#include "cplusplus.h"
#include "harness.h"
void
test_cplusplus(test_batch_runner *runner)
{
static const char md[] = "paragraph\n";
char *html = cmark_markdown_to_html(md, sizeof(md) - 1, CMARK_OPT_DEFAULT);
STR_EQ(runner, html, "<p>paragraph</p>\n", "libcmark works with C++");
free(html);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/api_test/harness.h | #ifndef CMARK_API_TEST_HARNESS_H
#define CMARK_API_TEST_HARNESS_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
int test_num;
int num_passed;
int num_failed;
int num_skipped;
} test_batch_runner;
test_batch_runner *test_batch_runner_new();
void SKIP(test_batch_runner *runner, int num_tests);
void OK(test_batch_runner *runner, int cond, const char *msg, ...);
void INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg,
...);
void STR_EQ(test_batch_runner *runner, const char *got, const char *expected,
const char *msg, ...);
int test_ok(test_batch_runner *runner);
void test_print_summary(test_batch_runner *runner);
#ifdef __cplusplus
}
#endif
#endif
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/regression.txt | ### Regression tests
Issue #113: EOL character weirdness on Windows
(Important: first line ends with CR + CR + LF)
```````````````````````````````` example
line1
line2
.
<p>line1</p>
<p>line2</p>
````````````````````````````````
Issue #114: cmark skipping first character in line
(Important: the blank lines around "Repeatedly" contain a tab.)
```````````````````````````````` example
By taking it apart
- alternative solutions
→
Repeatedly solving
→
- how techniques
.
<p>By taking it apart</p>
<ul>
<li>alternative solutions</li>
</ul>
<p>Repeatedly solving</p>
<ul>
<li>how techniques</li>
</ul>
````````````````````````````````
Issue jgm/CommonMark#430: h2..h6 not recognized as block tags.
```````````````````````````````` example
<h1>lorem</h1>
<h2>lorem</h2>
<h3>lorem</h3>
<h4>lorem</h4>
<h5>lorem</h5>
<h6>lorem</h6>
.
<h1>lorem</h1>
<h2>lorem</h2>
<h3>lorem</h3>
<h4>lorem</h4>
<h5>lorem</h5>
<h6>lorem</h6>
````````````````````````````````
Issue jgm/commonmark.js#109 - tabs after setext header line
```````````````````````````````` example
hi
--→
.
<h2>hi</h2>
````````````````````````````````
Issue #177 - incorrect emphasis parsing
```````````````````````````````` example
a***b* c*
.
<p>a*<em><em>b</em> c</em></p>
````````````````````````````````
Issue #193 - unescaped left angle brackets in link destination
```````````````````````````````` example
[a]
[a]: <te<st>
.
<p>[a]</p>
<p>[a]: <te<st></p>
````````````````````````````````
Issue #192 - escaped spaces in link destination
```````````````````````````````` example
[a](te\ st)
.
<p>[a](te\ st)</p>
````````````````````````````````
Issue github/github#76615: multiple delimiter combinations gets sketchy
```````````````````````````````` example strikethrough
~~**_`this`_**~~
~~***`this`***~~
~~___`this`___~~
**_`this`_**
***`this`***
___`this`___
~~**_this_**~~
~~***this***~~
~~___this___~~
**_this_**
***this***
___this___
.
<p><del><strong><em><code>this</code></em></strong></del><br />
<del><em><strong><code>this</code></strong></em></del><br />
<del><em><strong><code>this</code></strong></em></del></p>
<p><strong><em><code>this</code></em></strong><br />
<em><strong><code>this</code></strong></em><br />
<em><strong><code>this</code></strong></em></p>
<p><del><strong><em>this</em></strong></del><br />
<del><em><strong>this</strong></em></del><br />
<del><em><strong>this</strong></em></del></p>
<p><strong><em>this</em></strong><br />
<em><strong>this</strong></em><br />
<em><strong>this</strong></em></p>
````````````````````````````````
Issue #527 - meta tags in inline contexts
```````````````````````````````` example
City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span>
.
<p>City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span></p>
````````````````````````````````
cmark-gfm strikethrough rules
```````````````````````````````` example strikethrough
~Hi~ Hello, world!
.
<p><del>Hi</del> Hello, world!</p>
````````````````````````````````
```````````````````````````````` example strikethrough
This ~text~ ~~is~~ ~~~curious~~~.
.
<p>This <del>text</del> <del>is</del> ~~~curious~~~.</p>
````````````````````````````````
`~` should not be escaped in href — https://github.com/github/markup/issues/311
```````````````````````````````` example
[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html)
.
<p><a href="http://members.aon.at/~nkehrer/ibm_5110/emu5110.html">x</a></p>
````````````````````````````````
Footnotes in tables
```````````````````````````````` example table footnotes
A footnote in a paragraph[^1]
| Column1 | Column2 |
| --------- | ------- |
| foot [^1] | note |
[^1]: a footnote
.
<p>A footnote in a paragraph<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup></p>
<table>
<thead>
<tr>
<th>Column1</th>
<th>Column2</th>
</tr>
</thead>
<tbody>
<tr>
<td>foot <sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup></td>
<td>note</td>
</tr>
</tbody>
</table>
<section class="footnotes">
<ol>
<li id="fn1">
<p>a footnote <a href="#fnref1" class="footnote-backref">↩</a></p>
</li>
</ol>
</section>
````````````````````````````````
Issue #527 - meta tags in inline contexts
```````````````````````````````` example
City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span>
.
<p>City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span></p>
````````````````````````````````
Issue #530 - link parsing corner cases
```````````````````````````````` example
[a](\ b)
[a](<<b)
[a](<b
)
.
<p>[a](\ b)</p>
<p>[a](<<b)</p>
<p>[a](<b
)</p>
````````````````````````````````
Issue commonmark#526 - unescaped ( in link title
```````````````````````````````` example
[link](url ((title))
.
<p>[link](url ((title))</p>
````````````````````````````````
Issue commonamrk#517 - script, pre, style close tag without
opener.
```````````````````````````````` example
</script>
</pre>
</style>
.
</script>
</pre>
</style>
````````````````````````````````
Issue #289.
```````````````````````````````` example
[a](<b) c>
.
<p>[a](<b) c></p>
````````````````````````````````
Pull request #128 - Buffer overread in tables extension
```````````````````````````````` example table
|
-|
.
<p>|
-|</p>
````````````````````````````````
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/normalize.py | # -*- coding: utf-8 -*-
from html.parser import HTMLParser
import urllib
try:
from html.parser import HTMLParseError
except ImportError:
# HTMLParseError was removed in Python 3.5. It could never be
# thrown, so we define a placeholder instead.
class HTMLParseError(Exception):
pass
from html.entities import name2codepoint
import sys
import re
import html
# Normalization code, adapted from
# https://github.com/karlcow/markdown-testsuite/
significant_attrs = ["alt", "href", "src", "title"]
whitespace_re = re.compile('\s+')
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.convert_charrefs = False
self.last = "starttag"
self.in_pre = False
self.output = ""
self.last_tag = ""
def handle_data(self, data):
after_tag = self.last == "endtag" or self.last == "starttag"
after_block_tag = after_tag and self.is_block_tag(self.last_tag)
if after_tag and self.last_tag == "br":
data = data.lstrip('\n')
if not self.in_pre:
data = whitespace_re.sub(' ', data)
if after_block_tag and not self.in_pre:
if self.last == "starttag":
data = data.lstrip()
elif self.last == "endtag":
data = data.strip()
self.output += data
self.last = "data"
def handle_endtag(self, tag):
if tag == "pre":
self.in_pre = False
elif self.is_block_tag(tag):
self.output = self.output.rstrip()
self.output += "</" + tag + ">"
self.last_tag = tag
self.last = "endtag"
def handle_starttag(self, tag, attrs):
if tag == "pre":
self.in_pre = True
if self.is_block_tag(tag):
self.output = self.output.rstrip()
self.output += "<" + tag
# For now we don't strip out 'extra' attributes, because of
# raw HTML test cases.
# attrs = filter(lambda attr: attr[0] in significant_attrs, attrs)
if attrs:
attrs.sort()
for (k,v) in attrs:
self.output += " " + k
if v in ['href','src']:
self.output += ("=" + '"' +
urllib.quote(urllib.unquote(v), safe='/') + '"')
elif v != None:
self.output += ("=" + '"' + html.escape(v,quote=True) + '"')
self.output += ">"
self.last_tag = tag
self.last = "starttag"
def handle_startendtag(self, tag, attrs):
"""Ignore closing tag for self-closing """
self.handle_starttag(tag, attrs)
self.last_tag = tag
self.last = "endtag"
def handle_comment(self, data):
self.output += '<!--' + data + '-->'
self.last = "comment"
def handle_decl(self, data):
self.output += '<!' + data + '>'
self.last = "decl"
def unknown_decl(self, data):
self.output += '<!' + data + '>'
self.last = "decl"
def handle_pi(self,data):
self.output += '<?' + data + '>'
self.last = "pi"
def handle_entityref(self, name):
try:
c = chr(name2codepoint[name])
except KeyError:
c = None
self.output_char(c, '&' + name + ';')
self.last = "ref"
def handle_charref(self, name):
try:
if name.startswith("x"):
c = chr(int(name[1:], 16))
else:
c = chr(int(name))
except ValueError:
c = None
self.output_char(c, '&' + name + ';')
self.last = "ref"
# Helpers.
def output_char(self, c, fallback):
if c == '<':
self.output += "<"
elif c == '>':
self.output += ">"
elif c == '&':
self.output += "&"
elif c == '"':
self.output += """
elif c == None:
self.output += fallback
else:
self.output += c
def is_block_tag(self,tag):
return (tag in ['article', 'header', 'aside', 'hgroup', 'blockquote',
'hr', 'iframe', 'body', 'li', 'map', 'button', 'object', 'canvas',
'ol', 'caption', 'output', 'col', 'p', 'colgroup', 'pre', 'dd',
'progress', 'div', 'section', 'dl', 'table', 'td', 'dt',
'tbody', 'embed', 'textarea', 'fieldset', 'tfoot', 'figcaption',
'th', 'figure', 'thead', 'footer', 'tr', 'form', 'ul',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'video', 'script', 'style'])
def normalize_html(html):
r"""
Return normalized form of HTML which ignores insignificant output
differences:
Multiple inner whitespaces are collapsed to a single space (except
in pre tags):
>>> normalize_html("<p>a \t b</p>")
'<p>a b</p>'
>>> normalize_html("<p>a \t\nb</p>")
'<p>a b</p>'
* Whitespace surrounding block-level tags is removed.
>>> normalize_html("<p>a b</p>")
'<p>a b</p>'
>>> normalize_html(" <p>a b</p>")
'<p>a b</p>'
>>> normalize_html("<p>a b</p> ")
'<p>a b</p>'
>>> normalize_html("\n\t<p>\n\t\ta b\t\t</p>\n\t")
'<p>a b</p>'
>>> normalize_html("<i>a b</i> ")
'<i>a b</i> '
* Self-closing tags are converted to open tags.
>>> normalize_html("<br />")
'<br>'
* Attributes are sorted and lowercased.
>>> normalize_html('<a title="bar" HREF="foo">x</a>')
'<a href="foo" title="bar">x</a>'
* References are converted to unicode, except that '<', '>', '&', and
'"' are rendered using entities.
>>> normalize_html("∀&><"")
'\u2200&><"'
"""
html_chunk_re = re.compile("(\<!\[CDATA\[.*?\]\]\>|\<[^>]*\>|[^<]+)")
try:
parser = MyHTMLParser()
# We work around HTMLParser's limitations parsing CDATA
# by breaking the input into chunks and passing CDATA chunks
# through verbatim.
for chunk in re.finditer(html_chunk_re, html):
if chunk.group(0)[:8] == "<![CDATA":
parser.output += chunk.group(0)
else:
parser.feed(chunk.group(0))
parser.close()
return parser.output
except HTMLParseError as e:
sys.stderr.write("Normalization error: " + e.msg + "\n")
return html # on error, return unnormalized HTML
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/cmark-fuzz.c | #include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "cmark-gfm.h"
#include "cmark-gfm-core-extensions.h"
const char *extension_names[] = {
"autolink",
"strikethrough",
"table",
"tagfilter",
NULL,
};
int LLVMFuzzerInitialize(int *argc, char ***argv) {
cmark_gfm_core_extensions_ensure_registered();
return 0;
}
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
struct __attribute__((packed)) {
int options;
int width;
} fuzz_config;
if (size >= sizeof(fuzz_config)) {
/* The beginning of `data` is treated as fuzzer configuration */
memcpy(&fuzz_config, data, sizeof(fuzz_config));
/* Remainder of input is the markdown */
const char *markdown = (const char *)(data + sizeof(fuzz_config));
const size_t markdown_size = size - sizeof(fuzz_config);
cmark_parser *parser = cmark_parser_new(fuzz_config.options);
for (const char **it = extension_names; *it; ++it) {
const char *extension_name = *it;
cmark_syntax_extension *syntax_extension = cmark_find_syntax_extension(extension_name);
if (!syntax_extension) {
fprintf(stderr, "%s is not a valid syntax extension\n", extension_name);
abort();
}
cmark_parser_attach_syntax_extension(parser, syntax_extension);
}
cmark_parser_feed(parser, markdown, markdown_size);
cmark_node *doc = cmark_parser_finish(parser);
free(cmark_render_commonmark(doc, fuzz_config.options, fuzz_config.width));
free(cmark_render_html(doc, fuzz_config.options, NULL));
free(cmark_render_latex(doc, fuzz_config.options, fuzz_config.width));
free(cmark_render_man(doc, fuzz_config.options, fuzz_config.width));
free(cmark_render_xml(doc, fuzz_config.options));
cmark_node_free(doc);
cmark_parser_free(parser);
}
return 0;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/extensions.txt | ---
title: Extensions test
author: Yuki Izumi
version: 0.1
date: '2016-08-31'
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
...
## Tables
Here's a well-formed table, doing everything it should.
```````````````````````````````` example
| abc | def |
| --- | --- |
| ghi | jkl |
| mno | pqr |
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>ghi</td>
<td>jkl</td>
</tr>
<tr>
<td>mno</td>
<td>pqr</td>
</tr>
</tbody>
</table>
````````````````````````````````
We're going to mix up the table now; we'll demonstrate that inline formatting
works fine, but block elements don't. You can also have empty cells, and the
textual alignment of the columns is shown to be irrelevant.
```````````````````````````````` example
Hello!
| _abc_ | セン |
| ----- | ---- |
| 1. Block elements inside cells don't work. | |
| But _**inline elements do**_. | x |
Hi!
.
<p>Hello!</p>
<table>
<thead>
<tr>
<th><em>abc</em></th>
<th>セン</th>
</tr>
</thead>
<tbody>
<tr>
<td>1. Block elements inside cells don't work.</td>
<td></td>
</tr>
<tr>
<td>But <em><strong>inline elements do</strong></em>.</td>
<td>x</td>
</tr>
</tbody>
</table>
<p>Hi!</p>
````````````````````````````````
Here we demonstrate some edge cases about what is and isn't a table.
```````````````````````````````` example
| Not enough table | to be considered table |
| Not enough table | to be considered table |
| Not enough table | to be considered table |
| Just enough table | to be considered table |
| ----------------- | ---------------------- |
| ---- | --- |
|x|
|-|
| xyz |
| --- |
.
<p>| Not enough table | to be considered table |</p>
<p>| Not enough table | to be considered table |
| Not enough table | to be considered table |</p>
<table>
<thead>
<tr>
<th>Just enough table</th>
<th>to be considered table</th>
</tr>
</thead>
</table>
<p>| ---- | --- |</p>
<table>
<thead>
<tr>
<th>x</th>
</tr>
</thead>
</table>
<table>
<thead>
<tr>
<th>xyz</th>
</tr>
</thead>
</table>
````````````````````````````````
A "simpler" table, GFM style:
```````````````````````````````` example
abc | def
--- | ---
xyz | ghi
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>xyz</td>
<td>ghi</td>
</tr>
</tbody>
</table>
````````````````````````````````
We are making the parser slighly more lax here. Here is a table with spaces at
the end:
```````````````````````````````` example
Hello!
| _abc_ | セン |
| ----- | ---- |
| this row has a space at the end | |
| But _**inline elements do**_. | x |
Hi!
.
<p>Hello!</p>
<table>
<thead>
<tr>
<th><em>abc</em></th>
<th>セン</th>
</tr>
</thead>
<tbody>
<tr>
<td>this row has a space at the end</td>
<td></td>
</tr>
<tr>
<td>But <em><strong>inline elements do</strong></em>.</td>
<td>x</td>
</tr>
</tbody>
</table>
<p>Hi!</p>
````````````````````````````````
Table alignment:
```````````````````````````````` example
aaa | bbb | ccc | ddd | eee
:-- | --- | :-: | --- | --:
fff | ggg | hhh | iii | jjj
.
<table>
<thead>
<tr>
<th align="left">aaa</th>
<th>bbb</th>
<th align="center">ccc</th>
<th>ddd</th>
<th align="right">eee</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">fff</td>
<td>ggg</td>
<td align="center">hhh</td>
<td>iii</td>
<td align="right">jjj</td>
</tr>
</tbody>
</table>
````````````````````````````````
### Table cell count mismatches
The header and marker row must match.
```````````````````````````````` example
| a | b | c |
| --- | --- |
| this | isn't | okay |
.
<p>| a | b | c |
| --- | --- |
| this | isn't | okay |</p>
````````````````````````````````
But any of the body rows can be shorter. Rows longer
than the header are truncated.
```````````````````````````````` example
| a | b | c |
| --- | --- | ---
| x
| a | b
| 1 | 2 | 3 | 4 | 5 |
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>c</th>
</tr>
</thead>
<tbody>
<tr>
<td>x</td>
<td></td>
<td></td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</tbody>
</table>
````````````````````````````````
### Embedded pipes
Tables with embedded pipes could be tricky.
```````````````````````````````` example
| a | b |
| --- | --- |
| Escaped pipes are \|okay\|. | Like \| this. |
| Within `\|code\| is okay` too. |
| _**`c\|`**_ \| complex
| don't **\_reparse\_**
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>Escaped pipes are |okay|.</td>
<td>Like | this.</td>
</tr>
<tr>
<td>Within <code>|code| is okay</code> too.</td>
<td></td>
</tr>
<tr>
<td><em><strong><code>c|</code></strong></em> | complex</td>
<td></td>
</tr>
<tr>
<td>don't <strong>_reparse_</strong></td>
<td></td>
</tr>
</tbody>
</table>
````````````````````````````````
### Oddly-formatted markers
This shouldn't assert.
```````````````````````````````` example
| a |
--- |
.
<table>
<thead>
<tr>
<th>a</th>
</tr>
</thead>
</table>
````````````````````````````````
### Escaping
```````````````````````````````` example
| a | b |
| --- | --- |
| \\ | `\\` |
| \\\\ | `\\\\` |
| \_ | `\_` |
| \| | `\|` |
| \a | `\a` |
\\ `\\`
\\\\ `\\\\`
\_ `\_`
\| `\|`
\a `\a`
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>\</td>
<td><code>\\</code></td>
</tr>
<tr>
<td>\\</td>
<td><code>\\\\</code></td>
</tr>
<tr>
<td>_</td>
<td><code>\_</code></td>
</tr>
<tr>
<td>|</td>
<td><code>|</code></td>
</tr>
<tr>
<td>\a</td>
<td><code>\a</code></td>
</tr>
</tbody>
</table>
<p>\ <code>\\</code></p>
<p>\\ <code>\\\\</code></p>
<p>_ <code>\_</code></p>
<p>| <code>\|</code></p>
<p>\a <code>\a</code></p>
````````````````````````````````
### Embedded HTML
```````````````````````````````` example
| a |
| --- |
| <strong>hello</strong> |
| ok <br> sure |
.
<table>
<thead>
<tr>
<th>a</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>hello</strong></td>
</tr>
<tr>
<td>ok <br> sure</td>
</tr>
</tbody>
</table>
````````````````````````````````
### Reference-style links
```````````````````````````````` example
Here's a link to [Freedom Planet 2][].
| Here's a link to [Freedom Planet 2][] in a table header. |
| --- |
| Here's a link to [Freedom Planet 2][] in a table row. |
[Freedom Planet 2]: http://www.freedomplanet2.com/
.
<p>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a>.</p>
<table>
<thead>
<tr>
<th>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table header.</th>
</tr>
</thead>
<tbody>
<tr>
<td>Here's a link to <a href="http://www.freedomplanet2.com/">Freedom Planet 2</a> in a table row.</td>
</tr>
</tbody>
</table>
````````````````````````````````
### Sequential cells
```````````````````````````````` example
| a | b | c |
| --- | --- | --- |
| d || e |
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>c</th>
</tr>
</thead>
<tbody>
<tr>
<td>d</td>
<td></td>
<td>e</td>
</tr>
</tbody>
</table>
````````````````````````````````
### Interaction with emphasis
```````````````````````````````` example
| a | b |
| --- | --- |
|***(a)***|
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td><em><strong>(a)</strong></em></td>
<td></td>
</tr>
</tbody>
</table>
````````````````````````````````
### a table can be recognised when separated from a paragraph of text without an empty line
```````````````````````````````` example
123
456
| a | b |
| ---| --- |
d | e
.
<p>123
456</p>
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>d</td>
<td>e</td>
</tr>
</tbody>
</table>
````````````````````````````````
## Strikethroughs
A well-formed strikethrough.
```````````````````````````````` example
A proper ~strikethrough~.
.
<p>A proper <del>strikethrough</del>.</p>
````````````````````````````````
Some strikethrough edge cases.
```````````````````````````````` example
These are ~not strikethroughs.
No, they are not~
This ~is ~ legit~ isn't ~ legit.
This is not ~~~~~one~~~~~ huge strikethrough.
~one~ ~~two~~ ~~~three~~~
No ~mismatch~~
.
<p>These are ~not strikethroughs.</p>
<p>No, they are not~</p>
<p>This <del>is ~ legit</del> isn't ~ legit.</p>
<p>This is not ~~~~~one~~~~~ huge strikethrough.</p>
<p><del>one</del> <del>two</del> ~~~three~~~</p>
<p>No ~mismatch~~</p>
````````````````````````````````
Using 200 tilde since it overflows the internal buffer
size (100) for parsing delimiters in inlines.c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~striked~
## Autolinks
```````````````````````````````` example
: http://google.com https://google.com
<http://google.com/å> http://google.com/å
[email protected]
www.github.com www.github.com/á
www.google.com/a_b
**Autolink and http://inlines**

[email protected]
Full stop outside parens shouldn't be included http://google.com/ok.
(Full stop inside parens shouldn't be included http://google.com/ok.)
"http://google.com"
'http://google.com'
http://🍄.ga/ http://x🍄.ga/
.
<p>: <a href="http://google.com">http://google.com</a> <a href="https://google.com">https://google.com</a></p>
<p><a href="http://google.com/%C3%A5">http://google.com/å</a> <a href="http://google.com/%C3%A5">http://google.com/å</a></p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="http://www.github.com">www.github.com</a> <a href="http://www.github.com/%C3%A1">www.github.com/á</a></p>
<p><a href="http://www.google.com/a_b">www.google.com/a_b</a></p>
<p><strong>Autolink and <a href="http://inlines">http://inlines</a></strong></p>
<p><img src="http://inline.com/image" alt="http://inline.com/image" /></p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p>Full stop outside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.</p>
<p>(Full stop inside parens shouldn't be included <a href="http://google.com/ok">http://google.com/ok</a>.)</p>
<p>"<a href="http://google.com">http://google.com</a>"</p>
<p>'<a href="http://google.com">http://google.com</a>'</p>
<p><a href="http://%F0%9F%8D%84.ga/">http://🍄.ga/</a> <a href="http://x%F0%9F%8D%84.ga/">http://x🍄.ga/</a></p>
````````````````````````````````
```````````````````````````````` example
This shouldn't crash everything: (_A_@_.A
.
<IGNORE>
````````````````````````````````
```````````````````````````````` example
These should not link:
* @a.b.c@. x
* n@. b
.
<p>These should not link:</p>
<ul>
<li>@a.b.c@. x</li>
<li>n@. b</li>
</ul>
````````````````````````````````
## HTML tag filter
```````````````````````````````` example
This is <xmp> not okay, but **this** <strong>is</strong>.
<p>This is <xmp> not okay, but **this** <strong>is</strong>.</p>
Nope, I won't have <textarea>.
<p>No <textarea> here either.</p>
<p>This <random /> <thing> is okay</thing> though.</p>
Yep, <totally>okay</totally>.
<!-- HTML comments are okay, though. -->
<!- But we're strict. ->
<! No nonsense. >
<!-- Leave multiline comments the heck alone, though, okay?
Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**.
-->
<!--- Support everything CommonMark's parser does. -->
<!---->
<!--thistoo-->
.
<p>This is <xmp> not okay, but <strong>this</strong> <strong>is</strong>.</p>
<p>This is <xmp> not okay, but **this** <strong>is</strong>.</p>
<p>Nope, I won't have <textarea>.</p>
<p>No <textarea> here either.</p>
<p>This <random /> <thing> is okay</thing> though.</p>
<p>Yep, <totally>okay</totally>.</p>
<!-- HTML comments are okay, though. -->
<p><!- But we're strict. ->
<! No nonsense. ></p>
<!-- Leave multiline comments the heck alone, though, okay?
Even with {"x":"y"} or 1 > 2 or whatever. Even **markdown**.
-->
<!--- Support everything CommonMark's parser does. -->
<!---->
<!--thistoo-->
````````````````````````````````
## Footnotes
```````````````````````````````` example
This is some text![^1]. Other text.[^footnote].
Here's a thing[^other-note].
And another thing[^codeblock-note].
This doesn't have a referent[^nope].
[^other-note]: no code block here (spaces are stripped away)
[^codeblock-note]:
this is now a code block (8 spaces indentation)
[^1]: Some *bolded* footnote definition.
Hi!
[^footnote]:
> Blockquotes can be in a footnote.
as well as code blocks
or, naturally, simple paragraphs.
[^unused]: This is unused.
.
<p>This is some text!<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn2" id="fnref2">2</a></sup>.</p>
<p>Here's a thing<sup class="footnote-ref"><a href="#fn3" id="fnref3">3</a></sup>.</p>
<p>And another thing<sup class="footnote-ref"><a href="#fn4" id="fnref4">4</a></sup>.</p>
<p>This doesn't have a referent[^nope].</p>
<p>Hi!</p>
<section class="footnotes">
<ol>
<li id="fn1">
<p>Some <em>bolded</em> footnote definition. <a href="#fnref1" class="footnote-backref">↩</a></p>
</li>
<li id="fn2">
<blockquote>
<p>Blockquotes can be in a footnote.</p>
</blockquote>
<pre><code>as well as code blocks
</code></pre>
<p>or, naturally, simple paragraphs. <a href="#fnref2" class="footnote-backref">↩</a></p>
</li>
<li id="fn3">
<p>no code block here (spaces are stripped away) <a href="#fnref3" class="footnote-backref">↩</a></p>
</li>
<li id="fn4">
<pre><code>this is now a code block (8 spaces indentation)
</code></pre>
<a href="#fnref4" class="footnote-backref">↩</a>
</li>
</ol>
</section>
````````````````````````````````
## Interop
Autolink and strikethrough.
```````````````````````````````` example
~~www.google.com~~
~~http://google.com~~
.
<p><del><a href="http://www.google.com">www.google.com</a></del></p>
<p><del><a href="http://google.com">http://google.com</a></del></p>
````````````````````````````````
Autolink and tables.
```````````````````````````````` example
| a | b |
| --- | --- |
| https://github.com www.github.com | http://pokemon.com |
.
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td>
<td><a href="http://pokemon.com">http://pokemon.com</a></td>
</tr>
</tbody>
</table>
````````````````````````````````
## Task lists
```````````````````````````````` example
- [ ] foo
- [x] bar
.
<ul>
<li><input type="checkbox" disabled="" /> foo</li>
<li><input type="checkbox" checked="" disabled="" /> bar</li>
</ul>
````````````````````````````````
Show that a task list and a regular list get processed the same in
the way that sublists are created. If something works in a list
item, then it should work the same way with a task. The only
difference should be the tasklist marker. So, if we use something
other than a space or x, it won't be recognized as a task item, and
so will be treated as a regular item.
```````````````````````````````` example
- [x] foo
- [ ] bar
- [x] baz
- [ ] bim
Show a regular (non task) list to show that it has the same structure
- [@] foo
- [@] bar
- [@] baz
- [@] bim
.
<ul>
<li><input type="checkbox" checked="" disabled="" /> foo
<ul>
<li><input type="checkbox" disabled="" /> bar</li>
<li><input type="checkbox" checked="" disabled="" /> baz</li>
</ul>
</li>
<li><input type="checkbox" disabled="" /> bim</li>
</ul>
<p>Show a regular (non task) list to show that it has the same structure</p>
<ul>
<li>[@] foo
<ul>
<li>[@] bar</li>
<li>[@] baz</li>
</ul>
</li>
<li>[@] bim</li>
</ul>
````````````````````````````````
Use a larger indent -- a task list and a regular list should produce
the same structure.
```````````````````````````````` example
- [x] foo
- [ ] bar
- [x] baz
- [ ] bim
Show a regular (non task) list to show that it has the same structure
- [@] foo
- [@] bar
- [@] baz
- [@] bim
.
<ul>
<li><input type="checkbox" checked="" disabled="" /> foo
<ul>
<li><input type="checkbox" disabled="" /> bar</li>
<li><input type="checkbox" checked="" disabled="" /> baz</li>
</ul>
</li>
<li><input type="checkbox" disabled="" /> bim</li>
</ul>
<p>Show a regular (non task) list to show that it has the same structure</p>
<ul>
<li>[@] foo
<ul>
<li>[@] bar</li>
<li>[@] baz</li>
</ul>
</li>
<li>[@] bim</li>
</ul>
````````````````````````````````
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/smart_punct.txt | ## Smart punctuation
Open quotes are matched with closed quotes.
The same method is used for matching openers and closers
as is used in emphasis parsing:
```````````````````````````````` example
"Hello," said the spider.
"'Shelob' is my name."
.
<p>“Hello,” said the spider.
“‘Shelob’ is my name.”</p>
````````````````````````````````
```````````````````````````````` example
'A', 'B', and 'C' are letters.
.
<p>‘A’, ‘B’, and ‘C’ are letters.</p>
````````````````````````````````
```````````````````````````````` example
'Oak,' 'elm,' and 'beech' are names of trees.
So is 'pine.'
.
<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees.
So is ‘pine.’</p>
````````````````````````````````
```````````````````````````````` example
'He said, "I want to go."'
.
<p>‘He said, “I want to go.”’</p>
````````````````````````````````
A single quote that isn't an open quote matched
with a close quote will be treated as an
apostrophe:
```````````````````````````````` example
Were you alive in the 70's?
.
<p>Were you alive in the 70’s?</p>
````````````````````````````````
```````````````````````````````` example
Here is some quoted '`code`' and a "[quoted link](url)".
.
<p>Here is some quoted ‘<code>code</code>’ and a “<a href="url">quoted link</a>”.</p>
````````````````````````````````
Here the first `'` is treated as an apostrophe, not
an open quote, because the final single quote is matched
by the single quote before `jolly`:
```````````````````````````````` example
'tis the season to be 'jolly'
.
<p>’tis the season to be ‘jolly’</p>
````````````````````````````````
Multiple apostrophes should not be marked as open/closing quotes.
```````````````````````````````` example
'We'll use Jane's boat and John's truck,' Jenna said.
.
<p>‘We’ll use Jane’s boat and John’s truck,’ Jenna said.</p>
````````````````````````````````
An unmatched double quote will be interpreted as a
left double quote, to facilitate this style:
```````````````````````````````` example
"A paragraph with no closing quote.
"Second paragraph by same speaker, in fiction."
.
<p>“A paragraph with no closing quote.</p>
<p>“Second paragraph by same speaker, in fiction.”</p>
````````````````````````````````
A quote following a `]` or `)` character cannot
be an open quote:
```````````````````````````````` example
[a]'s b'
.
<p>[a]’s b’</p>
````````````````````````````````
Quotes that are escaped come out as literal straight
quotes:
```````````````````````````````` example
\"This is not smart.\"
This isn\'t either.
5\'8\"
.
<p>"This is not smart."
This isn't either.
5'8"</p>
````````````````````````````````
Two hyphens form an en-dash, three an em-dash.
```````````````````````````````` example
Some dashes: em---em
en--en
em --- em
en -- en
2--3
.
<p>Some dashes: em—em
en–en
em — em
en – en
2–3</p>
````````````````````````````````
A sequence of more than three hyphens is
parsed as a sequence of em and/or en dashes,
with no hyphens. If possible, a homogeneous
sequence of dashes is used (so, 10 hyphens
= 5 en dashes, and 9 hyphens = 3 em dashes).
When a heterogeneous sequence must be used,
the em dashes come first, followed by the en
dashes, and as few en dashes as possible are
used (so, 7 hyphens = 2 em dashes an 1 en
dash).
```````````````````````````````` example
one-
two--
three---
four----
five-----
six------
seven-------
eight--------
nine---------
thirteen-------------.
.
<p>one-
two–
three—
four––
five—–
six——
seven—––
eight––––
nine———
thirteen———––.</p>
````````````````````````````````
Hyphens can be escaped:
```````````````````````````````` example
Escaped hyphens: \-- \-\-\-.
.
<p>Escaped hyphens: -- ---.</p>
````````````````````````````````
Three periods form an ellipsis:
```````````````````````````````` example
Ellipses...and...and....
.
<p>Ellipses…and…and….</p>
````````````````````````````````
Periods can be escaped if ellipsis-formation
is not wanted:
```````````````````````````````` example
No ellipses\.\.\.
.
<p>No ellipses...</p>
````````````````````````````````
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/spec_tests.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from difflib import unified_diff
import argparse
import re
import json
from cmark import CMark
from normalize import normalize_html
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Run cmark tests.')
parser.add_argument('-p', '--program', dest='program', nargs='?', default=None,
help='program to test')
parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt',
help='path to spec')
parser.add_argument('-P', '--pattern', dest='pattern', nargs='?',
default=None, help='limit to sections matching regex pattern')
parser.add_argument('--library-dir', dest='library_dir', nargs='?',
default=None, help='directory containing dynamic library')
parser.add_argument('--extensions', dest='extensions', nargs='?',
default=None, help='space separated list of extensions to enable')
parser.add_argument('--no-normalize', dest='normalize',
action='store_const', const=False, default=True,
help='do not normalize HTML')
parser.add_argument('-d', '--dump-tests', dest='dump_tests',
action='store_const', const=True, default=False,
help='dump tests in JSON format')
parser.add_argument('--debug-normalization', dest='debug_normalization',
action='store_const', const=True,
default=False, help='filter stdin through normalizer for testing')
parser.add_argument('-n', '--number', type=int, default=None,
help='only consider the test with the given number')
args = parser.parse_args(sys.argv[1:])
def out(str):
sys.stdout.buffer.write(str.encode('utf-8'))
def print_test_header(headertext, example_number, start_line, end_line):
out("Example %d (lines %d-%d) %s\n" % (example_number,start_line,end_line,headertext))
def do_test(converter, test, normalize, result_counts):
[retcode, actual_html, err] = converter(test['markdown'], test['extensions'])
actual_html = re.sub(r'\r\n', '\n', actual_html)
if retcode == 0:
expected_html = re.sub(r'\r\n', '\n', test['html'])
unicode_error = None
if expected_html.strip() == '<IGNORE>':
passed = True
elif normalize:
try:
passed = normalize_html(actual_html) == normalize_html(expected_html)
except UnicodeDecodeError as e:
unicode_error = e
passed = False
else:
passed = actual_html == expected_html
if passed:
result_counts['pass'] += 1
else:
print_test_header(test['section'], test['example'], test['start_line'], test['end_line'])
out(test['markdown'] + '\n')
if unicode_error:
out("Unicode error: " + str(unicode_error) + '\n')
out("Expected: " + repr(expected_html) + '\n')
out("Got: " + repr(actual_html) + '\n')
else:
expected_html_lines = expected_html.splitlines(True)
actual_html_lines = actual_html.splitlines(True)
for diffline in unified_diff(expected_html_lines, actual_html_lines,
"expected HTML", "actual HTML"):
out(diffline)
out('\n')
result_counts['fail'] += 1
else:
print_test_header(test['section'], test['example'], test['start_line'], test['end_line'])
out("program returned error code %d\n" % retcode)
sys.stdout.buffer.write(err)
result_counts['error'] += 1
def get_tests(specfile):
line_number = 0
start_line = 0
end_line = 0
example_number = 0
markdown_lines = []
html_lines = []
state = 0 # 0 regular text, 1 markdown example, 2 html output
extensions = []
headertext = ''
tests = []
header_re = re.compile('#+ ')
with open(specfile, 'r', encoding='utf-8', newline='\n') as specf:
for line in specf:
line_number = line_number + 1
l = line.strip()
if l.startswith("`" * 32 + " example"):
state = 1
extensions = l[32 + len(" example"):].split()
elif l == "`" * 32:
state = 0
example_number = example_number + 1
end_line = line_number
if 'disabled' not in extensions:
tests.append({
"markdown":''.join(markdown_lines).replace('→',"\t"),
"html":''.join(html_lines).replace('→',"\t"),
"example": example_number,
"start_line": start_line,
"end_line": end_line,
"section": headertext,
"extensions": extensions})
start_line = 0
markdown_lines = []
html_lines = []
elif l == ".":
state = 2
elif state == 1:
if start_line == 0:
start_line = line_number - 1
markdown_lines.append(line)
elif state == 2:
html_lines.append(line)
elif state == 0 and re.match(header_re, line):
headertext = header_re.sub('', line).strip()
return tests
if __name__ == "__main__":
if args.debug_normalization:
out(normalize_html(sys.stdin.read()))
exit(0)
all_tests = get_tests(args.spec)
if args.pattern:
pattern_re = re.compile(args.pattern, re.IGNORECASE)
else:
pattern_re = re.compile('.')
tests = [ test for test in all_tests if re.search(pattern_re, test['section']) and (not args.number or test['example'] == args.number) ]
if args.dump_tests:
out(json.dumps(tests, indent=2))
exit(0)
else:
skipped = len(all_tests) - len(tests)
converter = CMark(prog=args.program, library_dir=args.library_dir, extensions=args.extensions).to_html
result_counts = {'pass': 0, 'fail': 0, 'error': 0, 'skip': skipped}
for test in tests:
do_test(converter, test, args.normalize, result_counts)
out("{pass} passed, {fail} failed, {error} errored, {skip} skipped\n".format(**result_counts))
exit(result_counts['fail'] + result_counts['error'])
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/CMakeLists.txt | # To get verbose output: cmake --build build --target "test" -- ARGS='-V'
# By default, we run the spec tests only if python3 is available.
# To require the spec tests, compile with -DSPEC_TESTS=1
if (SPEC_TESTS)
find_package(PythonInterp 3 REQUIRED)
else(SPEC_TESTS)
find_package(PythonInterp 3)
endif(SPEC_TESTS)
if (CMARK_SHARED OR CMARK_STATIC)
add_test(NAME api_test COMMAND api_test)
endif()
if (WIN32)
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_SRC_DLL_DIR)
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/extensions WIN_EXTENSIONS_DLL_DIR)
set(NEWPATH "${WIN_SRC_DLL_DIR};${WIN_EXTENSIONS_DLL_DIR};$ENV{PATH}")
string(REPLACE ";" "\\;" NEWPATH "${NEWPATH}")
set_tests_properties(api_test PROPERTIES ENVIRONMENT "PATH=${NEWPATH}")
set(ROUNDTRIP "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip.bat")
else(WIN32)
set(ROUNDTRIP "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip.sh")
endif(WIN32)
IF (PYTHONINTERP_FOUND)
add_test(html_normalization
${PYTHON_EXECUTABLE} "-m" "doctest"
"${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
)
if (CMARK_SHARED)
add_test(spectest_library
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
"${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src"
)
add_test(pathological_tests_library
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src"
)
add_test(roundtriptest_library
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py"
"--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt"
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src"
)
add_test(entity_library
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py"
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src"
)
endif()
add_test(spectest_executable
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm"
)
add_test(smartpuncttest_executable
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/smart_punct.txt" "--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm --smart"
)
add_test(extensions_executable
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py"
"--no-normalize"
"--spec" "${CMAKE_CURRENT_SOURCE_DIR}/extensions.txt"
"--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm"
"--extensions" "table strikethrough autolink tagfilter footnotes tasklist"
)
add_test(roundtrip_extensions_executable
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py"
"--spec" "${CMAKE_CURRENT_SOURCE_DIR}/extensions.txt"
"--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm"
"--extensions" "table strikethrough autolink tagfilter footnotes tasklist"
)
add_test(option_table_prefer_style_attributes
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py"
"--spec" "${CMAKE_CURRENT_SOURCE_DIR}/extensions-table-prefer-style-attributes.txt"
"--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm --table-prefer-style-attributes"
"--extensions" "table strikethrough autolink tagfilter footnotes tasklist"
)
add_test(option_full_info_string
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py"
"--spec" "${CMAKE_CURRENT_SOURCE_DIR}/extensions-full-info-string.txt"
"--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm --full-info-string"
)
add_test(regressiontest_executable
${PYTHON_EXECUTABLE}
"${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
"${CMAKE_CURRENT_SOURCE_DIR}/regression.txt" "--program"
"${CMAKE_CURRENT_BINARY_DIR}/../src/cmark-gfm"
)
ELSE(PYTHONINTERP_FOUND)
message("\n*** A python 3 interpreter is required to run the spec tests.\n")
add_test(skipping_spectests
echo "Skipping spec tests, because no python 3 interpreter is available.")
ENDIF(PYTHONINTERP_FOUND)
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/extensions-full-info-string.txt | ---
title: --full-info-string test
author: Ashe Connor
version: 0.1
date: '2018-08-08'
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
...
## `--full-info-string`
Without extended info:
```````````````````````````````` example
```ruby
module Foo
```
.
<pre><code class="language-ruby">module Foo
</code></pre>
````````````````````````````````
With extended info:
```````````````````````````````` example
```ruby some <extra> "data"
module Foo
```
.
<pre><code class="language-ruby" data-meta="some <extra> "data"">module Foo
</code></pre>
````````````````````````````````
With an embedded NUL:
```````````````````````````````` example
```ruby nul |
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/entity_tests.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import os
import argparse
import sys
import platform
import html
from cmark import CMark
def get_entities():
regex = r'^{\(unsigned char\*\)"([^"]+)", \{([^}]+)\}'
with open(os.path.join(os.path.dirname(__file__), '..', 'src', 'entities.inc')) as f:
code = f.read()
entities = []
for entity, utf8 in re.findall(regex, code, re.MULTILINE):
utf8 = bytes(map(int, utf8.split(", ")[:-1])).decode('utf-8')
entities.append((entity, utf8))
return entities
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Run cmark tests.')
parser.add_argument('--program', dest='program', nargs='?', default=None,
help='program to test')
parser.add_argument('--library-dir', dest='library_dir', nargs='?',
default=None, help='directory containing dynamic library')
args = parser.parse_args(sys.argv[1:])
cmark = CMark(prog=args.program, library_dir=args.library_dir)
entities = get_entities()
passed = 0
errored = 0
failed = 0
exceptions = {
'quot': '"',
'QUOT': '"',
# These are broken, but I'm not too worried about them.
'nvlt': '<⃒',
'nvgt': '>⃒',
}
print("Testing entities:")
for entity, utf8 in entities:
[rc, actual, err] = cmark.to_html("&{};".format(entity))
check = exceptions.get(entity, utf8)
if rc != 0:
errored += 1
print(entity, '[ERRORED (return code {})]'.format(rc))
print(err)
elif check in actual:
passed += 1
else:
print(entity, '[FAILED]')
print(repr(actual))
failed += 1
print("{} passed, {} failed, {} errored".format(passed, failed, errored))
if failed == 0 and errored == 0:
exit(0)
else:
exit(1)
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/pathological_tests.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import argparse
import sys
import platform
import itertools
import multiprocessing
from cmark import CMark
def hash_collisions():
REFMAP_SIZE = 16
COUNT = 50000
def badhash(ref):
h = 0
for c in ref:
a = (h << 6) & 0xFFFFFFFF
b = (h << 16) & 0xFFFFFFFF
h = ord(c) + a + b - h
h = h & 0xFFFFFFFF
return (h % REFMAP_SIZE) == 0
keys = ("x%d" % i for i in itertools.count())
collisions = itertools.islice((k for k in keys if badhash(k)), COUNT)
bad_key = next(collisions)
document = ''.join("[%s]: /url\n\n[%s]\n\n" % (key, bad_key) for key in collisions)
return document, re.compile("(<p>\[%s\]</p>\n){%d}" % (bad_key, COUNT-1))
allowed_failures = {"many references": True}
# list of pairs consisting of input and a regex that must match the output.
pathological = {
# note - some pythons have limit of 65535 for {num-matches} in re.
"nested strong emph":
(("*a **a " * 65000) + "b" + (" a** a*" * 65000),
re.compile("(<em>a <strong>a ){65000}b( a</strong> a</em>){65000}")),
"many emph closers with no openers":
(("a_ " * 65000),
re.compile("(a[_] ){64999}a_")),
"many emph openers with no closers":
(("_a " * 65000),
re.compile("(_a ){64999}_a")),
"many link closers with no openers":
(("a]" * 65000),
re.compile("(a\]){65000}")),
"many link openers with no closers":
(("[a" * 65000),
re.compile("(\[a){65000}")),
"mismatched openers and closers":
(("*a_ " * 50000),
re.compile("([*]a[_] ){49999}[*]a_")),
"openers and closers multiple of 3":
(("a**b" + ("c* " * 50000)),
re.compile("a[*][*]b(c[*] ){49999}c[*]")),
"link openers and emph closers":
(("[ a_" * 50000),
re.compile("(\[ a_){50000}")),
"pattern [ (]( repeated":
(("[ (](" * 80000),
re.compile("(\[ \(\]\(){80000}")),
"hard link/emph case":
("**x [a*b**c*](d)",
re.compile("\\*\\*x <a href=\"d\">a<em>b\\*\\*c</em></a>")),
"nested brackets":
(("[" * 50000) + "a" + ("]" * 50000),
re.compile("\[{50000}a\]{50000}")),
"nested block quotes":
((("> " * 50000) + "a"),
re.compile("(<blockquote>\n){50000}")),
"deeply nested lists":
("".join(map(lambda x: (" " * x + "* a\n"), range(0,1000))),
re.compile("<ul>\n(<li>a\n<ul>\n){999}<li>a</li>\n</ul>\n(</li>\n</ul>\n){999}")),
"U+0000 in input":
("abc\u0000de\u0000",
re.compile("abc\ufffd?de\ufffd?")),
"backticks":
("".join(map(lambda x: ("e" + "`" * x), range(1,5000))),
re.compile("^<p>[e`]*</p>\n$")),
"unclosed links A":
("[a](<b" * 30000,
re.compile("(\[a\]\(<b){30000}")),
"unclosed links B":
("[a](b" * 30000,
re.compile("(\[a\]\(b){30000}")),
"tables":
("aaa\rbbb\n-\v\n" * 30000,
re.compile("^<p>aaa</p>\n<table>\n<thead>\n<tr>\n<th>bbb</th>\n</tr>\n</thead>\n<tbody>\n(<tr>\n<td>aaa</td>\n</tr>\n<tr>\n<td>bbb</td>\n</tr>\n<tr>\n<td>-\x0b</td>\n</tr>\n){29999}</tbody>\n</table>\n$")),
# "many references":
# ("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,5000 * 16))) + "[0] " * 5000,
# re.compile("(\[0\] ){4999}")),
"reference collisions": hash_collisions()
}
whitespace_re = re.compile('/s+/')
passed = 0
errored = 0
ignored = 0
TIMEOUT = 5
def run_test(inp, regex):
parser = argparse.ArgumentParser(description='Run cmark tests.')
parser.add_argument('--program', dest='program', nargs='?', default=None,
help='program to test')
parser.add_argument('--library-dir', dest='library_dir', nargs='?',
default=None, help='directory containing dynamic library')
args = parser.parse_args(sys.argv[1:])
cmark = CMark(prog=args.program, library_dir=args.library_dir, extensions="table")
[rc, actual, err] = cmark.to_html(inp)
if rc != 0:
print('[ERRORED (return code %d)]' % rc)
print(err)
exit(1)
elif regex.search(actual):
print('[PASSED]')
else:
print('[FAILED (mismatch)]')
print(repr(actual))
exit(1)
if __name__ == '__main__':
print("Testing pathological cases:")
for description in pathological:
(inp, regex) = pathological[description]
print(description, "... ", end='')
sys.stdout.flush()
p = multiprocessing.Process(target=run_test, args=(inp, regex))
p.start()
p.join(TIMEOUT)
if p.is_alive():
p.terminate()
p.join()
print('[TIMED OUT]')
if allowed_failures[description]:
ignored += 1
else:
errored += 1
elif p.exitcode != 0:
if allowed_failures[description]:
ignored += 1
else:
errored += 1
else:
passed += 1
print("%d passed, %d errored, %d ignored" % (passed, errored, ignored))
exit(errored)
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/spec.txt | ---
title: GitHub Flavored Markdown Spec
version: 0.29
date: '2019-04-06'
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
...
# Introduction
## What is GitHub Flavored Markdown?
GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown
that is currently supported for user content on GitHub.com and GitHub
Enterprise.
This formal specification, based on the CommonMark Spec, defines the syntax and
semantics of this dialect.
GFM is a strict superset of CommonMark. All the features which are supported in
GitHub user content and that are not specified on the original CommonMark Spec
are hence known as **extensions**, and highlighted as such.
While GFM supports a wide range of inputs, it's worth noting that GitHub.com
and GitHub Enterprise perform additional post-processing and sanitization after
GFM is converted to HTML to ensure security and consistency of the website.
## What is Markdown?
Markdown is a plain text format for writing structured documents,
based on conventions for indicating formatting in email
and usenet posts. It was developed by John Gruber (with
help from Aaron Swartz) and released in 2004 in the form of a
[syntax description](http://daringfireball.net/projects/markdown/syntax)
and a Perl script (`Markdown.pl`) for converting Markdown to
HTML. In the next decade, dozens of implementations were
developed in many languages. Some extended the original
Markdown syntax with conventions for footnotes, tables, and
other document elements. Some allowed Markdown documents to be
rendered in formats other than HTML. Websites like Reddit,
StackOverflow, and GitHub had millions of people using Markdown.
And Markdown started to be used beyond the web, to author books,
articles, slide shows, letters, and lecture notes.
What distinguishes Markdown from many other lightweight markup
syntaxes, which are often easier to write, is its readability.
As Gruber writes:
> The overriding design goal for Markdown's formatting syntax is
> to make it as readable as possible. The idea is that a
> Markdown-formatted document should be publishable as-is, as
> plain text, without looking like it's been marked up with tags
> or formatting instructions.
> (<http://daringfireball.net/projects/markdown/>)
The point can be illustrated by comparing a sample of
[AsciiDoc](http://www.methods.co.nz/asciidoc/) with
an equivalent sample of Markdown. Here is a sample of
AsciiDoc from the AsciiDoc manual:
```
1. List item one.
+
List item one continued with a second paragraph followed by an
Indented block.
+
.................
$ ls *.sh
$ mv *.sh ~/tmp
.................
+
List item continued with a third paragraph.
2. List item two continued with an open block.
+
--
This paragraph is part of the preceding list item.
a. This list is nested and does not require explicit item
continuation.
+
This paragraph is part of the preceding list item.
b. List item b.
This paragraph belongs to item two of the outer list.
--
```
And here is the equivalent in Markdown:
```
1. List item one.
List item one continued with a second paragraph followed by an
Indented block.
$ ls *.sh
$ mv *.sh ~/tmp
List item continued with a third paragraph.
2. List item two continued with an open block.
This paragraph is part of the preceding list item.
1. This list is nested and does not require explicit item continuation.
This paragraph is part of the preceding list item.
2. List item b.
This paragraph belongs to item two of the outer list.
```
The AsciiDoc version is, arguably, easier to write. You don't need
to worry about indentation. But the Markdown version is much easier
to read. The nesting of list items is apparent to the eye in the
source, not just in the processed document.
## Why is a spec needed?
John Gruber's [canonical description of Markdown's
syntax](http://daringfireball.net/projects/markdown/syntax)
does not specify the syntax unambiguously. Here are some examples of
questions it does not answer:
1. How much indentation is needed for a sublist? The spec says that
continuation paragraphs need to be indented four spaces, but is
not fully explicit about sublists. It is natural to think that
they, too, must be indented four spaces, but `Markdown.pl` does
not require that. This is hardly a "corner case," and divergences
between implementations on this issue often lead to surprises for
users in real documents. (See [this comment by John
Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).)
2. Is a blank line needed before a block quote or heading?
Most implementations do not require the blank line. However,
this can lead to unexpected results in hard-wrapped text, and
also to ambiguities in parsing (note that some implementations
put the heading inside the blockquote, while others do not).
(John Gruber has also spoken [in favor of requiring the blank
lines](http://article.gmane.org/gmane.text.markdown.general/2146).)
3. Is a blank line needed before an indented code block?
(`Markdown.pl` requires it, but this is not mentioned in the
documentation, and some implementations do not require it.)
``` markdown
paragraph
code?
```
4. What is the exact rule for determining when list items get
wrapped in `<p>` tags? Can a list be partially "loose" and partially
"tight"? What should we do with a list like this?
``` markdown
1. one
2. two
3. three
```
Or this?
``` markdown
1. one
- a
- b
2. two
```
(There are some relevant comments by John Gruber
[here](http://article.gmane.org/gmane.text.markdown.general/2554).)
5. Can list markers be indented? Can ordered list markers be right-aligned?
``` markdown
8. item 1
9. item 2
10. item 2a
```
6. Is this one list with a thematic break in its second item,
or two lists separated by a thematic break?
``` markdown
* a
* * * * *
* b
```
7. When list markers change from numbers to bullets, do we have
two lists or one? (The Markdown syntax description suggests two,
but the perl scripts and many other implementations produce one.)
``` markdown
1. fee
2. fie
- foe
- fum
```
8. What are the precedence rules for the markers of inline structure?
For example, is the following a valid link, or does the code span
take precedence ?
``` markdown
[a backtick (`)](/url) and [another backtick (`)](/url).
```
9. What are the precedence rules for markers of emphasis and strong
emphasis? For example, how should the following be parsed?
``` markdown
*foo *bar* baz*
```
10. What are the precedence rules between block-level and inline-level
structure? For example, how should the following be parsed?
``` markdown
- `a long code span can contain a hyphen like this
- and it can screw things up`
```
11. Can list items include section headings? (`Markdown.pl` does not
allow this, but does allow blockquotes to include headings.)
``` markdown
- # Heading
```
12. Can list items be empty?
``` markdown
* a
*
* b
```
13. Can link references be defined inside block quotes or list items?
``` markdown
> Blockquote [foo].
>
> [foo]: /url
```
14. If there are multiple definitions for the same reference, which takes
precedence?
``` markdown
[foo]: /url1
[foo]: /url2
[foo][]
```
In the absence of a spec, early implementers consulted `Markdown.pl`
to resolve these ambiguities. But `Markdown.pl` was quite buggy, and
gave manifestly bad results in many cases, so it was not a
satisfactory replacement for a spec.
Because there is no unambiguous spec, implementations have diverged
considerably. As a result, users are often surprised to find that
a document that renders one way on one system (say, a GitHub wiki)
renders differently on another (say, converting to docbook using
pandoc). To make matters worse, because nothing in Markdown counts
as a "syntax error," the divergence often isn't discovered right away.
## About this document
This document attempts to specify Markdown syntax unambiguously.
It contains many examples with side-by-side Markdown and
HTML. These are intended to double as conformance tests. An
accompanying script `spec_tests.py` can be used to run the tests
against any Markdown program:
python test/spec_tests.py --spec spec.txt --program PROGRAM
Since this document describes how Markdown is to be parsed into
an abstract syntax tree, it would have made sense to use an abstract
representation of the syntax tree instead of HTML. But HTML is capable
of representing the structural distinctions we need to make, and the
choice of HTML for the tests makes it possible to run the tests against
an implementation without writing an abstract syntax tree renderer.
This document is generated from a text file, `spec.txt`, written
in Markdown with a small extension for the side-by-side tests.
The script `tools/makespec.py` can be used to convert `spec.txt` into
HTML or CommonMark (which can then be converted into other formats).
In the examples, the `→` character is used to represent tabs.
# Preliminaries
## Characters and lines
Any sequence of [characters] is a valid CommonMark
document.
A [character](@) is a Unicode code point. Although some
code points (for example, combining accents) do not correspond to
characters in an intuitive sense, all code points count as characters
for purposes of this spec.
This spec does not specify an encoding; it thinks of lines as composed
of [characters] rather than bytes. A conforming parser may be limited
to a certain encoding.
A [line](@) is a sequence of zero or more [characters]
other than newline (`U+000A`) or carriage return (`U+000D`),
followed by a [line ending] or by the end of file.
A [line ending](@) is a newline (`U+000A`), a carriage return
(`U+000D`) not followed by a newline, or a carriage return and a
following newline.
A line containing no characters, or a line containing only spaces
(`U+0020`) or tabs (`U+0009`), is called a [blank line](@).
The following definitions of character classes will be used in this spec:
A [whitespace character](@) is a space
(`U+0020`), tab (`U+0009`), newline (`U+000A`), line tabulation (`U+000B`),
form feed (`U+000C`), or carriage return (`U+000D`).
[Whitespace](@) is a sequence of one or more [whitespace
characters].
A [Unicode whitespace character](@) is
any code point in the Unicode `Zs` general category, or a tab (`U+0009`),
carriage return (`U+000D`), newline (`U+000A`), or form feed
(`U+000C`).
[Unicode whitespace](@) is a sequence of one
or more [Unicode whitespace characters].
A [space](@) is `U+0020`.
A [non-whitespace character](@) is any character
that is not a [whitespace character].
An [ASCII punctuation character](@)
is `!`, `"`, `#`, `$`, `%`, `&`, `'`, `(`, `)`,
`*`, `+`, `,`, `-`, `.`, `/` (U+0021–2F),
`:`, `;`, `<`, `=`, `>`, `?`, `@` (U+003A–0040),
`[`, `\`, `]`, `^`, `_`, `` ` `` (U+005B–0060),
`{`, `|`, `}`, or `~` (U+007B–007E).
A [punctuation character](@) is an [ASCII
punctuation character] or anything in
the general Unicode categories `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
## Tabs
Tabs in lines are not expanded to [spaces]. However,
in contexts where whitespace helps to define block structure,
tabs behave as if they were replaced by spaces with a tab stop
of 4 characters.
Thus, for example, a tab can be used instead of four spaces
in an indented code block. (Note, however, that internal
tabs are passed through as literal tabs, not expanded to
spaces.)
```````````````````````````````` example
→foo→baz→→bim
.
<pre><code>foo→baz→→bim
</code></pre>
````````````````````````````````
```````````````````````````````` example
→foo→baz→→bim
.
<pre><code>foo→baz→→bim
</code></pre>
````````````````````````````````
```````````````````````````````` example
a→a
ὐ→a
.
<pre><code>a→a
ὐ→a
</code></pre>
````````````````````````````````
In the following example, a continuation paragraph of a list
item is indented with a tab; this has exactly the same effect
as indentation with four spaces would:
```````````````````````````````` example
- foo
→bar
.
<ul>
<li>
<p>foo</p>
<p>bar</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- foo
→→bar
.
<ul>
<li>
<p>foo</p>
<pre><code> bar
</code></pre>
</li>
</ul>
````````````````````````````````
Normally the `>` that begins a block quote may be followed
optionally by a space, which is not considered part of the
content. In the following case `>` is followed by a tab,
which is treated as if it were expanded into three spaces.
Since one of these spaces is considered part of the
delimiter, `foo` is considered to be indented six spaces
inside the block quote context, so we get an indented
code block starting with two spaces.
```````````````````````````````` example
>→→foo
.
<blockquote>
<pre><code> foo
</code></pre>
</blockquote>
````````````````````````````````
```````````````````````````````` example
-→→foo
.
<ul>
<li>
<pre><code> foo
</code></pre>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
foo
→bar
.
<pre><code>foo
bar
</code></pre>
````````````````````````````````
```````````````````````````````` example
- foo
- bar
→ - baz
.
<ul>
<li>foo
<ul>
<li>bar
<ul>
<li>baz</li>
</ul>
</li>
</ul>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
#→Foo
.
<h1>Foo</h1>
````````````````````````````````
```````````````````````````````` example
*→*→*→
.
<hr />
````````````````````````````````
## Insecure characters
For security reasons, the Unicode character `U+0000` must be replaced
with the REPLACEMENT CHARACTER (`U+FFFD`).
# Blocks and inlines
We can think of a document as a sequence of
[blocks](@)---structural elements like paragraphs, block
quotations, lists, headings, rules, and code blocks. Some blocks (like
block quotes and list items) contain other blocks; others (like
headings and paragraphs) contain [inline](@) content---text,
links, emphasized text, images, code spans, and so on.
## Precedence
Indicators of block structure always take precedence over indicators
of inline structure. So, for example, the following is a list with
two items, not a list with one item containing a code span:
```````````````````````````````` example
- `one
- two`
.
<ul>
<li>`one</li>
<li>two`</li>
</ul>
````````````````````````````````
This means that parsing can proceed in two steps: first, the block
structure of the document can be discerned; second, text lines inside
paragraphs, headings, and other block constructs can be parsed for inline
structure. The second step requires information about link reference
definitions that will be available only at the end of the first
step. Note that the first step requires processing lines in sequence,
but the second can be parallelized, since the inline parsing of
one block element does not affect the inline parsing of any other.
## Container blocks and leaf blocks
We can divide blocks into two types:
[container blocks](@),
which can contain other blocks, and [leaf blocks](@),
which cannot.
# Leaf blocks
This section describes the different kinds of leaf block that make up a
Markdown document.
## Thematic breaks
A line consisting of 0-3 spaces of indentation, followed by a sequence
of three or more matching `-`, `_`, or `*` characters, each followed
optionally by any number of spaces or tabs, forms a
[thematic break](@).
```````````````````````````````` example
***
---
___
.
<hr />
<hr />
<hr />
````````````````````````````````
Wrong characters:
```````````````````````````````` example
+++
.
<p>+++</p>
````````````````````````````````
```````````````````````````````` example
===
.
<p>===</p>
````````````````````````````````
Not enough characters:
```````````````````````````````` example
--
**
__
.
<p>--
**
__</p>
````````````````````````````````
One to three spaces indent are allowed:
```````````````````````````````` example
***
***
***
.
<hr />
<hr />
<hr />
````````````````````````````````
Four spaces is too many:
```````````````````````````````` example
***
.
<pre><code>***
</code></pre>
````````````````````````````````
```````````````````````````````` example
Foo
***
.
<p>Foo
***</p>
````````````````````````````````
More than three characters may be used:
```````````````````````````````` example
_____________________________________
.
<hr />
````````````````````````````````
Spaces are allowed between the characters:
```````````````````````````````` example
- - -
.
<hr />
````````````````````````````````
```````````````````````````````` example
** * ** * ** * **
.
<hr />
````````````````````````````````
```````````````````````````````` example
- - - -
.
<hr />
````````````````````````````````
Spaces are allowed at the end:
```````````````````````````````` example
- - - -
.
<hr />
````````````````````````````````
However, no other characters may occur in the line:
```````````````````````````````` example
_ _ _ _ a
a------
---a---
.
<p>_ _ _ _ a</p>
<p>a------</p>
<p>---a---</p>
````````````````````````````````
It is required that all of the [non-whitespace characters] be the same.
So, this is not a thematic break:
```````````````````````````````` example
*-*
.
<p><em>-</em></p>
````````````````````````````````
Thematic breaks do not need blank lines before or after:
```````````````````````````````` example
- foo
***
- bar
.
<ul>
<li>foo</li>
</ul>
<hr />
<ul>
<li>bar</li>
</ul>
````````````````````````````````
Thematic breaks can interrupt a paragraph:
```````````````````````````````` example
Foo
***
bar
.
<p>Foo</p>
<hr />
<p>bar</p>
````````````````````````````````
If a line of dashes that meets the above conditions for being a
thematic break could also be interpreted as the underline of a [setext
heading], the interpretation as a
[setext heading] takes precedence. Thus, for example,
this is a setext heading, not a paragraph followed by a thematic break:
```````````````````````````````` example
Foo
---
bar
.
<h2>Foo</h2>
<p>bar</p>
````````````````````````````````
When both a thematic break and a list item are possible
interpretations of a line, the thematic break takes precedence:
```````````````````````````````` example
* Foo
* * *
* Bar
.
<ul>
<li>Foo</li>
</ul>
<hr />
<ul>
<li>Bar</li>
</ul>
````````````````````````````````
If you want a thematic break in a list item, use a different bullet:
```````````````````````````````` example
- Foo
- * * *
.
<ul>
<li>Foo</li>
<li>
<hr />
</li>
</ul>
````````````````````````````````
## ATX headings
An [ATX heading](@)
consists of a string of characters, parsed as inline content, between an
opening sequence of 1--6 unescaped `#` characters and an optional
closing sequence of any number of unescaped `#` characters.
The opening sequence of `#` characters must be followed by a
[space] or by the end of line. The optional closing sequence of `#`s must be
preceded by a [space] and may be followed by spaces only. The opening
`#` character may be indented 0-3 spaces. The raw contents of the
heading are stripped of leading and trailing spaces before being parsed
as inline content. The heading level is equal to the number of `#`
characters in the opening sequence.
Simple headings:
```````````````````````````````` example
# foo
## foo
### foo
#### foo
##### foo
###### foo
.
<h1>foo</h1>
<h2>foo</h2>
<h3>foo</h3>
<h4>foo</h4>
<h5>foo</h5>
<h6>foo</h6>
````````````````````````````````
More than six `#` characters is not a heading:
```````````````````````````````` example
####### foo
.
<p>####### foo</p>
````````````````````````````````
At least one space is required between the `#` characters and the
heading's contents, unless the heading is empty. Note that many
implementations currently do not require the space. However, the
space was required by the
[original ATX implementation](http://www.aaronsw.com/2002/atx/atx.py),
and it helps prevent things like the following from being parsed as
headings:
```````````````````````````````` example
#5 bolt
#hashtag
.
<p>#5 bolt</p>
<p>#hashtag</p>
````````````````````````````````
This is not a heading, because the first `#` is escaped:
```````````````````````````````` example
\## foo
.
<p>## foo</p>
````````````````````````````````
Contents are parsed as inlines:
```````````````````````````````` example
# foo *bar* \*baz\*
.
<h1>foo <em>bar</em> *baz*</h1>
````````````````````````````````
Leading and trailing [whitespace] is ignored in parsing inline content:
```````````````````````````````` example
# foo
.
<h1>foo</h1>
````````````````````````````````
One to three spaces indentation are allowed:
```````````````````````````````` example
### foo
## foo
# foo
.
<h3>foo</h3>
<h2>foo</h2>
<h1>foo</h1>
````````````````````````````````
Four spaces are too much:
```````````````````````````````` example
# foo
.
<pre><code># foo
</code></pre>
````````````````````````````````
```````````````````````````````` example
foo
# bar
.
<p>foo
# bar</p>
````````````````````````````````
A closing sequence of `#` characters is optional:
```````````````````````````````` example
## foo ##
### bar ###
.
<h2>foo</h2>
<h3>bar</h3>
````````````````````````````````
It need not be the same length as the opening sequence:
```````````````````````````````` example
# foo ##################################
##### foo ##
.
<h1>foo</h1>
<h5>foo</h5>
````````````````````````````````
Spaces are allowed after the closing sequence:
```````````````````````````````` example
### foo ###
.
<h3>foo</h3>
````````````````````````````````
A sequence of `#` characters with anything but [spaces] following it
is not a closing sequence, but counts as part of the contents of the
heading:
```````````````````````````````` example
### foo ### b
.
<h3>foo ### b</h3>
````````````````````````````````
The closing sequence must be preceded by a space:
```````````````````````````````` example
# foo#
.
<h1>foo#</h1>
````````````````````````````````
Backslash-escaped `#` characters do not count as part
of the closing sequence:
```````````````````````````````` example
### foo \###
## foo #\##
# foo \#
.
<h3>foo ###</h3>
<h2>foo ###</h2>
<h1>foo #</h1>
````````````````````````````````
ATX headings need not be separated from surrounding content by blank
lines, and they can interrupt paragraphs:
```````````````````````````````` example
****
## foo
****
.
<hr />
<h2>foo</h2>
<hr />
````````````````````````````````
```````````````````````````````` example
Foo bar
# baz
Bar foo
.
<p>Foo bar</p>
<h1>baz</h1>
<p>Bar foo</p>
````````````````````````````````
ATX headings can be empty:
```````````````````````````````` example
##
#
### ###
.
<h2></h2>
<h1></h1>
<h3></h3>
````````````````````````````````
## Setext headings
A [setext heading](@) consists of one or more
lines of text, each containing at least one [non-whitespace
character], with no more than 3 spaces indentation, followed by
a [setext heading underline]. The lines of text must be such
that, were they not followed by the setext heading underline,
they would be interpreted as a paragraph: they cannot be
interpretable as a [code fence], [ATX heading][ATX headings],
[block quote][block quotes], [thematic break][thematic breaks],
[list item][list items], or [HTML block][HTML blocks].
A [setext heading underline](@) is a sequence of
`=` characters or a sequence of `-` characters, with no more than 3
spaces indentation and any number of trailing spaces. If a line
containing a single `-` can be interpreted as an
empty [list items], it should be interpreted this way
and not as a [setext heading underline].
The heading is a level 1 heading if `=` characters are used in
the [setext heading underline], and a level 2 heading if `-`
characters are used. The contents of the heading are the result
of parsing the preceding lines of text as CommonMark inline
content.
In general, a setext heading need not be preceded or followed by a
blank line. However, it cannot interrupt a paragraph, so when a
setext heading comes after a paragraph, a blank line is needed between
them.
Simple examples:
```````````````````````````````` example
Foo *bar*
=========
Foo *bar*
---------
.
<h1>Foo <em>bar</em></h1>
<h2>Foo <em>bar</em></h2>
````````````````````````````````
The content of the header may span more than one line:
```````````````````````````````` example
Foo *bar
baz*
====
.
<h1>Foo <em>bar
baz</em></h1>
````````````````````````````````
The contents are the result of parsing the headings's raw
content as inlines. The heading's raw content is formed by
concatenating the lines and removing initial and final
[whitespace].
```````````````````````````````` example
Foo *bar
baz*→
====
.
<h1>Foo <em>bar
baz</em></h1>
````````````````````````````````
The underlining can be any length:
```````````````````````````````` example
Foo
-------------------------
Foo
=
.
<h2>Foo</h2>
<h1>Foo</h1>
````````````````````````````````
The heading content can be indented up to three spaces, and need
not line up with the underlining:
```````````````````````````````` example
Foo
---
Foo
-----
Foo
===
.
<h2>Foo</h2>
<h2>Foo</h2>
<h1>Foo</h1>
````````````````````````````````
Four spaces indent is too much:
```````````````````````````````` example
Foo
---
Foo
---
.
<pre><code>Foo
---
Foo
</code></pre>
<hr />
````````````````````````````````
The setext heading underline can be indented up to three spaces, and
may have trailing spaces:
```````````````````````````````` example
Foo
----
.
<h2>Foo</h2>
````````````````````````````````
Four spaces is too much:
```````````````````````````````` example
Foo
---
.
<p>Foo
---</p>
````````````````````````````````
The setext heading underline cannot contain internal spaces:
```````````````````````````````` example
Foo
= =
Foo
--- -
.
<p>Foo
= =</p>
<p>Foo</p>
<hr />
````````````````````````````````
Trailing spaces in the content line do not cause a line break:
```````````````````````````````` example
Foo
-----
.
<h2>Foo</h2>
````````````````````````````````
Nor does a backslash at the end:
```````````````````````````````` example
Foo\
----
.
<h2>Foo\</h2>
````````````````````````````````
Since indicators of block structure take precedence over
indicators of inline structure, the following are setext headings:
```````````````````````````````` example
`Foo
----
`
<a title="a lot
---
of dashes"/>
.
<h2>`Foo</h2>
<p>`</p>
<h2><a title="a lot</h2>
<p>of dashes"/></p>
````````````````````````````````
The setext heading underline cannot be a [lazy continuation
line] in a list item or block quote:
```````````````````````````````` example
> Foo
---
.
<blockquote>
<p>Foo</p>
</blockquote>
<hr />
````````````````````````````````
```````````````````````````````` example
> foo
bar
===
.
<blockquote>
<p>foo
bar
===</p>
</blockquote>
````````````````````````````````
```````````````````````````````` example
- Foo
---
.
<ul>
<li>Foo</li>
</ul>
<hr />
````````````````````````````````
A blank line is needed between a paragraph and a following
setext heading, since otherwise the paragraph becomes part
of the heading's content:
```````````````````````````````` example
Foo
Bar
---
.
<h2>Foo
Bar</h2>
````````````````````````````````
But in general a blank line is not required before or after
setext headings:
```````````````````````````````` example
---
Foo
---
Bar
---
Baz
.
<hr />
<h2>Foo</h2>
<h2>Bar</h2>
<p>Baz</p>
````````````````````````````````
Setext headings cannot be empty:
```````````````````````````````` example
====
.
<p>====</p>
````````````````````````````````
Setext heading text lines must not be interpretable as block
constructs other than paragraphs. So, the line of dashes
in these examples gets interpreted as a thematic break:
```````````````````````````````` example
---
---
.
<hr />
<hr />
````````````````````````````````
```````````````````````````````` example
- foo
-----
.
<ul>
<li>foo</li>
</ul>
<hr />
````````````````````````````````
```````````````````````````````` example
foo
---
.
<pre><code>foo
</code></pre>
<hr />
````````````````````````````````
```````````````````````````````` example
> foo
-----
.
<blockquote>
<p>foo</p>
</blockquote>
<hr />
````````````````````````````````
If you want a heading with `> foo` as its literal text, you can
use backslash escapes:
```````````````````````````````` example
\> foo
------
.
<h2>> foo</h2>
````````````````````````````````
**Compatibility note:** Most existing Markdown implementations
do not allow the text of setext headings to span multiple lines.
But there is no consensus about how to interpret
``` markdown
Foo
bar
---
baz
```
One can find four different interpretations:
1. paragraph "Foo", heading "bar", paragraph "baz"
2. paragraph "Foo bar", thematic break, paragraph "baz"
3. paragraph "Foo bar --- baz"
4. heading "Foo bar", paragraph "baz"
We find interpretation 4 most natural, and interpretation 4
increases the expressive power of CommonMark, by allowing
multiline headings. Authors who want interpretation 1 can
put a blank line after the first paragraph:
```````````````````````````````` example
Foo
bar
---
baz
.
<p>Foo</p>
<h2>bar</h2>
<p>baz</p>
````````````````````````````````
Authors who want interpretation 2 can put blank lines around
the thematic break,
```````````````````````````````` example
Foo
bar
---
baz
.
<p>Foo
bar</p>
<hr />
<p>baz</p>
````````````````````````````````
or use a thematic break that cannot count as a [setext heading
underline], such as
```````````````````````````````` example
Foo
bar
* * *
baz
.
<p>Foo
bar</p>
<hr />
<p>baz</p>
````````````````````````````````
Authors who want interpretation 3 can use backslash escapes:
```````````````````````````````` example
Foo
bar
\---
baz
.
<p>Foo
bar
---
baz</p>
````````````````````````````````
## Indented code blocks
An [indented code block](@) is composed of one or more
[indented chunks] separated by blank lines.
An [indented chunk](@) is a sequence of non-blank lines,
each indented four or more spaces. The contents of the code block are
the literal contents of the lines, including trailing
[line endings], minus four spaces of indentation.
An indented code block has no [info string].
An indented code block cannot interrupt a paragraph, so there must be
a blank line between a paragraph and a following indented code block.
(A blank line is not needed, however, between a code block and a following
paragraph.)
```````````````````````````````` example
a simple
indented code block
.
<pre><code>a simple
indented code block
</code></pre>
````````````````````````````````
If there is any ambiguity between an interpretation of indentation
as a code block and as indicating that material belongs to a [list
item][list items], the list item interpretation takes precedence:
```````````````````````````````` example
- foo
bar
.
<ul>
<li>
<p>foo</p>
<p>bar</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
1. foo
- bar
.
<ol>
<li>
<p>foo</p>
<ul>
<li>bar</li>
</ul>
</li>
</ol>
````````````````````````````````
The contents of a code block are literal text, and do not get parsed
as Markdown:
```````````````````````````````` example
<a/>
*hi*
- one
.
<pre><code><a/>
*hi*
- one
</code></pre>
````````````````````````````````
Here we have three chunks separated by blank lines:
```````````````````````````````` example
chunk1
chunk2
chunk3
.
<pre><code>chunk1
chunk2
chunk3
</code></pre>
````````````````````````````````
Any initial spaces beyond four will be included in the content, even
in interior blank lines:
```````````````````````````````` example
chunk1
chunk2
.
<pre><code>chunk1
chunk2
</code></pre>
````````````````````````````````
An indented code block cannot interrupt a paragraph. (This
allows hanging indents and the like.)
```````````````````````````````` example
Foo
bar
.
<p>Foo
bar</p>
````````````````````````````````
However, any non-blank line with fewer than four leading spaces ends
the code block immediately. So a paragraph may occur immediately
after indented code:
```````````````````````````````` example
foo
bar
.
<pre><code>foo
</code></pre>
<p>bar</p>
````````````````````````````````
And indented code can occur immediately before and after other kinds of
blocks:
```````````````````````````````` example
# Heading
foo
Heading
------
foo
----
.
<h1>Heading</h1>
<pre><code>foo
</code></pre>
<h2>Heading</h2>
<pre><code>foo
</code></pre>
<hr />
````````````````````````````````
The first line can be indented more than four spaces:
```````````````````````````````` example
foo
bar
.
<pre><code> foo
bar
</code></pre>
````````````````````````````````
Blank lines preceding or following an indented code block
are not included in it:
```````````````````````````````` example
foo
.
<pre><code>foo
</code></pre>
````````````````````````````````
Trailing spaces are included in the code block's content:
```````````````````````````````` example
foo
.
<pre><code>foo
</code></pre>
````````````````````````````````
## Fenced code blocks
A [code fence](@) is a sequence
of at least three consecutive backtick characters (`` ` ``) or
tildes (`~`). (Tildes and backticks cannot be mixed.)
A [fenced code block](@)
begins with a code fence, indented no more than three spaces.
The line with the opening code fence may optionally contain some text
following the code fence; this is trimmed of leading and trailing
whitespace and called the [info string](@). If the [info string] comes
after a backtick fence, it may not contain any backtick
characters. (The reason for this restriction is that otherwise
some inline code would be incorrectly interpreted as the
beginning of a fenced code block.)
The content of the code block consists of all subsequent lines, until
a closing [code fence] of the same type as the code block
began with (backticks or tildes), and with at least as many backticks
or tildes as the opening code fence. If the leading code fence is
indented N spaces, then up to N spaces of indentation are removed from
each line of the content (if present). (If a content line is not
indented, it is preserved unchanged. If it is indented less than N
spaces, all of the indentation is removed.)
The closing code fence may be indented up to three spaces, and may be
followed only by spaces, which are ignored. If the end of the
containing block (or document) is reached and no closing code fence
has been found, the code block contains all of the lines after the
opening code fence until the end of the containing block (or
document). (An alternative spec would require backtracking in the
event that a closing code fence is not found. But this makes parsing
much less efficient, and there seems to be no real down side to the
behavior described here.)
A fenced code block may interrupt a paragraph, and does not require
a blank line either before or after.
The content of a code fence is treated as literal text, not parsed
as inlines. The first word of the [info string] is typically used to
specify the language of the code sample, and rendered in the `class`
attribute of the `code` tag. However, this spec does not mandate any
particular treatment of the [info string].
Here is a simple example with backticks:
```````````````````````````````` example
```
<
>
```
.
<pre><code><
>
</code></pre>
````````````````````````````````
With tildes:
```````````````````````````````` example
~~~
<
>
~~~
.
<pre><code><
>
</code></pre>
````````````````````````````````
Fewer than three backticks is not enough:
```````````````````````````````` example
``
foo
``
.
<p><code>foo</code></p>
````````````````````````````````
The closing code fence must use the same character as the opening
fence:
```````````````````````````````` example
```
aaa
~~~
```
.
<pre><code>aaa
~~~
</code></pre>
````````````````````````````````
```````````````````````````````` example
~~~
aaa
```
~~~
.
<pre><code>aaa
```
</code></pre>
````````````````````````````````
The closing code fence must be at least as long as the opening fence:
```````````````````````````````` example
````
aaa
```
``````
.
<pre><code>aaa
```
</code></pre>
````````````````````````````````
```````````````````````````````` example
~~~~
aaa
~~~
~~~~
.
<pre><code>aaa
~~~
</code></pre>
````````````````````````````````
Unclosed code blocks are closed by the end of the document
(or the enclosing [block quote][block quotes] or [list item][list items]):
```````````````````````````````` example
```
.
<pre><code></code></pre>
````````````````````````````````
```````````````````````````````` example
`````
```
aaa
.
<pre><code>
```
aaa
</code></pre>
````````````````````````````````
```````````````````````````````` example
> ```
> aaa
bbb
.
<blockquote>
<pre><code>aaa
</code></pre>
</blockquote>
<p>bbb</p>
````````````````````````````````
A code block can have all empty lines as its content:
```````````````````````````````` example
```
```
.
<pre><code>
</code></pre>
````````````````````````````````
A code block can be empty:
```````````````````````````````` example
```
```
.
<pre><code></code></pre>
````````````````````````````````
Fences can be indented. If the opening fence is indented,
content lines will have equivalent opening indentation removed,
if present:
```````````````````````````````` example
```
aaa
aaa
```
.
<pre><code>aaa
aaa
</code></pre>
````````````````````````````````
```````````````````````````````` example
```
aaa
aaa
aaa
```
.
<pre><code>aaa
aaa
aaa
</code></pre>
````````````````````````````````
```````````````````````````````` example
```
aaa
aaa
aaa
```
.
<pre><code>aaa
aaa
aaa
</code></pre>
````````````````````````````````
Four spaces indentation produces an indented code block:
```````````````````````````````` example
```
aaa
```
.
<pre><code>```
aaa
```
</code></pre>
````````````````````````````````
Closing fences may be indented by 0-3 spaces, and their indentation
need not match that of the opening fence:
```````````````````````````````` example
```
aaa
```
.
<pre><code>aaa
</code></pre>
````````````````````````````````
```````````````````````````````` example
```
aaa
```
.
<pre><code>aaa
</code></pre>
````````````````````````````````
This is not a closing fence, because it is indented 4 spaces:
```````````````````````````````` example
```
aaa
```
.
<pre><code>aaa
```
</code></pre>
````````````````````````````````
Code fences (opening and closing) cannot contain internal spaces:
```````````````````````````````` example
``` ```
aaa
.
<p><code> </code>
aaa</p>
````````````````````````````````
```````````````````````````````` example
~~~~~~
aaa
~~~ ~~
.
<pre><code>aaa
~~~ ~~
</code></pre>
````````````````````````````````
Fenced code blocks can interrupt paragraphs, and can be followed
directly by paragraphs, without a blank line between:
```````````````````````````````` example
foo
```
bar
```
baz
.
<p>foo</p>
<pre><code>bar
</code></pre>
<p>baz</p>
````````````````````````````````
Other blocks can also occur before and after fenced code blocks
without an intervening blank line:
```````````````````````````````` example
foo
---
~~~
bar
~~~
# baz
.
<h2>foo</h2>
<pre><code>bar
</code></pre>
<h1>baz</h1>
````````````````````````````````
An [info string] can be provided after the opening code fence.
Although this spec doesn't mandate any particular treatment of
the info string, the first word is typically used to specify
the language of the code block. In HTML output, the language is
normally indicated by adding a class to the `code` element consisting
of `language-` followed by the language name.
```````````````````````````````` example
```ruby
def foo(x)
return 3
end
```
.
<pre><code class="language-ruby">def foo(x)
return 3
end
</code></pre>
````````````````````````````````
```````````````````````````````` example
~~~~ ruby startline=3 $%@#$
def foo(x)
return 3
end
~~~~~~~
.
<pre><code class="language-ruby">def foo(x)
return 3
end
</code></pre>
````````````````````````````````
```````````````````````````````` example
````;
````
.
<pre><code class="language-;"></code></pre>
````````````````````````````````
[Info strings] for backtick code blocks cannot contain backticks:
```````````````````````````````` example
``` aa ```
foo
.
<p><code>aa</code>
foo</p>
````````````````````````````````
[Info strings] for tilde code blocks can contain backticks and tildes:
```````````````````````````````` example
~~~ aa ``` ~~~
foo
~~~
.
<pre><code class="language-aa">foo
</code></pre>
````````````````````````````````
Closing code fences cannot have [info strings]:
```````````````````````````````` example
```
``` aaa
```
.
<pre><code>``` aaa
</code></pre>
````````````````````````````````
## HTML blocks
An [HTML block](@) is a group of lines that is treated
as raw HTML (and will not be escaped in HTML output).
There are seven kinds of [HTML block], which can be defined by their
start and end conditions. The block begins with a line that meets a
[start condition](@) (after up to three spaces optional indentation).
It ends with the first subsequent line that meets a matching [end
condition](@), or the last line of the document, or the last line of
the [container block](#container-blocks) containing the current HTML
block, if no line is encountered that meets the [end condition]. If
the first line meets both the [start condition] and the [end
condition], the block will contain just that line.
1. **Start condition:** line begins with the string `<script`,
`<pre`, or `<style` (case-insensitive), followed by whitespace,
the string `>`, or the end of the line.\
**End condition:** line contains an end tag
`</script>`, `</pre>`, or `</style>` (case-insensitive; it
need not match the start tag).
2. **Start condition:** line begins with the string `<!--`.\
**End condition:** line contains the string `-->`.
3. **Start condition:** line begins with the string `<?`.\
**End condition:** line contains the string `?>`.
4. **Start condition:** line begins with the string `<!`
followed by an uppercase ASCII letter.\
**End condition:** line contains the character `>`.
5. **Start condition:** line begins with the string
`<![CDATA[`.\
**End condition:** line contains the string `]]>`.
6. **Start condition:** line begins the string `<` or `</`
followed by one of the strings (case-insensitive) `address`,
`article`, `aside`, `base`, `basefont`, `blockquote`, `body`,
`caption`, `center`, `col`, `colgroup`, `dd`, `details`, `dialog`,
`dir`, `div`, `dl`, `dt`, `fieldset`, `figcaption`, `figure`,
`footer`, `form`, `frame`, `frameset`,
`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`,
`html`, `iframe`, `legend`, `li`, `link`, `main`, `menu`, `menuitem`,
`nav`, `noframes`, `ol`, `optgroup`, `option`, `p`, `param`,
`section`, `source`, `summary`, `table`, `tbody`, `td`,
`tfoot`, `th`, `thead`, `title`, `tr`, `track`, `ul`, followed
by [whitespace], the end of the line, the string `>`, or
the string `/>`.\
**End condition:** line is followed by a [blank line].
7. **Start condition:** line begins with a complete [open tag]
(with any [tag name] other than `script`,
`style`, or `pre`) or a complete [closing tag],
followed only by [whitespace] or the end of the line.\
**End condition:** line is followed by a [blank line].
HTML blocks continue until they are closed by their appropriate
[end condition], or the last line of the document or other [container
block](#container-blocks). This means any HTML **within an HTML
block** that might otherwise be recognised as a start condition will
be ignored by the parser and passed through as-is, without changing
the parser's state.
For instance, `<pre>` within a HTML block started by `<table>` will not affect
the parser state; as the HTML block was started in by start condition 6, it
will end at any blank line. This can be surprising:
```````````````````````````````` example
<table><tr><td>
<pre>
**Hello**,
_world_.
</pre>
</td></tr></table>
.
<table><tr><td>
<pre>
**Hello**,
<p><em>world</em>.
</pre></p>
</td></tr></table>
````````````````````````````````
In this case, the HTML block is terminated by the newline — the `**Hello**`
text remains verbatim — and regular parsing resumes, with a paragraph,
emphasised `world` and inline and block HTML following.
All types of [HTML blocks] except type 7 may interrupt
a paragraph. Blocks of type 7 may not interrupt a paragraph.
(This restriction is intended to prevent unwanted interpretation
of long tags inside a wrapped paragraph as starting HTML blocks.)
Some simple examples follow. Here are some basic HTML blocks
of type 6:
```````````````````````````````` example
<table>
<tr>
<td>
hi
</td>
</tr>
</table>
okay.
.
<table>
<tr>
<td>
hi
</td>
</tr>
</table>
<p>okay.</p>
````````````````````````````````
```````````````````````````````` example
<div>
*hello*
<foo><a>
.
<div>
*hello*
<foo><a>
````````````````````````````````
A block can also start with a closing tag:
```````````````````````````````` example
</div>
*foo*
.
</div>
*foo*
````````````````````````````````
Here we have two HTML blocks with a Markdown paragraph between them:
```````````````````````````````` example
<DIV CLASS="foo">
*Markdown*
</DIV>
.
<DIV CLASS="foo">
<p><em>Markdown</em></p>
</DIV>
````````````````````````````````
The tag on the first line can be partial, as long
as it is split where there would be whitespace:
```````````````````````````````` example
<div id="foo"
class="bar">
</div>
.
<div id="foo"
class="bar">
</div>
````````````````````````````````
```````````````````````````````` example
<div id="foo" class="bar
baz">
</div>
.
<div id="foo" class="bar
baz">
</div>
````````````````````````````````
An open tag need not be closed:
```````````````````````````````` example
<div>
*foo*
*bar*
.
<div>
*foo*
<p><em>bar</em></p>
````````````````````````````````
A partial tag need not even be completed (garbage
in, garbage out):
```````````````````````````````` example
<div id="foo"
*hi*
.
<div id="foo"
*hi*
````````````````````````````````
```````````````````````````````` example
<div class
foo
.
<div class
foo
````````````````````````````````
The initial tag doesn't even need to be a valid
tag, as long as it starts like one:
```````````````````````````````` example
<div *???-&&&-<---
*foo*
.
<div *???-&&&-<---
*foo*
````````````````````````````````
In type 6 blocks, the initial tag need not be on a line by
itself:
```````````````````````````````` example
<div><a href="bar">*foo*</a></div>
.
<div><a href="bar">*foo*</a></div>
````````````````````````````````
```````````````````````````````` example
<table><tr><td>
foo
</td></tr></table>
.
<table><tr><td>
foo
</td></tr></table>
````````````````````````````````
Everything until the next blank line or end of document
gets included in the HTML block. So, in the following
example, what looks like a Markdown code block
is actually part of the HTML block, which continues until a blank
line or the end of the document is reached:
```````````````````````````````` example
<div></div>
``` c
int x = 33;
```
.
<div></div>
``` c
int x = 33;
```
````````````````````````````````
To start an [HTML block] with a tag that is *not* in the
list of block-level tags in (6), you must put the tag by
itself on the first line (and it must be complete):
```````````````````````````````` example
<a href="foo">
*bar*
</a>
.
<a href="foo">
*bar*
</a>
````````````````````````````````
In type 7 blocks, the [tag name] can be anything:
```````````````````````````````` example
<Warning>
*bar*
</Warning>
.
<Warning>
*bar*
</Warning>
````````````````````````````````
```````````````````````````````` example
<i class="foo">
*bar*
</i>
.
<i class="foo">
*bar*
</i>
````````````````````````````````
```````````````````````````````` example
</ins>
*bar*
.
</ins>
*bar*
````````````````````````````````
These rules are designed to allow us to work with tags that
can function as either block-level or inline-level tags.
The `<del>` tag is a nice example. We can surround content with
`<del>` tags in three different ways. In this case, we get a raw
HTML block, because the `<del>` tag is on a line by itself:
```````````````````````````````` example
<del>
*foo*
</del>
.
<del>
*foo*
</del>
````````````````````````````````
In this case, we get a raw HTML block that just includes
the `<del>` tag (because it ends with the following blank
line). So the contents get interpreted as CommonMark:
```````````````````````````````` example
<del>
*foo*
</del>
.
<del>
<p><em>foo</em></p>
</del>
````````````````````````````````
Finally, in this case, the `<del>` tags are interpreted
as [raw HTML] *inside* the CommonMark paragraph. (Because
the tag is not on a line by itself, we get inline HTML
rather than an [HTML block].)
```````````````````````````````` example
<del>*foo*</del>
.
<p><del><em>foo</em></del></p>
````````````````````````````````
HTML tags designed to contain literal content
(`script`, `style`, `pre`), comments, processing instructions,
and declarations are treated somewhat differently.
Instead of ending at the first blank line, these blocks
end at the first line containing a corresponding end tag.
As a result, these blocks can contain blank lines:
A pre tag (type 1):
```````````````````````````````` example
<pre language="haskell"><code>
import Text.HTML.TagSoup
main :: IO ()
main = print $ parseTags tags
</code></pre>
okay
.
<pre language="haskell"><code>
import Text.HTML.TagSoup
main :: IO ()
main = print $ parseTags tags
</code></pre>
<p>okay</p>
````````````````````````````````
A script tag (type 1):
```````````````````````````````` example
<script type="text/javascript">
// JavaScript example
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
okay
.
<script type="text/javascript">
// JavaScript example
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
<p>okay</p>
````````````````````````````````
A style tag (type 1):
```````````````````````````````` example
<style
type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
okay
.
<style
type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
<p>okay</p>
````````````````````````````````
If there is no matching end tag, the block will end at the
end of the document (or the enclosing [block quote][block quotes]
or [list item][list items]):
```````````````````````````````` example
<style
type="text/css">
foo
.
<style
type="text/css">
foo
````````````````````````````````
```````````````````````````````` example
> <div>
> foo
bar
.
<blockquote>
<div>
foo
</blockquote>
<p>bar</p>
````````````````````````````````
```````````````````````````````` example
- <div>
- foo
.
<ul>
<li>
<div>
</li>
<li>foo</li>
</ul>
````````````````````````````````
The end tag can occur on the same line as the start tag:
```````````````````````````````` example
<style>p{color:red;}</style>
*foo*
.
<style>p{color:red;}</style>
<p><em>foo</em></p>
````````````````````````````````
```````````````````````````````` example
<!-- foo -->*bar*
*baz*
.
<!-- foo -->*bar*
<p><em>baz</em></p>
````````````````````````````````
Note that anything on the last line after the
end tag will be included in the [HTML block]:
```````````````````````````````` example
<script>
foo
</script>1. *bar*
.
<script>
foo
</script>1. *bar*
````````````````````````````````
A comment (type 2):
```````````````````````````````` example
<!-- Foo
bar
baz -->
okay
.
<!-- Foo
bar
baz -->
<p>okay</p>
````````````````````````````````
A processing instruction (type 3):
```````````````````````````````` example
<?php
echo '>';
?>
okay
.
<?php
echo '>';
?>
<p>okay</p>
````````````````````````````````
A declaration (type 4):
```````````````````````````````` example
<!DOCTYPE html>
.
<!DOCTYPE html>
````````````````````````````````
CDATA (type 5):
```````````````````````````````` example
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then {
return 1;
} else {
return 0;
}
}
]]>
okay
.
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then {
return 1;
} else {
return 0;
}
}
]]>
<p>okay</p>
````````````````````````````````
The opening tag can be indented 1-3 spaces, but not 4:
```````````````````````````````` example
<!-- foo -->
<!-- foo -->
.
<!-- foo -->
<pre><code><!-- foo -->
</code></pre>
````````````````````````````````
```````````````````````````````` example
<div>
<div>
.
<div>
<pre><code><div>
</code></pre>
````````````````````````````````
An HTML block of types 1--6 can interrupt a paragraph, and need not be
preceded by a blank line.
```````````````````````````````` example
Foo
<div>
bar
</div>
.
<p>Foo</p>
<div>
bar
</div>
````````````````````````````````
However, a following blank line is needed, except at the end of
a document, and except for blocks of types 1--5, [above][HTML
block]:
```````````````````````````````` example
<div>
bar
</div>
*foo*
.
<div>
bar
</div>
*foo*
````````````````````````````````
HTML blocks of type 7 cannot interrupt a paragraph:
```````````````````````````````` example
Foo
<a href="bar">
baz
.
<p>Foo
<a href="bar">
baz</p>
````````````````````````````````
This rule differs from John Gruber's original Markdown syntax
specification, which says:
> The only restrictions are that block-level HTML elements —
> e.g. `<div>`, `<table>`, `<pre>`, `<p>`, etc. — must be separated from
> surrounding content by blank lines, and the start and end tags of the
> block should not be indented with tabs or spaces.
In some ways Gruber's rule is more restrictive than the one given
here:
- It requires that an HTML block be preceded by a blank line.
- It does not allow the start tag to be indented.
- It requires a matching end tag, which it also does not allow to
be indented.
Most Markdown implementations (including some of Gruber's own) do not
respect all of these restrictions.
There is one respect, however, in which Gruber's rule is more liberal
than the one given here, since it allows blank lines to occur inside
an HTML block. There are two reasons for disallowing them here.
First, it removes the need to parse balanced tags, which is
expensive and can require backtracking from the end of the document
if no matching end tag is found. Second, it provides a very simple
and flexible way of including Markdown content inside HTML tags:
simply separate the Markdown from the HTML using blank lines:
Compare:
```````````````````````````````` example
<div>
*Emphasized* text.
</div>
.
<div>
<p><em>Emphasized</em> text.</p>
</div>
````````````````````````````````
```````````````````````````````` example
<div>
*Emphasized* text.
</div>
.
<div>
*Emphasized* text.
</div>
````````````````````````````````
Some Markdown implementations have adopted a convention of
interpreting content inside tags as text if the open tag has
the attribute `markdown=1`. The rule given above seems a simpler and
more elegant way of achieving the same expressive power, which is also
much simpler to parse.
The main potential drawback is that one can no longer paste HTML
blocks into Markdown documents with 100% reliability. However,
*in most cases* this will work fine, because the blank lines in
HTML are usually followed by HTML block tags. For example:
```````````````````````````````` example
<table>
<tr>
<td>
Hi
</td>
</tr>
</table>
.
<table>
<tr>
<td>
Hi
</td>
</tr>
</table>
````````````````````````````````
There are problems, however, if the inner tags are indented
*and* separated by spaces, as then they will be interpreted as
an indented code block:
```````````````````````````````` example
<table>
<tr>
<td>
Hi
</td>
</tr>
</table>
.
<table>
<tr>
<pre><code><td>
Hi
</td>
</code></pre>
</tr>
</table>
````````````````````````````````
Fortunately, blank lines are usually not necessary and can be
deleted. The exception is inside `<pre>` tags, but as described
[above][HTML blocks], raw HTML blocks starting with `<pre>`
*can* contain blank lines.
## Link reference definitions
A [link reference definition](@)
consists of a [link label], indented up to three spaces, followed
by a colon (`:`), optional [whitespace] (including up to one
[line ending]), a [link destination],
optional [whitespace] (including up to one
[line ending]), and an optional [link
title], which if it is present must be separated
from the [link destination] by [whitespace].
No further [non-whitespace characters] may occur on the line.
A [link reference definition]
does not correspond to a structural element of a document. Instead, it
defines a label which can be used in [reference links]
and reference-style [images] elsewhere in the document. [Link
reference definitions] can come either before or after the links that use
them.
```````````````````````````````` example
[foo]: /url "title"
[foo]
.
<p><a href="/url" title="title">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo]:
/url
'the title'
[foo]
.
<p><a href="/url" title="the title">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[Foo*bar\]]:my_(url) 'title (with parens)'
[Foo*bar\]]
.
<p><a href="my_(url)" title="title (with parens)">Foo*bar]</a></p>
````````````````````````````````
```````````````````````````````` example
[Foo bar]:
<my url>
'title'
[Foo bar]
.
<p><a href="my%20url" title="title">Foo bar</a></p>
````````````````````````````````
The title may extend over multiple lines:
```````````````````````````````` example
[foo]: /url '
title
line1
line2
'
[foo]
.
<p><a href="/url" title="
title
line1
line2
">foo</a></p>
````````````````````````````````
However, it may not contain a [blank line]:
```````````````````````````````` example
[foo]: /url 'title
with blank line'
[foo]
.
<p>[foo]: /url 'title</p>
<p>with blank line'</p>
<p>[foo]</p>
````````````````````````````````
The title may be omitted:
```````````````````````````````` example
[foo]:
/url
[foo]
.
<p><a href="/url">foo</a></p>
````````````````````````````````
The link destination may not be omitted:
```````````````````````````````` example
[foo]:
[foo]
.
<p>[foo]:</p>
<p>[foo]</p>
````````````````````````````````
However, an empty link destination may be specified using
angle brackets:
```````````````````````````````` example
[foo]: <>
[foo]
.
<p><a href="">foo</a></p>
````````````````````````````````
The title must be separated from the link destination by
whitespace:
```````````````````````````````` example
[foo]: <bar>(baz)
[foo]
.
<p>[foo]: <bar>(baz)</p>
<p>[foo]</p>
````````````````````````````````
Both title and destination can contain backslash escapes
and literal backslashes:
```````````````````````````````` example
[foo]: /url\bar\*baz "foo\"bar\baz"
[foo]
.
<p><a href="/url%5Cbar*baz" title="foo"bar\baz">foo</a></p>
````````````````````````````````
A link can come before its corresponding definition:
```````````````````````````````` example
[foo]
[foo]: url
.
<p><a href="url">foo</a></p>
````````````````````````````````
If there are several matching definitions, the first one takes
precedence:
```````````````````````````````` example
[foo]
[foo]: first
[foo]: second
.
<p><a href="first">foo</a></p>
````````````````````````````````
As noted in the section on [Links], matching of labels is
case-insensitive (see [matches]).
```````````````````````````````` example
[FOO]: /url
[Foo]
.
<p><a href="/url">Foo</a></p>
````````````````````````````````
```````````````````````````````` example
[ΑΓΩ]: /φου
[αγω]
.
<p><a href="/%CF%86%CE%BF%CF%85">αγω</a></p>
````````````````````````````````
Here is a link reference definition with no corresponding link.
It contributes nothing to the document.
```````````````````````````````` example
[foo]: /url
.
````````````````````````````````
Here is another one:
```````````````````````````````` example
[
foo
]: /url
bar
.
<p>bar</p>
````````````````````````````````
This is not a link reference definition, because there are
[non-whitespace characters] after the title:
```````````````````````````````` example
[foo]: /url "title" ok
.
<p>[foo]: /url "title" ok</p>
````````````````````````````````
This is a link reference definition, but it has no title:
```````````````````````````````` example
[foo]: /url
"title" ok
.
<p>"title" ok</p>
````````````````````````````````
This is not a link reference definition, because it is indented
four spaces:
```````````````````````````````` example
[foo]: /url "title"
[foo]
.
<pre><code>[foo]: /url "title"
</code></pre>
<p>[foo]</p>
````````````````````````````````
This is not a link reference definition, because it occurs inside
a code block:
```````````````````````````````` example
```
[foo]: /url
```
[foo]
.
<pre><code>[foo]: /url
</code></pre>
<p>[foo]</p>
````````````````````````````````
A [link reference definition] cannot interrupt a paragraph.
```````````````````````````````` example
Foo
[bar]: /baz
[bar]
.
<p>Foo
[bar]: /baz</p>
<p>[bar]</p>
````````````````````````````````
However, it can directly follow other block elements, such as headings
and thematic breaks, and it need not be followed by a blank line.
```````````````````````````````` example
# [Foo]
[foo]: /url
> bar
.
<h1><a href="/url">Foo</a></h1>
<blockquote>
<p>bar</p>
</blockquote>
````````````````````````````````
```````````````````````````````` example
[foo]: /url
bar
===
[foo]
.
<h1>bar</h1>
<p><a href="/url">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo]: /url
===
[foo]
.
<p>===
<a href="/url">foo</a></p>
````````````````````````````````
Several [link reference definitions]
can occur one after another, without intervening blank lines.
```````````````````````````````` example
[foo]: /foo-url "foo"
[bar]: /bar-url
"bar"
[baz]: /baz-url
[foo],
[bar],
[baz]
.
<p><a href="/foo-url" title="foo">foo</a>,
<a href="/bar-url" title="bar">bar</a>,
<a href="/baz-url">baz</a></p>
````````````````````````````````
[Link reference definitions] can occur
inside block containers, like lists and block quotations. They
affect the entire document, not just the container in which they
are defined:
```````````````````````````````` example
[foo]
> [foo]: /url
.
<p><a href="/url">foo</a></p>
<blockquote>
</blockquote>
````````````````````````````````
Whether something is a [link reference definition] is
independent of whether the link reference it defines is
used in the document. Thus, for example, the following
document contains just a link reference definition, and
no visible content:
```````````````````````````````` example
[foo]: /url
.
````````````````````````````````
## Paragraphs
A sequence of non-blank lines that cannot be interpreted as other
kinds of blocks forms a [paragraph](@).
The contents of the paragraph are the result of parsing the
paragraph's raw content as inlines. The paragraph's raw content
is formed by concatenating the lines and removing initial and final
[whitespace].
A simple example with two paragraphs:
```````````````````````````````` example
aaa
bbb
.
<p>aaa</p>
<p>bbb</p>
````````````````````````````````
Paragraphs can contain multiple lines, but no blank lines:
```````````````````````````````` example
aaa
bbb
ccc
ddd
.
<p>aaa
bbb</p>
<p>ccc
ddd</p>
````````````````````````````````
Multiple blank lines between paragraph have no effect:
```````````````````````````````` example
aaa
bbb
.
<p>aaa</p>
<p>bbb</p>
````````````````````````````````
Leading spaces are skipped:
```````````````````````````````` example
aaa
bbb
.
<p>aaa
bbb</p>
````````````````````````````````
Lines after the first may be indented any amount, since indented
code blocks cannot interrupt paragraphs.
```````````````````````````````` example
aaa
bbb
ccc
.
<p>aaa
bbb
ccc</p>
````````````````````````````````
However, the first line may be indented at most three spaces,
or an indented code block will be triggered:
```````````````````````````````` example
aaa
bbb
.
<p>aaa
bbb</p>
````````````````````````````````
```````````````````````````````` example
aaa
bbb
.
<pre><code>aaa
</code></pre>
<p>bbb</p>
````````````````````````````````
Final spaces are stripped before inline parsing, so a paragraph
that ends with two or more spaces will not end with a [hard line
break]:
```````````````````````````````` example
aaa
bbb
.
<p>aaa<br />
bbb</p>
````````````````````````````````
## Blank lines
[Blank lines] between block-level elements are ignored,
except for the role they play in determining whether a [list]
is [tight] or [loose].
Blank lines at the beginning and end of the document are also ignored.
```````````````````````````````` example
aaa
# aaa
.
<p>aaa</p>
<h1>aaa</h1>
````````````````````````````````
<div class="extension">
## Tables (extension)
GFM enables the `table` extension, where an additional leaf block type is
available.
A [table](@) is an arrangement of data with rows and columns, consisting of a
single header row, a [delimiter row] separating the header from the data, and
zero or more data rows.
Each row consists of cells containing arbitrary text, in which [inlines] are
parsed, separated by pipes (`|`). A leading and trailing pipe is also
recommended for clarity of reading, and if there's otherwise parsing ambiguity.
Spaces between pipes and cell content are trimmed. Block-level elements cannot
be inserted in a table.
The [delimiter row](@) consists of cells whose only content are hyphens (`-`),
and optionally, a leading or trailing colon (`:`), or both, to indicate left,
right, or center alignment respectively.
```````````````````````````````` example table
| foo | bar |
| --- | --- |
| baz | bim |
.
<table>
<thead>
<tr>
<th>foo</th>
<th>bar</th>
</tr>
</thead>
<tbody>
<tr>
<td>baz</td>
<td>bim</td>
</tr>
</tbody>
</table>
````````````````````````````````
Cells in one column don't need to match length, though it's easier to read if
they are. Likewise, use of leading and trailing pipes may be inconsistent:
```````````````````````````````` example table
| abc | defghi |
:-: | -----------:
bar | baz
.
<table>
<thead>
<tr>
<th align="center">abc</th>
<th align="right">defghi</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">bar</td>
<td align="right">baz</td>
</tr>
</tbody>
</table>
````````````````````````````````
Include a pipe in a cell's content by escaping it, including inside other
inline spans:
```````````````````````````````` example table
| f\|oo |
| ------ |
| b `\|` az |
| b **\|** im |
.
<table>
<thead>
<tr>
<th>f|oo</th>
</tr>
</thead>
<tbody>
<tr>
<td>b <code>|</code> az</td>
</tr>
<tr>
<td>b <strong>|</strong> im</td>
</tr>
</tbody>
</table>
````````````````````````````````
The table is broken at the first empty line, or beginning of another
block-level structure:
```````````````````````````````` example table
| abc | def |
| --- | --- |
| bar | baz |
> bar
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>baz</td>
</tr>
</tbody>
</table>
<blockquote>
<p>bar</p>
</blockquote>
````````````````````````````````
```````````````````````````````` example table
| abc | def |
| --- | --- |
| bar | baz |
bar
bar
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>baz</td>
</tr>
<tr>
<td>bar</td>
<td></td>
</tr>
</tbody>
</table>
<p>bar</p>
````````````````````````````````
The header row must match the [delimiter row] in the number of cells. If not,
a table will not be recognized:
```````````````````````````````` example table
| abc | def |
| --- |
| bar |
.
<p>| abc | def |
| --- |
| bar |</p>
````````````````````````````````
The remainder of the table's rows may vary in the number of cells. If there
are a number of cells fewer than the number of cells in the header row, empty
cells are inserted. If there are greater, the excess is ignored:
```````````````````````````````` example table
| abc | def |
| --- | --- |
| bar |
| bar | baz | boo |
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td></td>
</tr>
<tr>
<td>bar</td>
<td>baz</td>
</tr>
</tbody>
</table>
````````````````````````````````
If there are no rows in the body, no `<tbody>` is generated in HTML output:
```````````````````````````````` example table
| abc | def |
| --- | --- |
.
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
</table>
````````````````````````````````
</div>
# Container blocks
A [container block](#container-blocks) is a block that has other
blocks as its contents. There are two basic kinds of container blocks:
[block quotes] and [list items].
[Lists] are meta-containers for [list items].
We define the syntax for container blocks recursively. The general
form of the definition is:
> If X is a sequence of blocks, then the result of
> transforming X in such-and-such a way is a container of type Y
> with these blocks as its content.
So, we explain what counts as a block quote or list item by explaining
how these can be *generated* from their contents. This should suffice
to define the syntax, although it does not give a recipe for *parsing*
these constructions. (A recipe is provided below in the section entitled
[A parsing strategy](#appendix-a-parsing-strategy).)
## Block quotes
A [block quote marker](@)
consists of 0-3 spaces of initial indent, plus (a) the character `>` together
with a following space, or (b) a single character `>` not followed by a space.
The following rules define [block quotes]:
1. **Basic case.** If a string of lines *Ls* constitute a sequence
of blocks *Bs*, then the result of prepending a [block quote
marker] to the beginning of each line in *Ls*
is a [block quote](#block-quotes) containing *Bs*.
2. **Laziness.** If a string of lines *Ls* constitute a [block
quote](#block-quotes) with contents *Bs*, then the result of deleting
the initial [block quote marker] from one or
more lines in which the next [non-whitespace character] after the [block
quote marker] is [paragraph continuation
text] is a block quote with *Bs* as its content.
[Paragraph continuation text](@) is text
that will be parsed as part of the content of a paragraph, but does
not occur at the beginning of the paragraph.
3. **Consecutiveness.** A document cannot contain two [block
quotes] in a row unless there is a [blank line] between them.
Nothing else counts as a [block quote](#block-quotes).
Here is a simple example:
```````````````````````````````` example
> # Foo
> bar
> baz
.
<blockquote>
<h1>Foo</h1>
<p>bar
baz</p>
</blockquote>
````````````````````````````````
The spaces after the `>` characters can be omitted:
```````````````````````````````` example
># Foo
>bar
> baz
.
<blockquote>
<h1>Foo</h1>
<p>bar
baz</p>
</blockquote>
````````````````````````````````
The `>` characters can be indented 1-3 spaces:
```````````````````````````````` example
> # Foo
> bar
> baz
.
<blockquote>
<h1>Foo</h1>
<p>bar
baz</p>
</blockquote>
````````````````````````````````
Four spaces gives us a code block:
```````````````````````````````` example
> # Foo
> bar
> baz
.
<pre><code>> # Foo
> bar
> baz
</code></pre>
````````````````````````````````
The Laziness clause allows us to omit the `>` before
[paragraph continuation text]:
```````````````````````````````` example
> # Foo
> bar
baz
.
<blockquote>
<h1>Foo</h1>
<p>bar
baz</p>
</blockquote>
````````````````````````````````
A block quote can contain some lazy and some non-lazy
continuation lines:
```````````````````````````````` example
> bar
baz
> foo
.
<blockquote>
<p>bar
baz
foo</p>
</blockquote>
````````````````````````````````
Laziness only applies to lines that would have been continuations of
paragraphs had they been prepended with [block quote markers].
For example, the `> ` cannot be omitted in the second line of
``` markdown
> foo
> ---
```
without changing the meaning:
```````````````````````````````` example
> foo
---
.
<blockquote>
<p>foo</p>
</blockquote>
<hr />
````````````````````````````````
Similarly, if we omit the `> ` in the second line of
``` markdown
> - foo
> - bar
```
then the block quote ends after the first line:
```````````````````````````````` example
> - foo
- bar
.
<blockquote>
<ul>
<li>foo</li>
</ul>
</blockquote>
<ul>
<li>bar</li>
</ul>
````````````````````````````````
For the same reason, we can't omit the `> ` in front of
subsequent lines of an indented or fenced code block:
```````````````````````````````` example
> foo
bar
.
<blockquote>
<pre><code>foo
</code></pre>
</blockquote>
<pre><code>bar
</code></pre>
````````````````````````````````
```````````````````````````````` example
> ```
foo
```
.
<blockquote>
<pre><code></code></pre>
</blockquote>
<p>foo</p>
<pre><code></code></pre>
````````````````````````````````
Note that in the following case, we have a [lazy
continuation line]:
```````````````````````````````` example
> foo
- bar
.
<blockquote>
<p>foo
- bar</p>
</blockquote>
````````````````````````````````
To see why, note that in
```markdown
> foo
> - bar
```
the `- bar` is indented too far to start a list, and can't
be an indented code block because indented code blocks cannot
interrupt paragraphs, so it is [paragraph continuation text].
A block quote can be empty:
```````````````````````````````` example
>
.
<blockquote>
</blockquote>
````````````````````````````````
```````````````````````````````` example
>
>
>
.
<blockquote>
</blockquote>
````````````````````````````````
A block quote can have initial or final blank lines:
```````````````````````````````` example
>
> foo
>
.
<blockquote>
<p>foo</p>
</blockquote>
````````````````````````````````
A blank line always separates block quotes:
```````````````````````````````` example
> foo
> bar
.
<blockquote>
<p>foo</p>
</blockquote>
<blockquote>
<p>bar</p>
</blockquote>
````````````````````````````````
(Most current Markdown implementations, including John Gruber's
original `Markdown.pl`, will parse this example as a single block quote
with two paragraphs. But it seems better to allow the author to decide
whether two block quotes or one are wanted.)
Consecutiveness means that if we put these block quotes together,
we get a single block quote:
```````````````````````````````` example
> foo
> bar
.
<blockquote>
<p>foo
bar</p>
</blockquote>
````````````````````````````````
To get a block quote with two paragraphs, use:
```````````````````````````````` example
> foo
>
> bar
.
<blockquote>
<p>foo</p>
<p>bar</p>
</blockquote>
````````````````````````````````
Block quotes can interrupt paragraphs:
```````````````````````````````` example
foo
> bar
.
<p>foo</p>
<blockquote>
<p>bar</p>
</blockquote>
````````````````````````````````
In general, blank lines are not needed before or after block
quotes:
```````````````````````````````` example
> aaa
***
> bbb
.
<blockquote>
<p>aaa</p>
</blockquote>
<hr />
<blockquote>
<p>bbb</p>
</blockquote>
````````````````````````````````
However, because of laziness, a blank line is needed between
a block quote and a following paragraph:
```````````````````````````````` example
> bar
baz
.
<blockquote>
<p>bar
baz</p>
</blockquote>
````````````````````````````````
```````````````````````````````` example
> bar
baz
.
<blockquote>
<p>bar</p>
</blockquote>
<p>baz</p>
````````````````````````````````
```````````````````````````````` example
> bar
>
baz
.
<blockquote>
<p>bar</p>
</blockquote>
<p>baz</p>
````````````````````````````````
It is a consequence of the Laziness rule that any number
of initial `>`s may be omitted on a continuation line of a
nested block quote:
```````````````````````````````` example
> > > foo
bar
.
<blockquote>
<blockquote>
<blockquote>
<p>foo
bar</p>
</blockquote>
</blockquote>
</blockquote>
````````````````````````````````
```````````````````````````````` example
>>> foo
> bar
>>baz
.
<blockquote>
<blockquote>
<blockquote>
<p>foo
bar
baz</p>
</blockquote>
</blockquote>
</blockquote>
````````````````````````````````
When including an indented code block in a block quote,
remember that the [block quote marker] includes
both the `>` and a following space. So *five spaces* are needed after
the `>`:
```````````````````````````````` example
> code
> not code
.
<blockquote>
<pre><code>code
</code></pre>
</blockquote>
<blockquote>
<p>not code</p>
</blockquote>
````````````````````````````````
## List items
A [list marker](@) is a
[bullet list marker] or an [ordered list marker].
A [bullet list marker](@)
is a `-`, `+`, or `*` character.
An [ordered list marker](@)
is a sequence of 1--9 arabic digits (`0-9`), followed by either a
`.` character or a `)` character. (The reason for the length
limit is that with 10 digits we start seeing integer overflows
in some browsers.)
The following rules define [list items]:
1. **Basic case.** If a sequence of lines *Ls* constitute a sequence of
blocks *Bs* starting with a [non-whitespace character], and *M* is a
list marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces, then the result
of prepending *M* and the following spaces to the first line of
*Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a
list item with *Bs* as its contents. The type of the list item
(bullet or ordered) is determined by the type of its list marker.
If the list item is ordered, then it is also assigned a start
number, based on the ordered list marker.
Exceptions:
1. When the first list item in a [list] interrupts
a paragraph---that is, when it starts on a line that would
otherwise count as [paragraph continuation text]---then (a)
the lines *Ls* must not begin with a blank line, and (b) if
the list item is ordered, the start number must be 1.
2. If any line is a [thematic break][thematic breaks] then
that line is not a list item.
For example, let *Ls* be the lines
```````````````````````````````` example
A paragraph
with two lines.
indented code
> A block quote.
.
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
````````````````````````````````
And let *M* be the marker `1.`, and *N* = 2. Then rule #1 says
that the following is an ordered list item with start number 1,
and the same contents as *Ls*:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<ol>
<li>
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
</li>
</ol>
````````````````````````````````
The most important thing to notice is that the position of
the text after the list marker determines how much indentation
is needed in subsequent blocks in the list item. If the list
marker takes up two spaces, and there are three spaces between
the list marker and the next [non-whitespace character], then blocks
must be indented five spaces in order to fall under the list
item.
Here are some examples showing how far content must be indented to be
put under the list item:
```````````````````````````````` example
- one
two
.
<ul>
<li>one</li>
</ul>
<p>two</p>
````````````````````````````````
```````````````````````````````` example
- one
two
.
<ul>
<li>
<p>one</p>
<p>two</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- one
two
.
<ul>
<li>one</li>
</ul>
<pre><code> two
</code></pre>
````````````````````````````````
```````````````````````````````` example
- one
two
.
<ul>
<li>
<p>one</p>
<p>two</p>
</li>
</ul>
````````````````````````````````
It is tempting to think of this in terms of columns: the continuation
blocks must be indented at least to the column of the first
[non-whitespace character] after the list marker. However, that is not quite right.
The spaces after the list marker determine how much relative indentation
is needed. Which column this indentation reaches will depend on
how the list item is embedded in other constructions, as shown by
this example:
```````````````````````````````` example
> > 1. one
>>
>> two
.
<blockquote>
<blockquote>
<ol>
<li>
<p>one</p>
<p>two</p>
</li>
</ol>
</blockquote>
</blockquote>
````````````````````````````````
Here `two` occurs in the same column as the list marker `1.`,
but is actually contained in the list item, because there is
sufficient indentation after the last containing blockquote marker.
The converse is also possible. In the following example, the word `two`
occurs far to the right of the initial text of the list item, `one`, but
it is not considered part of the list item, because it is not indented
far enough past the blockquote marker:
```````````````````````````````` example
>>- one
>>
> > two
.
<blockquote>
<blockquote>
<ul>
<li>one</li>
</ul>
<p>two</p>
</blockquote>
</blockquote>
````````````````````````````````
Note that at least one space is needed between the list marker and
any following content, so these are not list items:
```````````````````````````````` example
-one
2.two
.
<p>-one</p>
<p>2.two</p>
````````````````````````````````
A list item may contain blocks that are separated by more than
one blank line.
```````````````````````````````` example
- foo
bar
.
<ul>
<li>
<p>foo</p>
<p>bar</p>
</li>
</ul>
````````````````````````````````
A list item may contain any kind of block:
```````````````````````````````` example
1. foo
```
bar
```
baz
> bam
.
<ol>
<li>
<p>foo</p>
<pre><code>bar
</code></pre>
<p>baz</p>
<blockquote>
<p>bam</p>
</blockquote>
</li>
</ol>
````````````````````````````````
A list item that contains an indented code block will preserve
empty lines within the code block verbatim.
```````````````````````````````` example
- Foo
bar
baz
.
<ul>
<li>
<p>Foo</p>
<pre><code>bar
baz
</code></pre>
</li>
</ul>
````````````````````````````````
Note that ordered list start numbers must be nine digits or less:
```````````````````````````````` example
123456789. ok
.
<ol start="123456789">
<li>ok</li>
</ol>
````````````````````````````````
```````````````````````````````` example
1234567890. not ok
.
<p>1234567890. not ok</p>
````````````````````````````````
A start number may begin with 0s:
```````````````````````````````` example
0. ok
.
<ol start="0">
<li>ok</li>
</ol>
````````````````````````````````
```````````````````````````````` example
003. ok
.
<ol start="3">
<li>ok</li>
</ol>
````````````````````````````````
A start number may not be negative:
```````````````````````````````` example
-1. not ok
.
<p>-1. not ok</p>
````````````````````````````````
2. **Item starting with indented code.** If a sequence of lines *Ls*
constitute a sequence of blocks *Bs* starting with an indented code
block, and *M* is a list marker of width *W* followed by
one space, then the result of prepending *M* and the following
space to the first line of *Ls*, and indenting subsequent lines of
*Ls* by *W + 1* spaces, is a list item with *Bs* as its contents.
If a line is empty, then it need not be indented. The type of the
list item (bullet or ordered) is determined by the type of its list
marker. If the list item is ordered, then it is also assigned a
start number, based on the ordered list marker.
An indented code block will have to be indented four spaces beyond
the edge of the region where text will be included in the list item.
In the following case that is 6 spaces:
```````````````````````````````` example
- foo
bar
.
<ul>
<li>
<p>foo</p>
<pre><code>bar
</code></pre>
</li>
</ul>
````````````````````````````````
And in this case it is 11 spaces:
```````````````````````````````` example
10. foo
bar
.
<ol start="10">
<li>
<p>foo</p>
<pre><code>bar
</code></pre>
</li>
</ol>
````````````````````````````````
If the *first* block in the list item is an indented code block,
then by rule #2, the contents must be indented *one* space after the
list marker:
```````````````````````````````` example
indented code
paragraph
more code
.
<pre><code>indented code
</code></pre>
<p>paragraph</p>
<pre><code>more code
</code></pre>
````````````````````````````````
```````````````````````````````` example
1. indented code
paragraph
more code
.
<ol>
<li>
<pre><code>indented code
</code></pre>
<p>paragraph</p>
<pre><code>more code
</code></pre>
</li>
</ol>
````````````````````````````````
Note that an additional space indent is interpreted as space
inside the code block:
```````````````````````````````` example
1. indented code
paragraph
more code
.
<ol>
<li>
<pre><code> indented code
</code></pre>
<p>paragraph</p>
<pre><code>more code
</code></pre>
</li>
</ol>
````````````````````````````````
Note that rules #1 and #2 only apply to two cases: (a) cases
in which the lines to be included in a list item begin with a
[non-whitespace character], and (b) cases in which
they begin with an indented code
block. In a case like the following, where the first block begins with
a three-space indent, the rules do not allow us to form a list item by
indenting the whole thing and prepending a list marker:
```````````````````````````````` example
foo
bar
.
<p>foo</p>
<p>bar</p>
````````````````````````````````
```````````````````````````````` example
- foo
bar
.
<ul>
<li>foo</li>
</ul>
<p>bar</p>
````````````````````````````````
This is not a significant restriction, because when a block begins
with 1-3 spaces indent, the indentation can always be removed without
a change in interpretation, allowing rule #1 to be applied. So, in
the above case:
```````````````````````````````` example
- foo
bar
.
<ul>
<li>
<p>foo</p>
<p>bar</p>
</li>
</ul>
````````````````````````````````
3. **Item starting with a blank line.** If a sequence of lines *Ls*
starting with a single [blank line] constitute a (possibly empty)
sequence of blocks *Bs*, not separated from each other by more than
one blank line, and *M* is a list marker of width *W*,
then the result of prepending *M* to the first line of *Ls*, and
indenting subsequent lines of *Ls* by *W + 1* spaces, is a list
item with *Bs* as its contents.
If a line is empty, then it need not be indented. The type of the
list item (bullet or ordered) is determined by the type of its list
marker. If the list item is ordered, then it is also assigned a
start number, based on the ordered list marker.
Here are some list items that start with a blank line but are not empty:
```````````````````````````````` example
-
foo
-
```
bar
```
-
baz
.
<ul>
<li>foo</li>
<li>
<pre><code>bar
</code></pre>
</li>
<li>
<pre><code>baz
</code></pre>
</li>
</ul>
````````````````````````````````
When the list item starts with a blank line, the number of spaces
following the list marker doesn't change the required indentation:
```````````````````````````````` example
-
foo
.
<ul>
<li>foo</li>
</ul>
````````````````````````````````
A list item can begin with at most one blank line.
In the following example, `foo` is not part of the list
item:
```````````````````````````````` example
-
foo
.
<ul>
<li></li>
</ul>
<p>foo</p>
````````````````````````````````
Here is an empty bullet list item:
```````````````````````````````` example
- foo
-
- bar
.
<ul>
<li>foo</li>
<li></li>
<li>bar</li>
</ul>
````````````````````````````````
It does not matter whether there are spaces following the [list marker]:
```````````````````````````````` example
- foo
-
- bar
.
<ul>
<li>foo</li>
<li></li>
<li>bar</li>
</ul>
````````````````````````````````
Here is an empty ordered list item:
```````````````````````````````` example
1. foo
2.
3. bar
.
<ol>
<li>foo</li>
<li></li>
<li>bar</li>
</ol>
````````````````````````````````
A list may start or end with an empty list item:
```````````````````````````````` example
*
.
<ul>
<li></li>
</ul>
````````````````````````````````
However, an empty list item cannot interrupt a paragraph:
```````````````````````````````` example
foo
*
foo
1.
.
<p>foo
*</p>
<p>foo
1.</p>
````````````````````````````````
4. **Indentation.** If a sequence of lines *Ls* constitutes a list item
according to rule #1, #2, or #3, then the result of indenting each line
of *Ls* by 1-3 spaces (the same for each line) also constitutes a
list item with the same contents and attributes. If a line is
empty, then it need not be indented.
Indented one space:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<ol>
<li>
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
</li>
</ol>
````````````````````````````````
Indented two spaces:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<ol>
<li>
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
</li>
</ol>
````````````````````````````````
Indented three spaces:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<ol>
<li>
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
</li>
</ol>
````````````````````````````````
Four spaces indent gives a code block:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<pre><code>1. A paragraph
with two lines.
indented code
> A block quote.
</code></pre>
````````````````````````````````
5. **Laziness.** If a string of lines *Ls* constitute a [list
item](#list-items) with contents *Bs*, then the result of deleting
some or all of the indentation from one or more lines in which the
next [non-whitespace character] after the indentation is
[paragraph continuation text] is a
list item with the same contents and attributes. The unindented
lines are called
[lazy continuation line](@)s.
Here is an example with [lazy continuation lines]:
```````````````````````````````` example
1. A paragraph
with two lines.
indented code
> A block quote.
.
<ol>
<li>
<p>A paragraph
with two lines.</p>
<pre><code>indented code
</code></pre>
<blockquote>
<p>A block quote.</p>
</blockquote>
</li>
</ol>
````````````````````````````````
Indentation can be partially deleted:
```````````````````````````````` example
1. A paragraph
with two lines.
.
<ol>
<li>A paragraph
with two lines.</li>
</ol>
````````````````````````````````
These examples show how laziness can work in nested structures:
```````````````````````````````` example
> 1. > Blockquote
continued here.
.
<blockquote>
<ol>
<li>
<blockquote>
<p>Blockquote
continued here.</p>
</blockquote>
</li>
</ol>
</blockquote>
````````````````````````````````
```````````````````````````````` example
> 1. > Blockquote
> continued here.
.
<blockquote>
<ol>
<li>
<blockquote>
<p>Blockquote
continued here.</p>
</blockquote>
</li>
</ol>
</blockquote>
````````````````````````````````
6. **That's all.** Nothing that is not counted as a list item by rules
#1--5 counts as a [list item](#list-items).
The rules for sublists follow from the general rules
[above][List items]. A sublist must be indented the same number
of spaces a paragraph would need to be in order to be included
in the list item.
So, in this case we need two spaces indent:
```````````````````````````````` example
- foo
- bar
- baz
- boo
.
<ul>
<li>foo
<ul>
<li>bar
<ul>
<li>baz
<ul>
<li>boo</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
````````````````````````````````
One is not enough:
```````````````````````````````` example
- foo
- bar
- baz
- boo
.
<ul>
<li>foo</li>
<li>bar</li>
<li>baz</li>
<li>boo</li>
</ul>
````````````````````````````````
Here we need four, because the list marker is wider:
```````````````````````````````` example
10) foo
- bar
.
<ol start="10">
<li>foo
<ul>
<li>bar</li>
</ul>
</li>
</ol>
````````````````````````````````
Three is not enough:
```````````````````````````````` example
10) foo
- bar
.
<ol start="10">
<li>foo</li>
</ol>
<ul>
<li>bar</li>
</ul>
````````````````````````````````
A list may be the first block in a list item:
```````````````````````````````` example
- - foo
.
<ul>
<li>
<ul>
<li>foo</li>
</ul>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
1. - 2. foo
.
<ol>
<li>
<ul>
<li>
<ol start="2">
<li>foo</li>
</ol>
</li>
</ul>
</li>
</ol>
````````````````````````````````
A list item can contain a heading:
```````````````````````````````` example
- # Foo
- Bar
---
baz
.
<ul>
<li>
<h1>Foo</h1>
</li>
<li>
<h2>Bar</h2>
baz</li>
</ul>
````````````````````````````````
### Motivation
John Gruber's Markdown spec says the following about list items:
1. "List markers typically start at the left margin, but may be indented
by up to three spaces. List markers must be followed by one or more
spaces or a tab."
2. "To make lists look nice, you can wrap items with hanging indents....
But if you don't want to, you don't have to."
3. "List items may consist of multiple paragraphs. Each subsequent
paragraph in a list item must be indented by either 4 spaces or one
tab."
4. "It looks nice if you indent every line of the subsequent paragraphs,
but here again, Markdown will allow you to be lazy."
5. "To put a blockquote within a list item, the blockquote's `>`
delimiters need to be indented."
6. "To put a code block within a list item, the code block needs to be
indented twice — 8 spaces or two tabs."
These rules specify that a paragraph under a list item must be indented
four spaces (presumably, from the left margin, rather than the start of
the list marker, but this is not said), and that code under a list item
must be indented eight spaces instead of the usual four. They also say
that a block quote must be indented, but not by how much; however, the
example given has four spaces indentation. Although nothing is said
about other kinds of block-level content, it is certainly reasonable to
infer that *all* block elements under a list item, including other
lists, must be indented four spaces. This principle has been called the
*four-space rule*.
The four-space rule is clear and principled, and if the reference
implementation `Markdown.pl` had followed it, it probably would have
become the standard. However, `Markdown.pl` allowed paragraphs and
sublists to start with only two spaces indentation, at least on the
outer level. Worse, its behavior was inconsistent: a sublist of an
outer-level list needed two spaces indentation, but a sublist of this
sublist needed three spaces. It is not surprising, then, that different
implementations of Markdown have developed very different rules for
determining what comes under a list item. (Pandoc and python-Markdown,
for example, stuck with Gruber's syntax description and the four-space
rule, while discount, redcarpet, marked, PHP Markdown, and others
followed `Markdown.pl`'s behavior more closely.)
Unfortunately, given the divergences between implementations, there
is no way to give a spec for list items that will be guaranteed not
to break any existing documents. However, the spec given here should
correctly handle lists formatted with either the four-space rule or
the more forgiving `Markdown.pl` behavior, provided they are laid out
in a way that is natural for a human to read.
The strategy here is to let the width and indentation of the list marker
determine the indentation necessary for blocks to fall under the list
item, rather than having a fixed and arbitrary number. The writer can
think of the body of the list item as a unit which gets indented to the
right enough to fit the list marker (and any indentation on the list
marker). (The laziness rule, #5, then allows continuation lines to be
unindented if needed.)
This rule is superior, we claim, to any rule requiring a fixed level of
indentation from the margin. The four-space rule is clear but
unnatural. It is quite unintuitive that
``` markdown
- foo
bar
- baz
```
should be parsed as two lists with an intervening paragraph,
``` html
<ul>
<li>foo</li>
</ul>
<p>bar</p>
<ul>
<li>baz</li>
</ul>
```
as the four-space rule demands, rather than a single list,
``` html
<ul>
<li>
<p>foo</p>
<p>bar</p>
<ul>
<li>baz</li>
</ul>
</li>
</ul>
```
The choice of four spaces is arbitrary. It can be learned, but it is
not likely to be guessed, and it trips up beginners regularly.
Would it help to adopt a two-space rule? The problem is that such
a rule, together with the rule allowing 1--3 spaces indentation of the
initial list marker, allows text that is indented *less than* the
original list marker to be included in the list item. For example,
`Markdown.pl` parses
``` markdown
- one
two
```
as a single list item, with `two` a continuation paragraph:
``` html
<ul>
<li>
<p>one</p>
<p>two</p>
</li>
</ul>
```
and similarly
``` markdown
> - one
>
> two
```
as
``` html
<blockquote>
<ul>
<li>
<p>one</p>
<p>two</p>
</li>
</ul>
</blockquote>
```
This is extremely unintuitive.
Rather than requiring a fixed indent from the margin, we could require
a fixed indent (say, two spaces, or even one space) from the list marker (which
may itself be indented). This proposal would remove the last anomaly
discussed. Unlike the spec presented above, it would count the following
as a list item with a subparagraph, even though the paragraph `bar`
is not indented as far as the first paragraph `foo`:
``` markdown
10. foo
bar
```
Arguably this text does read like a list item with `bar` as a subparagraph,
which may count in favor of the proposal. However, on this proposal indented
code would have to be indented six spaces after the list marker. And this
would break a lot of existing Markdown, which has the pattern:
``` markdown
1. foo
indented code
```
where the code is indented eight spaces. The spec above, by contrast, will
parse this text as expected, since the code block's indentation is measured
from the beginning of `foo`.
The one case that needs special treatment is a list item that *starts*
with indented code. How much indentation is required in that case, since
we don't have a "first paragraph" to measure from? Rule #2 simply stipulates
that in such cases, we require one space indentation from the list marker
(and then the normal four spaces for the indented code). This will match the
four-space rule in cases where the list marker plus its initial indentation
takes four spaces (a common case), but diverge in other cases.
<div class="extension">
## Task list items (extension)
GFM enables the `tasklist` extension, where an additional processing step is
performed on [list items].
A [task list item](@) is a [list item][list items] where the first block in it
is a paragraph which begins with a [task list item marker] and at least one
whitespace character before any other content.
A [task list item marker](@) consists of an optional number of spaces, a left
bracket (`[`), either a whitespace character or the letter `x` in either
lowercase or uppercase, and then a right bracket (`]`).
When rendered, the [task list item marker] is replaced with a semantic checkbox element;
in an HTML output, this would be an `<input type="checkbox">` element.
If the character between the brackets is a whitespace character, the checkbox
is unchecked. Otherwise, the checkbox is checked.
This spec does not define how the checkbox elements are interacted with: in practice,
implementors are free to render the checkboxes as disabled or inmutable elements,
or they may dynamically handle dynamic interactions (i.e. checking, unchecking) in
the final rendered document.
```````````````````````````````` example disabled
- [ ] foo
- [x] bar
.
<ul>
<li><input disabled="" type="checkbox"> foo</li>
<li><input checked="" disabled="" type="checkbox"> bar</li>
</ul>
````````````````````````````````
Task lists can be arbitrarily nested:
```````````````````````````````` example disabled
- [x] foo
- [ ] bar
- [x] baz
- [ ] bim
.
<ul>
<li><input checked="" disabled="" type="checkbox"> foo
<ul>
<li><input disabled="" type="checkbox"> bar</li>
<li><input checked="" disabled="" type="checkbox"> baz</li>
</ul>
</li>
<li><input disabled="" type="checkbox"> bim</li>
</ul>
````````````````````````````````
</div>
## Lists
A [list](@) is a sequence of one or more
list items [of the same type]. The list items
may be separated by any number of blank lines.
Two list items are [of the same type](@)
if they begin with a [list marker] of the same type.
Two list markers are of the
same type if (a) they are bullet list markers using the same character
(`-`, `+`, or `*`) or (b) they are ordered list numbers with the same
delimiter (either `.` or `)`).
A list is an [ordered list](@)
if its constituent list items begin with
[ordered list markers], and a
[bullet list](@) if its constituent list
items begin with [bullet list markers].
The [start number](@)
of an [ordered list] is determined by the list number of
its initial list item. The numbers of subsequent list items are
disregarded.
A list is [loose](@) if any of its constituent
list items are separated by blank lines, or if any of its constituent
list items directly contain two block-level elements with a blank line
between them. Otherwise a list is [tight](@).
(The difference in HTML output is that paragraphs in a loose list are
wrapped in `<p>` tags, while paragraphs in a tight list are not.)
Changing the bullet or ordered list delimiter starts a new list:
```````````````````````````````` example
- foo
- bar
+ baz
.
<ul>
<li>foo</li>
<li>bar</li>
</ul>
<ul>
<li>baz</li>
</ul>
````````````````````````````````
```````````````````````````````` example
1. foo
2. bar
3) baz
.
<ol>
<li>foo</li>
<li>bar</li>
</ol>
<ol start="3">
<li>baz</li>
</ol>
````````````````````````````````
In CommonMark, a list can interrupt a paragraph. That is,
no blank line is needed to separate a paragraph from a following
list:
```````````````````````````````` example
Foo
- bar
- baz
.
<p>Foo</p>
<ul>
<li>bar</li>
<li>baz</li>
</ul>
````````````````````````````````
`Markdown.pl` does not allow this, through fear of triggering a list
via a numeral in a hard-wrapped line:
``` markdown
The number of windows in my house is
14. The number of doors is 6.
```
Oddly, though, `Markdown.pl` *does* allow a blockquote to
interrupt a paragraph, even though the same considerations might
apply.
In CommonMark, we do allow lists to interrupt paragraphs, for
two reasons. First, it is natural and not uncommon for people
to start lists without blank lines:
``` markdown
I need to buy
- new shoes
- a coat
- a plane ticket
```
Second, we are attracted to a
> [principle of uniformity](@):
> if a chunk of text has a certain
> meaning, it will continue to have the same meaning when put into a
> container block (such as a list item or blockquote).
(Indeed, the spec for [list items] and [block quotes] presupposes
this principle.) This principle implies that if
``` markdown
* I need to buy
- new shoes
- a coat
- a plane ticket
```
is a list item containing a paragraph followed by a nested sublist,
as all Markdown implementations agree it is (though the paragraph
may be rendered without `<p>` tags, since the list is "tight"),
then
``` markdown
I need to buy
- new shoes
- a coat
- a plane ticket
```
by itself should be a paragraph followed by a nested sublist.
Since it is well established Markdown practice to allow lists to
interrupt paragraphs inside list items, the [principle of
uniformity] requires us to allow this outside list items as
well. ([reStructuredText](http://docutils.sourceforge.net/rst.html)
takes a different approach, requiring blank lines before lists
even inside other list items.)
In order to solve of unwanted lists in paragraphs with
hard-wrapped numerals, we allow only lists starting with `1` to
interrupt paragraphs. Thus,
```````````````````````````````` example
The number of windows in my house is
14. The number of doors is 6.
.
<p>The number of windows in my house is
14. The number of doors is 6.</p>
````````````````````````````````
We may still get an unintended result in cases like
```````````````````````````````` example
The number of windows in my house is
1. The number of doors is 6.
.
<p>The number of windows in my house is</p>
<ol>
<li>The number of doors is 6.</li>
</ol>
````````````````````````````````
but this rule should prevent most spurious list captures.
There can be any number of blank lines between items:
```````````````````````````````` example
- foo
- bar
- baz
.
<ul>
<li>
<p>foo</p>
</li>
<li>
<p>bar</p>
</li>
<li>
<p>baz</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- foo
- bar
- baz
bim
.
<ul>
<li>foo
<ul>
<li>bar
<ul>
<li>
<p>baz</p>
<p>bim</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
````````````````````````````````
To separate consecutive lists of the same type, or to separate a
list from an indented code block that would otherwise be parsed
as a subparagraph of the final list item, you can insert a blank HTML
comment:
```````````````````````````````` example
- foo
- bar
<!-- -->
- baz
- bim
.
<ul>
<li>foo</li>
<li>bar</li>
</ul>
<!-- -->
<ul>
<li>baz</li>
<li>bim</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- foo
notcode
- foo
<!-- -->
code
.
<ul>
<li>
<p>foo</p>
<p>notcode</p>
</li>
<li>
<p>foo</p>
</li>
</ul>
<!-- -->
<pre><code>code
</code></pre>
````````````````````````````````
List items need not be indented to the same level. The following
list items will be treated as items at the same list level,
since none is indented enough to belong to the previous list
item:
```````````````````````````````` example
- a
- b
- c
- d
- e
- f
- g
.
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
<li>f</li>
<li>g</li>
</ul>
````````````````````````````````
```````````````````````````````` example
1. a
2. b
3. c
.
<ol>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
</li>
<li>
<p>c</p>
</li>
</ol>
````````````````````````````````
Note, however, that list items may not be indented more than
three spaces. Here `- e` is treated as a paragraph continuation
line, because it is indented more than three spaces:
```````````````````````````````` example
- a
- b
- c
- d
- e
.
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d
- e</li>
</ul>
````````````````````````````````
And here, `3. c` is treated as in indented code block,
because it is indented four spaces and preceded by a
blank line.
```````````````````````````````` example
1. a
2. b
3. c
.
<ol>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
</li>
</ol>
<pre><code>3. c
</code></pre>
````````````````````````````````
This is a loose list, because there is a blank line between
two of the list items:
```````````````````````````````` example
- a
- b
- c
.
<ul>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
</li>
<li>
<p>c</p>
</li>
</ul>
````````````````````````````````
So is this, with a empty second item:
```````````````````````````````` example
* a
*
* c
.
<ul>
<li>
<p>a</p>
</li>
<li></li>
<li>
<p>c</p>
</li>
</ul>
````````````````````````````````
These are loose lists, even though there is no space between the items,
because one of the items directly contains two block-level elements
with a blank line between them:
```````````````````````````````` example
- a
- b
c
- d
.
<ul>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
<p>c</p>
</li>
<li>
<p>d</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- a
- b
[ref]: /url
- d
.
<ul>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
</li>
<li>
<p>d</p>
</li>
</ul>
````````````````````````````````
This is a tight list, because the blank lines are in a code block:
```````````````````````````````` example
- a
- ```
b
```
- c
.
<ul>
<li>a</li>
<li>
<pre><code>b
</code></pre>
</li>
<li>c</li>
</ul>
````````````````````````````````
This is a tight list, because the blank line is between two
paragraphs of a sublist. So the sublist is loose while
the outer list is tight:
```````````````````````````````` example
- a
- b
c
- d
.
<ul>
<li>a
<ul>
<li>
<p>b</p>
<p>c</p>
</li>
</ul>
</li>
<li>d</li>
</ul>
````````````````````````````````
This is a tight list, because the blank line is inside the
block quote:
```````````````````````````````` example
* a
> b
>
* c
.
<ul>
<li>a
<blockquote>
<p>b</p>
</blockquote>
</li>
<li>c</li>
</ul>
````````````````````````````````
This list is tight, because the consecutive block elements
are not separated by blank lines:
```````````````````````````````` example
- a
> b
```
c
```
- d
.
<ul>
<li>a
<blockquote>
<p>b</p>
</blockquote>
<pre><code>c
</code></pre>
</li>
<li>d</li>
</ul>
````````````````````````````````
A single-paragraph list is tight:
```````````````````````````````` example
- a
.
<ul>
<li>a</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- a
- b
.
<ul>
<li>a
<ul>
<li>b</li>
</ul>
</li>
</ul>
````````````````````````````````
This list is loose, because of the blank line between the
two block elements in the list item:
```````````````````````````````` example
1. ```
foo
```
bar
.
<ol>
<li>
<pre><code>foo
</code></pre>
<p>bar</p>
</li>
</ol>
````````````````````````````````
Here the outer list is loose, the inner list tight:
```````````````````````````````` example
* foo
* bar
baz
.
<ul>
<li>
<p>foo</p>
<ul>
<li>bar</li>
</ul>
<p>baz</p>
</li>
</ul>
````````````````````````````````
```````````````````````````````` example
- a
- b
- c
- d
- e
- f
.
<ul>
<li>
<p>a</p>
<ul>
<li>b</li>
<li>c</li>
</ul>
</li>
<li>
<p>d</p>
<ul>
<li>e</li>
<li>f</li>
</ul>
</li>
</ul>
````````````````````````````````
# Inlines
Inlines are parsed sequentially from the beginning of the character
stream to the end (left to right, in left-to-right languages).
Thus, for example, in
```````````````````````````````` example
`hi`lo`
.
<p><code>hi</code>lo`</p>
````````````````````````````````
`hi` is parsed as code, leaving the backtick at the end as a literal
backtick.
## Backslash escapes
Any ASCII punctuation character may be backslash-escaped:
```````````````````````````````` example
\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
.
<p>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~</p>
````````````````````````````````
Backslashes before other characters are treated as literal
backslashes:
```````````````````````````````` example
\→\A\a\ \3\φ\«
.
<p>\→\A\a\ \3\φ\«</p>
````````````````````````````````
Escaped characters are treated as regular characters and do
not have their usual Markdown meanings:
```````````````````````````````` example
\*not emphasized*
\<br/> not a tag
\[not a link](/foo)
\`not code`
1\. not a list
\* not a list
\# not a heading
\[foo]: /url "not a reference"
\ö not a character entity
.
<p>*not emphasized*
<br/> not a tag
[not a link](/foo)
`not code`
1. not a list
* not a list
# not a heading
[foo]: /url "not a reference"
&ouml; not a character entity</p>
````````````````````````````````
If a backslash is itself escaped, the following character is not:
```````````````````````````````` example
\\*emphasis*
.
<p>\<em>emphasis</em></p>
````````````````````````````````
A backslash at the end of the line is a [hard line break]:
```````````````````````````````` example
foo\
bar
.
<p>foo<br />
bar</p>
````````````````````````````````
Backslash escapes do not work in code blocks, code spans, autolinks, or
raw HTML:
```````````````````````````````` example
`` \[\` ``
.
<p><code>\[\`</code></p>
````````````````````````````````
```````````````````````````````` example
\[\]
.
<pre><code>\[\]
</code></pre>
````````````````````````````````
```````````````````````````````` example
~~~
\[\]
~~~
.
<pre><code>\[\]
</code></pre>
````````````````````````````````
```````````````````````````````` example
<http://example.com?find=\*>
.
<p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p>
````````````````````````````````
```````````````````````````````` example
<a href="/bar\/)">
.
<a href="/bar\/)">
````````````````````````````````
But they work in all other contexts, including URLs and link titles,
link references, and [info strings] in [fenced code blocks]:
```````````````````````````````` example
[foo](/bar\* "ti\*tle")
.
<p><a href="/bar*" title="ti*tle">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo]
[foo]: /bar\* "ti\*tle"
.
<p><a href="/bar*" title="ti*tle">foo</a></p>
````````````````````````````````
```````````````````````````````` example
``` foo\+bar
foo
```
.
<pre><code class="language-foo+bar">foo
</code></pre>
````````````````````````````````
## Entity and numeric character references
Valid HTML entity references and numeric character references
can be used in place of the corresponding Unicode character,
with the following exceptions:
- Entity and character references are not recognized in code
blocks and code spans.
- Entity and character references cannot stand in place of
special characters that define structural elements in
CommonMark. For example, although `*` can be used
in place of a literal `*` character, `*` cannot replace
`*` in emphasis delimiters, bullet list markers, or thematic
breaks.
Conforming CommonMark parsers need not store information about
whether a particular character was represented in the source
using a Unicode character or an entity reference.
[Entity references](@) consist of `&` + any of the valid
HTML5 entity names + `;`. The
document <https://html.spec.whatwg.org/multipage/entities.json>
is used as an authoritative source for the valid entity
references and their corresponding code points.
```````````````````````````````` example
& © Æ Ď
¾ ℋ ⅆ
∲ ≧̸
.
<p> & © Æ Ď
¾ ℋ ⅆ
∲ ≧̸</p>
````````````````````````````````
[Decimal numeric character
references](@)
consist of `&#` + a string of 1--7 arabic digits + `;`. A
numeric character reference is parsed as the corresponding
Unicode character. Invalid Unicode code points will be replaced by
the REPLACEMENT CHARACTER (`U+FFFD`). For security reasons,
the code point `U+0000` will also be replaced by `U+FFFD`.
```````````````````````````````` example
# Ӓ Ϡ �
.
<p># Ӓ Ϡ �</p>
````````````````````````````````
[Hexadecimal numeric character
references](@) consist of `&#` +
either `X` or `x` + a string of 1-6 hexadecimal digits + `;`.
They too are parsed as the corresponding Unicode character (this
time specified with a hexadecimal numeral instead of decimal).
```````````````````````````````` example
" ആ ಫ
.
<p>" ആ ಫ</p>
````````````````````````````````
Here are some nonentities:
```````````````````````````````` example
  &x; &#; &#x;
�
&#abcdef0;
&ThisIsNotDefined; &hi?;
.
<p>&nbsp &x; &#; &#x;
&#987654321;
&#abcdef0;
&ThisIsNotDefined; &hi?;</p>
````````````````````````````````
Although HTML5 does accept some entity references
without a trailing semicolon (such as `©`), these are not
recognized here, because it makes the grammar too ambiguous:
```````````````````````````````` example
©
.
<p>&copy</p>
````````````````````````````````
Strings that are not on the list of HTML5 named entities are not
recognized as entity references either:
```````````````````````````````` example
&MadeUpEntity;
.
<p>&MadeUpEntity;</p>
````````````````````````````````
Entity and numeric character references are recognized in any
context besides code spans or code blocks, including
URLs, [link titles], and [fenced code block][] [info strings]:
```````````````````````````````` example
<a href="öö.html">
.
<a href="öö.html">
````````````````````````````````
```````````````````````````````` example
[foo](/föö "föö")
.
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo]
[foo]: /föö "föö"
.
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
````````````````````````````````
```````````````````````````````` example
``` föö
foo
```
.
<pre><code class="language-föö">foo
</code></pre>
````````````````````````````````
Entity and numeric character references are treated as literal
text in code spans and code blocks:
```````````````````````````````` example
`föö`
.
<p><code>f&ouml;&ouml;</code></p>
````````````````````````````````
```````````````````````````````` example
föfö
.
<pre><code>f&ouml;f&ouml;
</code></pre>
````````````````````````````````
Entity and numeric character references cannot be used
in place of symbols indicating structure in CommonMark
documents.
```````````````````````````````` example
*foo*
*foo*
.
<p>*foo*
<em>foo</em></p>
````````````````````````````````
```````````````````````````````` example
* foo
* foo
.
<p>* foo</p>
<ul>
<li>foo</li>
</ul>
````````````````````````````````
```````````````````````````````` example
foo bar
.
<p>foo
bar</p>
````````````````````````````````
```````````````````````````````` example
	foo
.
<p>→foo</p>
````````````````````````````````
```````````````````````````````` example
[a](url "tit")
.
<p>[a](url "tit")</p>
````````````````````````````````
## Code spans
A [backtick string](@)
is a string of one or more backtick characters (`` ` ``) that is neither
preceded nor followed by a backtick.
A [code span](@) begins with a backtick string and ends with
a backtick string of equal length. The contents of the code span are
the characters between the two backtick strings, normalized in the
following ways:
- First, [line endings] are converted to [spaces].
- If the resulting string both begins *and* ends with a [space]
character, but does not consist entirely of [space]
characters, a single [space] character is removed from the
front and back. This allows you to include code that begins
or ends with backtick characters, which must be separated by
whitespace from the opening or closing backtick strings.
This is a simple code span:
```````````````````````````````` example
`foo`
.
<p><code>foo</code></p>
````````````````````````````````
Here two backticks are used, because the code contains a backtick.
This example also illustrates stripping of a single leading and
trailing space:
```````````````````````````````` example
`` foo ` bar ``
.
<p><code>foo ` bar</code></p>
````````````````````````````````
This example shows the motivation for stripping leading and trailing
spaces:
```````````````````````````````` example
` `` `
.
<p><code>``</code></p>
````````````````````````````````
Note that only *one* space is stripped:
```````````````````````````````` example
` `` `
.
<p><code> `` </code></p>
````````````````````````````````
The stripping only happens if the space is on both
sides of the string:
```````````````````````````````` example
` a`
.
<p><code> a</code></p>
````````````````````````````````
Only [spaces], and not [unicode whitespace] in general, are
stripped in this way:
```````````````````````````````` example
` b `
.
<p><code> b </code></p>
````````````````````````````````
No stripping occurs if the code span contains only spaces:
```````````````````````````````` example
` `
` `
.
<p><code> </code>
<code> </code></p>
````````````````````````````````
[Line endings] are treated like spaces:
```````````````````````````````` example
``
foo
bar
baz
``
.
<p><code>foo bar baz</code></p>
````````````````````````````````
```````````````````````````````` example
``
foo
``
.
<p><code>foo </code></p>
````````````````````````````````
Interior spaces are not collapsed:
```````````````````````````````` example
`foo bar
baz`
.
<p><code>foo bar baz</code></p>
````````````````````````````````
Note that browsers will typically collapse consecutive spaces
when rendering `<code>` elements, so it is recommended that
the following CSS be used:
code{white-space: pre-wrap;}
Note that backslash escapes do not work in code spans. All backslashes
are treated literally:
```````````````````````````````` example
`foo\`bar`
.
<p><code>foo\</code>bar`</p>
````````````````````````````````
Backslash escapes are never needed, because one can always choose a
string of *n* backtick characters as delimiters, where the code does
not contain any strings of exactly *n* backtick characters.
```````````````````````````````` example
``foo`bar``
.
<p><code>foo`bar</code></p>
````````````````````````````````
```````````````````````````````` example
` foo `` bar `
.
<p><code>foo `` bar</code></p>
````````````````````````````````
Code span backticks have higher precedence than any other inline
constructs except HTML tags and autolinks. Thus, for example, this is
not parsed as emphasized text, since the second `*` is part of a code
span:
```````````````````````````````` example
*foo`*`
.
<p>*foo<code>*</code></p>
````````````````````````````````
And this is not parsed as a link:
```````````````````````````````` example
[not a `link](/foo`)
.
<p>[not a <code>link](/foo</code>)</p>
````````````````````````````````
Code spans, HTML tags, and autolinks have the same precedence.
Thus, this is code:
```````````````````````````````` example
`<a href="`">`
.
<p><code><a href="</code>">`</p>
````````````````````````````````
But this is an HTML tag:
```````````````````````````````` example
<a href="`">`
.
<p><a href="`">`</p>
````````````````````````````````
And this is code:
```````````````````````````````` example
`<http://foo.bar.`baz>`
.
<p><code><http://foo.bar.</code>baz>`</p>
````````````````````````````````
But this is an autolink:
```````````````````````````````` example
<http://foo.bar.`baz>`
.
<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p>
````````````````````````````````
When a backtick string is not closed by a matching backtick string,
we just have literal backticks:
```````````````````````````````` example
```foo``
.
<p>```foo``</p>
````````````````````````````````
```````````````````````````````` example
`foo
.
<p>`foo</p>
````````````````````````````````
The following case also illustrates the need for opening and
closing backtick strings to be equal in length:
```````````````````````````````` example
`foo``bar``
.
<p>`foo<code>bar</code></p>
````````````````````````````````
## Emphasis and strong emphasis
John Gruber's original [Markdown syntax
description](http://daringfireball.net/projects/markdown/syntax#em) says:
> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML
> `<em>` tag; double `*`'s or `_`'s will be wrapped with an HTML `<strong>`
> tag.
This is enough for most users, but these rules leave much undecided,
especially when it comes to nested emphasis. The original
`Markdown.pl` test suite makes it clear that triple `***` and
`___` delimiters can be used for strong emphasis, and most
implementations have also allowed the following patterns:
``` markdown
***strong emph***
***strong** in emph*
***emph* in strong**
**in strong *emph***
*in emph **strong***
```
The following patterns are less widely supported, but the intent
is clear and they are useful (especially in contexts like bibliography
entries):
``` markdown
*emph *with emph* in it*
**strong **with strong** in it**
```
Many implementations have also restricted intraword emphasis to
the `*` forms, to avoid unwanted emphasis in words containing
internal underscores. (It is best practice to put these in code
spans, but users often do not.)
``` markdown
internal emphasis: foo*bar*baz
no emphasis: foo_bar_baz
```
The rules given below capture all of these patterns, while allowing
for efficient parsing strategies that do not backtrack.
First, some definitions. A [delimiter run](@) is either
a sequence of one or more `*` characters that is not preceded or
followed by a non-backslash-escaped `*` character, or a sequence
of one or more `_` characters that is not preceded or followed by
a non-backslash-escaped `_` character.
A [left-flanking delimiter run](@) is
a [delimiter run] that is (1) not followed by [Unicode whitespace],
and either (2a) not followed by a [punctuation character], or
(2b) followed by a [punctuation character] and
preceded by [Unicode whitespace] or a [punctuation character].
For purposes of this definition, the beginning and the end of
the line count as Unicode whitespace.
A [right-flanking delimiter run](@) is
a [delimiter run] that is (1) not preceded by [Unicode whitespace],
and either (2a) not preceded by a [punctuation character], or
(2b) preceded by a [punctuation character] and
followed by [Unicode whitespace] or a [punctuation character].
For purposes of this definition, the beginning and the end of
the line count as Unicode whitespace.
Here are some examples of delimiter runs.
- left-flanking but not right-flanking:
```
***abc
_abc
**"abc"
_"abc"
```
- right-flanking but not left-flanking:
```
abc***
abc_
"abc"**
"abc"_
```
- Both left and right-flanking:
```
abc***def
"abc"_"def"
```
- Neither left nor right-flanking:
```
abc *** def
a _ b
```
(The idea of distinguishing left-flanking and right-flanking
delimiter runs based on the character before and the character
after comes from Roopesh Chander's
[vfmd](http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags).
vfmd uses the terminology "emphasis indicator string" instead of "delimiter
run," and its rules for distinguishing left- and right-flanking runs
are a bit more complex than the ones given here.)
The following rules define emphasis and strong emphasis:
1. A single `*` character [can open emphasis](@)
iff (if and only if) it is part of a [left-flanking delimiter run].
2. A single `_` character [can open emphasis] iff
it is part of a [left-flanking delimiter run]
and either (a) not part of a [right-flanking delimiter run]
or (b) part of a [right-flanking delimiter run]
preceded by punctuation.
3. A single `*` character [can close emphasis](@)
iff it is part of a [right-flanking delimiter run].
4. A single `_` character [can close emphasis] iff
it is part of a [right-flanking delimiter run]
and either (a) not part of a [left-flanking delimiter run]
or (b) part of a [left-flanking delimiter run]
followed by punctuation.
5. A double `**` [can open strong emphasis](@)
iff it is part of a [left-flanking delimiter run].
6. A double `__` [can open strong emphasis] iff
it is part of a [left-flanking delimiter run]
and either (a) not part of a [right-flanking delimiter run]
or (b) part of a [right-flanking delimiter run]
preceded by punctuation.
7. A double `**` [can close strong emphasis](@)
iff it is part of a [right-flanking delimiter run].
8. A double `__` [can close strong emphasis] iff
it is part of a [right-flanking delimiter run]
and either (a) not part of a [left-flanking delimiter run]
or (b) part of a [left-flanking delimiter run]
followed by punctuation.
9. Emphasis begins with a delimiter that [can open emphasis] and ends
with a delimiter that [can close emphasis], and that uses the same
character (`_` or `*`) as the opening delimiter. The
opening and closing delimiters must belong to separate
[delimiter runs]. If one of the delimiters can both
open and close emphasis, then the sum of the lengths of the
delimiter runs containing the opening and closing delimiters
must not be a multiple of 3 unless both lengths are
multiples of 3.
10. Strong emphasis begins with a delimiter that
[can open strong emphasis] and ends with a delimiter that
[can close strong emphasis], and that uses the same character
(`_` or `*`) as the opening delimiter. The
opening and closing delimiters must belong to separate
[delimiter runs]. If one of the delimiters can both open
and close strong emphasis, then the sum of the lengths of
the delimiter runs containing the opening and closing
delimiters must not be a multiple of 3 unless both lengths
are multiples of 3.
11. A literal `*` character cannot occur at the beginning or end of
`*`-delimited emphasis or `**`-delimited strong emphasis, unless it
is backslash-escaped.
12. A literal `_` character cannot occur at the beginning or end of
`_`-delimited emphasis or `__`-delimited strong emphasis, unless it
is backslash-escaped.
Where rules 1--12 above are compatible with multiple parsings,
the following principles resolve ambiguity:
13. The number of nestings should be minimized. Thus, for example,
an interpretation `<strong>...</strong>` is always preferred to
`<em><em>...</em></em>`.
14. An interpretation `<em><strong>...</strong></em>` is always
preferred to `<strong><em>...</em></strong>`.
15. When two potential emphasis or strong emphasis spans overlap,
so that the second begins before the first ends and ends after
the first ends, the first takes precedence. Thus, for example,
`*foo _bar* baz_` is parsed as `<em>foo _bar</em> baz_` rather
than `*foo <em>bar* baz</em>`.
16. When there are two potential emphasis or strong emphasis spans
with the same closing delimiter, the shorter one (the one that
opens later) takes precedence. Thus, for example,
`**foo **bar baz**` is parsed as `**foo <strong>bar baz</strong>`
rather than `<strong>foo **bar baz</strong>`.
17. Inline code spans, links, images, and HTML tags group more tightly
than emphasis. So, when there is a choice between an interpretation
that contains one of these elements and one that does not, the
former always wins. Thus, for example, `*[foo*](bar)` is
parsed as `*<a href="bar">foo*</a>` rather than as
`<em>[foo</em>](bar)`.
These rules can be illustrated through a series of examples.
Rule 1:
```````````````````````````````` example
*foo bar*
.
<p><em>foo bar</em></p>
````````````````````````````````
This is not emphasis, because the opening `*` is followed by
whitespace, and hence not part of a [left-flanking delimiter run]:
```````````````````````````````` example
a * foo bar*
.
<p>a * foo bar*</p>
````````````````````````````````
This is not emphasis, because the opening `*` is preceded
by an alphanumeric and followed by punctuation, and hence
not part of a [left-flanking delimiter run]:
```````````````````````````````` example
a*"foo"*
.
<p>a*"foo"*</p>
````````````````````````````````
Unicode nonbreaking spaces count as whitespace, too:
```````````````````````````````` example
* a *
.
<p>* a *</p>
````````````````````````````````
Intraword emphasis with `*` is permitted:
```````````````````````````````` example
foo*bar*
.
<p>foo<em>bar</em></p>
````````````````````````````````
```````````````````````````````` example
5*6*78
.
<p>5<em>6</em>78</p>
````````````````````````````````
Rule 2:
```````````````````````````````` example
_foo bar_
.
<p><em>foo bar</em></p>
````````````````````````````````
This is not emphasis, because the opening `_` is followed by
whitespace:
```````````````````````````````` example
_ foo bar_
.
<p>_ foo bar_</p>
````````````````````````````````
This is not emphasis, because the opening `_` is preceded
by an alphanumeric and followed by punctuation:
```````````````````````````````` example
a_"foo"_
.
<p>a_"foo"_</p>
````````````````````````````````
Emphasis with `_` is not allowed inside words:
```````````````````````````````` example
foo_bar_
.
<p>foo_bar_</p>
````````````````````````````````
```````````````````````````````` example
5_6_78
.
<p>5_6_78</p>
````````````````````````````````
```````````````````````````````` example
пристаням_стремятся_
.
<p>пристаням_стремятся_</p>
````````````````````````````````
Here `_` does not generate emphasis, because the first delimiter run
is right-flanking and the second left-flanking:
```````````````````````````````` example
aa_"bb"_cc
.
<p>aa_"bb"_cc</p>
````````````````````````````````
This is emphasis, even though the opening delimiter is
both left- and right-flanking, because it is preceded by
punctuation:
```````````````````````````````` example
foo-_(bar)_
.
<p>foo-<em>(bar)</em></p>
````````````````````````````````
Rule 3:
This is not emphasis, because the closing delimiter does
not match the opening delimiter:
```````````````````````````````` example
_foo*
.
<p>_foo*</p>
````````````````````````````````
This is not emphasis, because the closing `*` is preceded by
whitespace:
```````````````````````````````` example
*foo bar *
.
<p>*foo bar *</p>
````````````````````````````````
A newline also counts as whitespace:
```````````````````````````````` example
*foo bar
*
.
<p>*foo bar
*</p>
````````````````````````````````
This is not emphasis, because the second `*` is
preceded by punctuation and followed by an alphanumeric
(hence it is not part of a [right-flanking delimiter run]:
```````````````````````````````` example
*(*foo)
.
<p>*(*foo)</p>
````````````````````````````````
The point of this restriction is more easily appreciated
with this example:
```````````````````````````````` example
*(*foo*)*
.
<p><em>(<em>foo</em>)</em></p>
````````````````````````````````
Intraword emphasis with `*` is allowed:
```````````````````````````````` example
*foo*bar
.
<p><em>foo</em>bar</p>
````````````````````````````````
Rule 4:
This is not emphasis, because the closing `_` is preceded by
whitespace:
```````````````````````````````` example
_foo bar _
.
<p>_foo bar _</p>
````````````````````````````````
This is not emphasis, because the second `_` is
preceded by punctuation and followed by an alphanumeric:
```````````````````````````````` example
_(_foo)
.
<p>_(_foo)</p>
````````````````````````````````
This is emphasis within emphasis:
```````````````````````````````` example
_(_foo_)_
.
<p><em>(<em>foo</em>)</em></p>
````````````````````````````````
Intraword emphasis is disallowed for `_`:
```````````````````````````````` example
_foo_bar
.
<p>_foo_bar</p>
````````````````````````````````
```````````````````````````````` example
_пристаням_стремятся
.
<p>_пристаням_стремятся</p>
````````````````````````````````
```````````````````````````````` example
_foo_bar_baz_
.
<p><em>foo_bar_baz</em></p>
````````````````````````````````
This is emphasis, even though the closing delimiter is
both left- and right-flanking, because it is followed by
punctuation:
```````````````````````````````` example
_(bar)_.
.
<p><em>(bar)</em>.</p>
````````````````````````````````
Rule 5:
```````````````````````````````` example
**foo bar**
.
<p><strong>foo bar</strong></p>
````````````````````````````````
This is not strong emphasis, because the opening delimiter is
followed by whitespace:
```````````````````````````````` example
** foo bar**
.
<p>** foo bar**</p>
````````````````````````````````
This is not strong emphasis, because the opening `**` is preceded
by an alphanumeric and followed by punctuation, and hence
not part of a [left-flanking delimiter run]:
```````````````````````````````` example
a**"foo"**
.
<p>a**"foo"**</p>
````````````````````````````````
Intraword strong emphasis with `**` is permitted:
```````````````````````````````` example
foo**bar**
.
<p>foo<strong>bar</strong></p>
````````````````````````````````
Rule 6:
```````````````````````````````` example
__foo bar__
.
<p><strong>foo bar</strong></p>
````````````````````````````````
This is not strong emphasis, because the opening delimiter is
followed by whitespace:
```````````````````````````````` example
__ foo bar__
.
<p>__ foo bar__</p>
````````````````````````````````
A newline counts as whitespace:
```````````````````````````````` example
__
foo bar__
.
<p>__
foo bar__</p>
````````````````````````````````
This is not strong emphasis, because the opening `__` is preceded
by an alphanumeric and followed by punctuation:
```````````````````````````````` example
a__"foo"__
.
<p>a__"foo"__</p>
````````````````````````````````
Intraword strong emphasis is forbidden with `__`:
```````````````````````````````` example
foo__bar__
.
<p>foo__bar__</p>
````````````````````````````````
```````````````````````````````` example
5__6__78
.
<p>5__6__78</p>
````````````````````````````````
```````````````````````````````` example
пристаням__стремятся__
.
<p>пристаням__стремятся__</p>
````````````````````````````````
```````````````````````````````` example
__foo, __bar__, baz__
.
<p><strong>foo, <strong>bar</strong>, baz</strong></p>
````````````````````````````````
This is strong emphasis, even though the opening delimiter is
both left- and right-flanking, because it is preceded by
punctuation:
```````````````````````````````` example
foo-__(bar)__
.
<p>foo-<strong>(bar)</strong></p>
````````````````````````````````
Rule 7:
This is not strong emphasis, because the closing delimiter is preceded
by whitespace:
```````````````````````````````` example
**foo bar **
.
<p>**foo bar **</p>
````````````````````````````````
(Nor can it be interpreted as an emphasized `*foo bar *`, because of
Rule 11.)
This is not strong emphasis, because the second `**` is
preceded by punctuation and followed by an alphanumeric:
```````````````````````````````` example
**(**foo)
.
<p>**(**foo)</p>
````````````````````````````````
The point of this restriction is more easily appreciated
with these examples:
```````````````````````````````` example
*(**foo**)*
.
<p><em>(<strong>foo</strong>)</em></p>
````````````````````````````````
```````````````````````````````` example
**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
*Asclepias physocarpa*)**
.
<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn.
<em>Asclepias physocarpa</em>)</strong></p>
````````````````````````````````
```````````````````````````````` example
**foo "*bar*" foo**
.
<p><strong>foo "<em>bar</em>" foo</strong></p>
````````````````````````````````
Intraword emphasis:
```````````````````````````````` example
**foo**bar
.
<p><strong>foo</strong>bar</p>
````````````````````````````````
Rule 8:
This is not strong emphasis, because the closing delimiter is
preceded by whitespace:
```````````````````````````````` example
__foo bar __
.
<p>__foo bar __</p>
````````````````````````````````
This is not strong emphasis, because the second `__` is
preceded by punctuation and followed by an alphanumeric:
```````````````````````````````` example
__(__foo)
.
<p>__(__foo)</p>
````````````````````````````````
The point of this restriction is more easily appreciated
with this example:
```````````````````````````````` example
_(__foo__)_
.
<p><em>(<strong>foo</strong>)</em></p>
````````````````````````````````
Intraword strong emphasis is forbidden with `__`:
```````````````````````````````` example
__foo__bar
.
<p>__foo__bar</p>
````````````````````````````````
```````````````````````````````` example
__пристаням__стремятся
.
<p>__пристаням__стремятся</p>
````````````````````````````````
```````````````````````````````` example
__foo__bar__baz__
.
<p><strong>foo__bar__baz</strong></p>
````````````````````````````````
This is strong emphasis, even though the closing delimiter is
both left- and right-flanking, because it is followed by
punctuation:
```````````````````````````````` example
__(bar)__.
.
<p><strong>(bar)</strong>.</p>
````````````````````````````````
Rule 9:
Any nonempty sequence of inline elements can be the contents of an
emphasized span.
```````````````````````````````` example
*foo [bar](/url)*
.
<p><em>foo <a href="/url">bar</a></em></p>
````````````````````````````````
```````````````````````````````` example
*foo
bar*
.
<p><em>foo
bar</em></p>
````````````````````````````````
In particular, emphasis and strong emphasis can be nested
inside emphasis:
```````````````````````````````` example
_foo __bar__ baz_
.
<p><em>foo <strong>bar</strong> baz</em></p>
````````````````````````````````
```````````````````````````````` example
_foo _bar_ baz_
.
<p><em>foo <em>bar</em> baz</em></p>
````````````````````````````````
```````````````````````````````` example
__foo_ bar_
.
<p><em><em>foo</em> bar</em></p>
````````````````````````````````
```````````````````````````````` example
*foo *bar**
.
<p><em>foo <em>bar</em></em></p>
````````````````````````````````
```````````````````````````````` example
*foo **bar** baz*
.
<p><em>foo <strong>bar</strong> baz</em></p>
````````````````````````````````
```````````````````````````````` example
*foo**bar**baz*
.
<p><em>foo<strong>bar</strong>baz</em></p>
````````````````````````````````
Note that in the preceding case, the interpretation
``` markdown
<p><em>foo</em><em>bar<em></em>baz</em></p>
```
is precluded by the condition that a delimiter that
can both open and close (like the `*` after `foo`)
cannot form emphasis if the sum of the lengths of
the delimiter runs containing the opening and
closing delimiters is a multiple of 3 unless
both lengths are multiples of 3.
For the same reason, we don't get two consecutive
emphasis sections in this example:
```````````````````````````````` example
*foo**bar*
.
<p><em>foo**bar</em></p>
````````````````````````````````
The same condition ensures that the following
cases are all strong emphasis nested inside
emphasis, even when the interior spaces are
omitted:
```````````````````````````````` example
***foo** bar*
.
<p><em><strong>foo</strong> bar</em></p>
````````````````````````````````
```````````````````````````````` example
*foo **bar***
.
<p><em>foo <strong>bar</strong></em></p>
````````````````````````````````
```````````````````````````````` example
*foo**bar***
.
<p><em>foo<strong>bar</strong></em></p>
````````````````````````````````
When the lengths of the interior closing and opening
delimiter runs are *both* multiples of 3, though,
they can match to create emphasis:
```````````````````````````````` example
foo***bar***baz
.
<p>foo<em><strong>bar</strong></em>baz</p>
````````````````````````````````
```````````````````````````````` example
foo******bar*********baz
.
<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p>
````````````````````````````````
Indefinite levels of nesting are possible:
```````````````````````````````` example
*foo **bar *baz* bim** bop*
.
<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p>
````````````````````````````````
```````````````````````````````` example
*foo [*bar*](/url)*
.
<p><em>foo <a href="/url"><em>bar</em></a></em></p>
````````````````````````````````
There can be no empty emphasis or strong emphasis:
```````````````````````````````` example
** is not an empty emphasis
.
<p>** is not an empty emphasis</p>
````````````````````````````````
```````````````````````````````` example
**** is not an empty strong emphasis
.
<p>**** is not an empty strong emphasis</p>
````````````````````````````````
Rule 10:
Any nonempty sequence of inline elements can be the contents of an
strongly emphasized span.
```````````````````````````````` example
**foo [bar](/url)**
.
<p><strong>foo <a href="/url">bar</a></strong></p>
````````````````````````````````
```````````````````````````````` example
**foo
bar**
.
<p><strong>foo
bar</strong></p>
````````````````````````````````
In particular, emphasis and strong emphasis can be nested
inside strong emphasis:
```````````````````````````````` example
__foo _bar_ baz__
.
<p><strong>foo <em>bar</em> baz</strong></p>
````````````````````````````````
```````````````````````````````` example
__foo __bar__ baz__
.
<p><strong>foo <strong>bar</strong> baz</strong></p>
````````````````````````````````
```````````````````````````````` example
____foo__ bar__
.
<p><strong><strong>foo</strong> bar</strong></p>
````````````````````````````````
```````````````````````````````` example
**foo **bar****
.
<p><strong>foo <strong>bar</strong></strong></p>
````````````````````````````````
```````````````````````````````` example
**foo *bar* baz**
.
<p><strong>foo <em>bar</em> baz</strong></p>
````````````````````````````````
```````````````````````````````` example
**foo*bar*baz**
.
<p><strong>foo<em>bar</em>baz</strong></p>
````````````````````````````````
```````````````````````````````` example
***foo* bar**
.
<p><strong><em>foo</em> bar</strong></p>
````````````````````````````````
```````````````````````````````` example
**foo *bar***
.
<p><strong>foo <em>bar</em></strong></p>
````````````````````````````````
Indefinite levels of nesting are possible:
```````````````````````````````` example
**foo *bar **baz**
bim* bop**
.
<p><strong>foo <em>bar <strong>baz</strong>
bim</em> bop</strong></p>
````````````````````````````````
```````````````````````````````` example
**foo [*bar*](/url)**
.
<p><strong>foo <a href="/url"><em>bar</em></a></strong></p>
````````````````````````````````
There can be no empty emphasis or strong emphasis:
```````````````````````````````` example
__ is not an empty emphasis
.
<p>__ is not an empty emphasis</p>
````````````````````````````````
```````````````````````````````` example
____ is not an empty strong emphasis
.
<p>____ is not an empty strong emphasis</p>
````````````````````````````````
Rule 11:
```````````````````````````````` example
foo ***
.
<p>foo ***</p>
````````````````````````````````
```````````````````````````````` example
foo *\**
.
<p>foo <em>*</em></p>
````````````````````````````````
```````````````````````````````` example
foo *_*
.
<p>foo <em>_</em></p>
````````````````````````````````
```````````````````````````````` example
foo *****
.
<p>foo *****</p>
````````````````````````````````
```````````````````````````````` example
foo **\***
.
<p>foo <strong>*</strong></p>
````````````````````````````````
```````````````````````````````` example
foo **_**
.
<p>foo <strong>_</strong></p>
````````````````````````````````
Note that when delimiters do not match evenly, Rule 11 determines
that the excess literal `*` characters will appear outside of the
emphasis, rather than inside it:
```````````````````````````````` example
**foo*
.
<p>*<em>foo</em></p>
````````````````````````````````
```````````````````````````````` example
*foo**
.
<p><em>foo</em>*</p>
````````````````````````````````
```````````````````````````````` example
***foo**
.
<p>*<strong>foo</strong></p>
````````````````````````````````
```````````````````````````````` example
****foo*
.
<p>***<em>foo</em></p>
````````````````````````````````
```````````````````````````````` example
**foo***
.
<p><strong>foo</strong>*</p>
````````````````````````````````
```````````````````````````````` example
*foo****
.
<p><em>foo</em>***</p>
````````````````````````````````
Rule 12:
```````````````````````````````` example
foo ___
.
<p>foo ___</p>
````````````````````````````````
```````````````````````````````` example
foo _\__
.
<p>foo <em>_</em></p>
````````````````````````````````
```````````````````````````````` example
foo _*_
.
<p>foo <em>*</em></p>
````````````````````````````````
```````````````````````````````` example
foo _____
.
<p>foo _____</p>
````````````````````````````````
```````````````````````````````` example
foo __\___
.
<p>foo <strong>_</strong></p>
````````````````````````````````
```````````````````````````````` example
foo __*__
.
<p>foo <strong>*</strong></p>
````````````````````````````````
```````````````````````````````` example
__foo_
.
<p>_<em>foo</em></p>
````````````````````````````````
Note that when delimiters do not match evenly, Rule 12 determines
that the excess literal `_` characters will appear outside of the
emphasis, rather than inside it:
```````````````````````````````` example
_foo__
.
<p><em>foo</em>_</p>
````````````````````````````````
```````````````````````````````` example
___foo__
.
<p>_<strong>foo</strong></p>
````````````````````````````````
```````````````````````````````` example
____foo_
.
<p>___<em>foo</em></p>
````````````````````````````````
```````````````````````````````` example
__foo___
.
<p><strong>foo</strong>_</p>
````````````````````````````````
```````````````````````````````` example
_foo____
.
<p><em>foo</em>___</p>
````````````````````````````````
Rule 13 implies that if you want emphasis nested directly inside
emphasis, you must use different delimiters:
```````````````````````````````` example
**foo**
.
<p><strong>foo</strong></p>
````````````````````````````````
```````````````````````````````` example
*_foo_*
.
<p><em><em>foo</em></em></p>
````````````````````````````````
```````````````````````````````` example
__foo__
.
<p><strong>foo</strong></p>
````````````````````````````````
```````````````````````````````` example
_*foo*_
.
<p><em><em>foo</em></em></p>
````````````````````````````````
However, strong emphasis within strong emphasis is possible without
switching delimiters:
```````````````````````````````` example
****foo****
.
<p><strong><strong>foo</strong></strong></p>
````````````````````````````````
```````````````````````````````` example
____foo____
.
<p><strong><strong>foo</strong></strong></p>
````````````````````````````````
Rule 13 can be applied to arbitrarily long sequences of
delimiters:
```````````````````````````````` example
******foo******
.
<p><strong><strong><strong>foo</strong></strong></strong></p>
````````````````````````````````
Rule 14:
```````````````````````````````` example
***foo***
.
<p><em><strong>foo</strong></em></p>
````````````````````````````````
```````````````````````````````` example
_____foo_____
.
<p><em><strong><strong>foo</strong></strong></em></p>
````````````````````````````````
Rule 15:
```````````````````````````````` example
*foo _bar* baz_
.
<p><em>foo _bar</em> baz_</p>
````````````````````````````````
```````````````````````````````` example
*foo __bar *baz bim__ bam*
.
<p><em>foo <strong>bar *baz bim</strong> bam</em></p>
````````````````````````````````
Rule 16:
```````````````````````````````` example
**foo **bar baz**
.
<p>**foo <strong>bar baz</strong></p>
````````````````````````````````
```````````````````````````````` example
*foo *bar baz*
.
<p>*foo <em>bar baz</em></p>
````````````````````````````````
Rule 17:
```````````````````````````````` example
*[bar*](/url)
.
<p>*<a href="/url">bar*</a></p>
````````````````````````````````
```````````````````````````````` example
_foo [bar_](/url)
.
<p>_foo <a href="/url">bar_</a></p>
````````````````````````````````
```````````````````````````````` example
*<img src="foo" title="*"/>
.
<p>*<img src="foo" title="*"/></p>
````````````````````````````````
```````````````````````````````` example
**<a href="**">
.
<p>**<a href="**"></p>
````````````````````````````````
```````````````````````````````` example
__<a href="__">
.
<p>__<a href="__"></p>
````````````````````````````````
```````````````````````````````` example
*a `*`*
.
<p><em>a <code>*</code></em></p>
````````````````````````````````
```````````````````````````````` example
_a `_`_
.
<p><em>a <code>_</code></em></p>
````````````````````````````````
```````````````````````````````` example
**a<http://foo.bar/?q=**>
.
<p>**a<a href="http://foo.bar/?q=**">http://foo.bar/?q=**</a></p>
````````````````````````````````
```````````````````````````````` example
__a<http://foo.bar/?q=__>
.
<p>__a<a href="http://foo.bar/?q=__">http://foo.bar/?q=__</a></p>
````````````````````````````````
<div class="extension">
## Strikethrough (extension)
GFM enables the `strikethrough` extension, where an additional emphasis type is
available.
Strikethrough text is any text wrapped in two tildes (`~`).
```````````````````````````````` example strikethrough
~~Hi~~ Hello, world!
.
<p><del>Hi</del> Hello, world!</p>
````````````````````````````````
As with regular emphasis delimiters, a new paragraph will cause strikethrough
parsing to cease:
```````````````````````````````` example strikethrough
This ~~has a
new paragraph~~.
.
<p>This ~~has a</p>
<p>new paragraph~~.</p>
````````````````````````````````
</div>
## Links
A link contains [link text] (the visible text), a [link destination]
(the URI that is the link destination), and optionally a [link title].
There are two basic kinds of links in Markdown. In [inline links] the
destination and title are given immediately after the link text. In
[reference links] the destination and title are defined elsewhere in
the document.
A [link text](@) consists of a sequence of zero or more
inline elements enclosed by square brackets (`[` and `]`). The
following rules apply:
- Links may not contain other links, at any level of nesting. If
multiple otherwise valid link definitions appear nested inside each
other, the inner-most definition is used.
- Brackets are allowed in the [link text] only if (a) they
are backslash-escaped or (b) they appear as a matched pair of brackets,
with an open bracket `[`, a sequence of zero or more inlines, and
a close bracket `]`.
- Backtick [code spans], [autolinks], and raw [HTML tags] bind more tightly
than the brackets in link text. Thus, for example,
`` [foo`]` `` could not be a link text, since the second `]`
is part of a code span.
- The brackets in link text bind more tightly than markers for
[emphasis and strong emphasis]. Thus, for example, `*[foo*](url)` is a link.
A [link destination](@) consists of either
- a sequence of zero or more characters between an opening `<` and a
closing `>` that contains no line breaks or unescaped
`<` or `>` characters, or
- a nonempty sequence of characters that does not start with
`<`, does not include ASCII space or control characters, and
includes parentheses only if (a) they are backslash-escaped or
(b) they are part of a balanced pair of unescaped parentheses.
(Implementations may impose limits on parentheses nesting to
avoid performance issues, but at least three levels of nesting
should be supported.)
A [link title](@) consists of either
- a sequence of zero or more characters between straight double-quote
characters (`"`), including a `"` character only if it is
backslash-escaped, or
- a sequence of zero or more characters between straight single-quote
characters (`'`), including a `'` character only if it is
backslash-escaped, or
- a sequence of zero or more characters between matching parentheses
(`(...)`), including a `(` or `)` character only if it is
backslash-escaped.
Although [link titles] may span multiple lines, they may not contain
a [blank line].
An [inline link](@) consists of a [link text] followed immediately
by a left parenthesis `(`, optional [whitespace], an optional
[link destination], an optional [link title] separated from the link
destination by [whitespace], optional [whitespace], and a right
parenthesis `)`. The link's text consists of the inlines contained
in the [link text] (excluding the enclosing square brackets).
The link's URI consists of the link destination, excluding enclosing
`<...>` if present, with backslash-escapes in effect as described
above. The link's title consists of the link title, excluding its
enclosing delimiters, with backslash-escapes in effect as described
above.
Here is a simple inline link:
```````````````````````````````` example
[link](/uri "title")
.
<p><a href="/uri" title="title">link</a></p>
````````````````````````````````
The title may be omitted:
```````````````````````````````` example
[link](/uri)
.
<p><a href="/uri">link</a></p>
````````````````````````````````
Both the title and the destination may be omitted:
```````````````````````````````` example
[link]()
.
<p><a href="">link</a></p>
````````````````````````````````
```````````````````````````````` example
[link](<>)
.
<p><a href="">link</a></p>
````````````````````````````````
The destination can only contain spaces if it is
enclosed in pointy brackets:
```````````````````````````````` example
[link](/my uri)
.
<p>[link](/my uri)</p>
````````````````````````````````
```````````````````````````````` example
[link](</my uri>)
.
<p><a href="/my%20uri">link</a></p>
````````````````````````````````
The destination cannot contain line breaks,
even if enclosed in pointy brackets:
```````````````````````````````` example
[link](foo
bar)
.
<p>[link](foo
bar)</p>
````````````````````````````````
```````````````````````````````` example
[link](<foo
bar>)
.
<p>[link](<foo
bar>)</p>
````````````````````````````````
The destination can contain `)` if it is enclosed
in pointy brackets:
```````````````````````````````` example
[a](<b)c>)
.
<p><a href="b)c">a</a></p>
````````````````````````````````
Pointy brackets that enclose links must be unescaped:
```````````````````````````````` example
[link](<foo\>)
.
<p>[link](<foo>)</p>
````````````````````````````````
These are not links, because the opening pointy bracket
is not matched properly:
```````````````````````````````` example
[a](<b)c
[a](<b)c>
[a](<b>c)
.
<p>[a](<b)c
[a](<b)c>
[a](<b>c)</p>
````````````````````````````````
Parentheses inside the link destination may be escaped:
```````````````````````````````` example
[link](\(foo\))
.
<p><a href="(foo)">link</a></p>
````````````````````````````````
Any number of parentheses are allowed without escaping, as long as they are
balanced:
```````````````````````````````` example
[link](foo(and(bar)))
.
<p><a href="foo(and(bar))">link</a></p>
````````````````````````````````
However, if you have unbalanced parentheses, you need to escape or use the
`<...>` form:
```````````````````````````````` example
[link](foo\(and\(bar\))
.
<p><a href="foo(and(bar)">link</a></p>
````````````````````````````````
```````````````````````````````` example
[link](<foo(and(bar)>)
.
<p><a href="foo(and(bar)">link</a></p>
````````````````````````````````
Parentheses and other symbols can also be escaped, as usual
in Markdown:
```````````````````````````````` example
[link](foo\)\:)
.
<p><a href="foo):">link</a></p>
````````````````````````````````
A link can contain fragment identifiers and queries:
```````````````````````````````` example
[link](#fragment)
[link](http://example.com#fragment)
[link](http://example.com?foo=3#frag)
.
<p><a href="#fragment">link</a></p>
<p><a href="http://example.com#fragment">link</a></p>
<p><a href="http://example.com?foo=3#frag">link</a></p>
````````````````````````````````
Note that a backslash before a non-escapable character is
just a backslash:
```````````````````````````````` example
[link](foo\bar)
.
<p><a href="foo%5Cbar">link</a></p>
````````````````````````````````
URL-escaping should be left alone inside the destination, as all
URL-escaped characters are also valid URL characters. Entity and
numerical character references in the destination will be parsed
into the corresponding Unicode code points, as usual. These may
be optionally URL-escaped when written as HTML, but this spec
does not enforce any particular policy for rendering URLs in
HTML or other formats. Renderers may make different decisions
about how to escape or normalize URLs in the output.
```````````````````````````````` example
[link](foo%20bä)
.
<p><a href="foo%20b%C3%A4">link</a></p>
````````````````````````````````
Note that, because titles can often be parsed as destinations,
if you try to omit the destination and keep the title, you'll
get unexpected results:
```````````````````````````````` example
[link]("title")
.
<p><a href="%22title%22">link</a></p>
````````````````````````````````
Titles may be in single quotes, double quotes, or parentheses:
```````````````````````````````` example
[link](/url "title")
[link](/url 'title')
[link](/url (title))
.
<p><a href="/url" title="title">link</a>
<a href="/url" title="title">link</a>
<a href="/url" title="title">link</a></p>
````````````````````````````````
Backslash escapes and entity and numeric character references
may be used in titles:
```````````````````````````````` example
[link](/url "title \""")
.
<p><a href="/url" title="title """>link</a></p>
````````````````````````````````
Titles must be separated from the link using a [whitespace].
Other [Unicode whitespace] like non-breaking space doesn't work.
```````````````````````````````` example
[link](/url "title")
.
<p><a href="/url%C2%A0%22title%22">link</a></p>
````````````````````````````````
Nested balanced quotes are not allowed without escaping:
```````````````````````````````` example
[link](/url "title "and" title")
.
<p>[link](/url "title "and" title")</p>
````````````````````````````````
But it is easy to work around this by using a different quote type:
```````````````````````````````` example
[link](/url 'title "and" title')
.
<p><a href="/url" title="title "and" title">link</a></p>
````````````````````````````````
(Note: `Markdown.pl` did allow double quotes inside a double-quoted
title, and its test suite included a test demonstrating this.
But it is hard to see a good rationale for the extra complexity this
brings, since there are already many ways---backslash escaping,
entity and numeric character references, or using a different
quote type for the enclosing title---to write titles containing
double quotes. `Markdown.pl`'s handling of titles has a number
of other strange features. For example, it allows single-quoted
titles in inline links, but not reference links. And, in
reference links but not inline links, it allows a title to begin
with `"` and end with `)`. `Markdown.pl` 1.0.1 even allows
titles with no closing quotation mark, though 1.0.2b8 does not.
It seems preferable to adopt a simple, rational rule that works
the same way in inline links and link reference definitions.)
[Whitespace] is allowed around the destination and title:
```````````````````````````````` example
[link]( /uri
"title" )
.
<p><a href="/uri" title="title">link</a></p>
````````````````````````````````
But it is not allowed between the link text and the
following parenthesis:
```````````````````````````````` example
[link] (/uri)
.
<p>[link] (/uri)</p>
````````````````````````````````
The link text may contain balanced brackets, but not unbalanced ones,
unless they are escaped:
```````````````````````````````` example
[link [foo [bar]]](/uri)
.
<p><a href="/uri">link [foo [bar]]</a></p>
````````````````````````````````
```````````````````````````````` example
[link] bar](/uri)
.
<p>[link] bar](/uri)</p>
````````````````````````````````
```````````````````````````````` example
[link [bar](/uri)
.
<p>[link <a href="/uri">bar</a></p>
````````````````````````````````
```````````````````````````````` example
[link \[bar](/uri)
.
<p><a href="/uri">link [bar</a></p>
````````````````````````````````
The link text may contain inline content:
```````````````````````````````` example
[link *foo **bar** `#`*](/uri)
.
<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
````````````````````````````````
```````````````````````````````` example
[](/uri)
.
<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
````````````````````````````````
However, links may not contain other links, at any level of nesting.
```````````````````````````````` example
[foo [bar](/uri)](/uri)
.
<p>[foo <a href="/uri">bar</a>](/uri)</p>
````````````````````````````````
```````````````````````````````` example
[foo *[bar [baz](/uri)](/uri)*](/uri)
.
<p>[foo <em>[bar <a href="/uri">baz</a>](/uri)</em>](/uri)</p>
````````````````````````````````
```````````````````````````````` example
](uri2)](uri3)
.
<p><img src="uri3" alt="[foo](uri2)" /></p>
````````````````````````````````
These cases illustrate the precedence of link text grouping over
emphasis grouping:
```````````````````````````````` example
*[foo*](/uri)
.
<p>*<a href="/uri">foo*</a></p>
````````````````````````````````
```````````````````````````````` example
[foo *bar](baz*)
.
<p><a href="baz*">foo *bar</a></p>
````````````````````````````````
Note that brackets that *aren't* part of links do not take
precedence:
```````````````````````````````` example
*foo [bar* baz]
.
<p><em>foo [bar</em> baz]</p>
````````````````````````````````
These cases illustrate the precedence of HTML tags, code spans,
and autolinks over link grouping:
```````````````````````````````` example
[foo <bar attr="](baz)">
.
<p>[foo <bar attr="](baz)"></p>
````````````````````````````````
```````````````````````````````` example
[foo`](/uri)`
.
<p>[foo<code>](/uri)</code></p>
````````````````````````````````
```````````````````````````````` example
[foo<http://example.com/?search=](uri)>
.
<p>[foo<a href="http://example.com/?search=%5D(uri)">http://example.com/?search=](uri)</a></p>
````````````````````````````````
There are three kinds of [reference link](@)s:
[full](#full-reference-link), [collapsed](#collapsed-reference-link),
and [shortcut](#shortcut-reference-link).
A [full reference link](@)
consists of a [link text] immediately followed by a [link label]
that [matches] a [link reference definition] elsewhere in the document.
A [link label](@) begins with a left bracket (`[`) and ends
with the first right bracket (`]`) that is not backslash-escaped.
Between these brackets there must be at least one [non-whitespace character].
Unescaped square bracket characters are not allowed inside the
opening and closing square brackets of [link labels]. A link
label can have at most 999 characters inside the square
brackets.
One label [matches](@)
another just in case their normalized forms are equal. To normalize a
label, strip off the opening and closing brackets,
perform the *Unicode case fold*, strip leading and trailing
[whitespace] and collapse consecutive internal
[whitespace] to a single space. If there are multiple
matching reference link definitions, the one that comes first in the
document is used. (It is desirable in such cases to emit a warning.)
The contents of the first link label are parsed as inlines, which are
used as the link's text. The link's URI and title are provided by the
matching [link reference definition].
Here is a simple example:
```````````````````````````````` example
[foo][bar]
[bar]: /url "title"
.
<p><a href="/url" title="title">foo</a></p>
````````````````````````````````
The rules for the [link text] are the same as with
[inline links]. Thus:
The link text may contain balanced brackets, but not unbalanced ones,
unless they are escaped:
```````````````````````````````` example
[link [foo [bar]]][ref]
[ref]: /uri
.
<p><a href="/uri">link [foo [bar]]</a></p>
````````````````````````````````
```````````````````````````````` example
[link \[bar][ref]
[ref]: /uri
.
<p><a href="/uri">link [bar</a></p>
````````````````````````````````
The link text may contain inline content:
```````````````````````````````` example
[link *foo **bar** `#`*][ref]
[ref]: /uri
.
<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
````````````````````````````````
```````````````````````````````` example
[][ref]
[ref]: /uri
.
<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
````````````````````````````````
However, links may not contain other links, at any level of nesting.
```````````````````````````````` example
[foo [bar](/uri)][ref]
[ref]: /uri
.
<p>[foo <a href="/uri">bar</a>]<a href="/uri">ref</a></p>
````````````````````````````````
```````````````````````````````` example
[foo *bar [baz][ref]*][ref]
[ref]: /uri
.
<p>[foo <em>bar <a href="/uri">baz</a></em>]<a href="/uri">ref</a></p>
````````````````````````````````
(In the examples above, we have two [shortcut reference links]
instead of one [full reference link].)
The following cases illustrate the precedence of link text grouping over
emphasis grouping:
```````````````````````````````` example
*[foo*][ref]
[ref]: /uri
.
<p>*<a href="/uri">foo*</a></p>
````````````````````````````````
```````````````````````````````` example
[foo *bar][ref]
[ref]: /uri
.
<p><a href="/uri">foo *bar</a></p>
````````````````````````````````
These cases illustrate the precedence of HTML tags, code spans,
and autolinks over link grouping:
```````````````````````````````` example
[foo <bar attr="][ref]">
[ref]: /uri
.
<p>[foo <bar attr="][ref]"></p>
````````````````````````````````
```````````````````````````````` example
[foo`][ref]`
[ref]: /uri
.
<p>[foo<code>][ref]</code></p>
````````````````````````````````
```````````````````````````````` example
[foo<http://example.com/?search=][ref]>
[ref]: /uri
.
<p>[foo<a href="http://example.com/?search=%5D%5Bref%5D">http://example.com/?search=][ref]</a></p>
````````````````````````````````
Matching is case-insensitive:
```````````````````````````````` example
[foo][BaR]
[bar]: /url "title"
.
<p><a href="/url" title="title">foo</a></p>
````````````````````````````````
Unicode case fold is used:
```````````````````````````````` example
[Толпой][Толпой] is a Russian word.
[ТОЛПОЙ]: /url
.
<p><a href="/url">Толпой</a> is a Russian word.</p>
````````````````````````````````
Consecutive internal [whitespace] is treated as one space for
purposes of determining matching:
```````````````````````````````` example
[Foo
bar]: /url
[Baz][Foo bar]
.
<p><a href="/url">Baz</a></p>
````````````````````````````````
No [whitespace] is allowed between the [link text] and the
[link label]:
```````````````````````````````` example
[foo] [bar]
[bar]: /url "title"
.
<p>[foo] <a href="/url" title="title">bar</a></p>
````````````````````````````````
```````````````````````````````` example
[foo]
[bar]
[bar]: /url "title"
.
<p>[foo]
<a href="/url" title="title">bar</a></p>
````````````````````````````````
This is a departure from John Gruber's original Markdown syntax
description, which explicitly allows whitespace between the link
text and the link label. It brings reference links in line with
[inline links], which (according to both original Markdown and
this spec) cannot have whitespace after the link text. More
importantly, it prevents inadvertent capture of consecutive
[shortcut reference links]. If whitespace is allowed between the
link text and the link label, then in the following we will have
a single reference link, not two shortcut reference links, as
intended:
``` markdown
[foo]
[bar]
[foo]: /url1
[bar]: /url2
```
(Note that [shortcut reference links] were introduced by Gruber
himself in a beta version of `Markdown.pl`, but never included
in the official syntax description. Without shortcut reference
links, it is harmless to allow space between the link text and
link label; but once shortcut references are introduced, it is
too dangerous to allow this, as it frequently leads to
unintended results.)
When there are multiple matching [link reference definitions],
the first is used:
```````````````````````````````` example
[foo]: /url1
[foo]: /url2
[bar][foo]
.
<p><a href="/url1">bar</a></p>
````````````````````````````````
Note that matching is performed on normalized strings, not parsed
inline content. So the following does not match, even though the
labels define equivalent inline content:
```````````````````````````````` example
[bar][foo\!]
[foo!]: /url
.
<p>[bar][foo!]</p>
````````````````````````````````
[Link labels] cannot contain brackets, unless they are
backslash-escaped:
```````````````````````````````` example
[foo][ref[]
[ref[]: /uri
.
<p>[foo][ref[]</p>
<p>[ref[]: /uri</p>
````````````````````````````````
```````````````````````````````` example
[foo][ref[bar]]
[ref[bar]]: /uri
.
<p>[foo][ref[bar]]</p>
<p>[ref[bar]]: /uri</p>
````````````````````````````````
```````````````````````````````` example
[[[foo]]]
[[[foo]]]: /url
.
<p>[[[foo]]]</p>
<p>[[[foo]]]: /url</p>
````````````````````````````````
```````````````````````````````` example
[foo][ref\[]
[ref\[]: /uri
.
<p><a href="/uri">foo</a></p>
````````````````````````````````
Note that in this example `]` is not backslash-escaped:
```````````````````````````````` example
[bar\\]: /uri
[bar\\]
.
<p><a href="/uri">bar\</a></p>
````````````````````````````````
A [link label] must contain at least one [non-whitespace character]:
```````````````````````````````` example
[]
[]: /uri
.
<p>[]</p>
<p>[]: /uri</p>
````````````````````````````````
```````````````````````````````` example
[
]
[
]: /uri
.
<p>[
]</p>
<p>[
]: /uri</p>
````````````````````````````````
A [collapsed reference link](@)
consists of a [link label] that [matches] a
[link reference definition] elsewhere in the
document, followed by the string `[]`.
The contents of the first link label are parsed as inlines,
which are used as the link's text. The link's URI and title are
provided by the matching reference link definition. Thus,
`[foo][]` is equivalent to `[foo][foo]`.
```````````````````````````````` example
[foo][]
[foo]: /url "title"
.
<p><a href="/url" title="title">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[*foo* bar][]
[*foo* bar]: /url "title"
.
<p><a href="/url" title="title"><em>foo</em> bar</a></p>
````````````````````````````````
The link labels are case-insensitive:
```````````````````````````````` example
[Foo][]
[foo]: /url "title"
.
<p><a href="/url" title="title">Foo</a></p>
````````````````````````````````
As with full reference links, [whitespace] is not
allowed between the two sets of brackets:
```````````````````````````````` example
[foo]
[]
[foo]: /url "title"
.
<p><a href="/url" title="title">foo</a>
[]</p>
````````````````````````````````
A [shortcut reference link](@)
consists of a [link label] that [matches] a
[link reference definition] elsewhere in the
document and is not followed by `[]` or a link label.
The contents of the first link label are parsed as inlines,
which are used as the link's text. The link's URI and title
are provided by the matching link reference definition.
Thus, `[foo]` is equivalent to `[foo][]`.
```````````````````````````````` example
[foo]
[foo]: /url "title"
.
<p><a href="/url" title="title">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[*foo* bar]
[*foo* bar]: /url "title"
.
<p><a href="/url" title="title"><em>foo</em> bar</a></p>
````````````````````````````````
```````````````````````````````` example
[[*foo* bar]]
[*foo* bar]: /url "title"
.
<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>
````````````````````````````````
```````````````````````````````` example
[[bar [foo]
[foo]: /url
.
<p>[[bar <a href="/url">foo</a></p>
````````````````````````````````
The link labels are case-insensitive:
```````````````````````````````` example
[Foo]
[foo]: /url "title"
.
<p><a href="/url" title="title">Foo</a></p>
````````````````````````````````
A space after the link text should be preserved:
```````````````````````````````` example
[foo] bar
[foo]: /url
.
<p><a href="/url">foo</a> bar</p>
````````````````````````````````
If you just want bracketed text, you can backslash-escape the
opening bracket to avoid links:
```````````````````````````````` example
\[foo]
[foo]: /url "title"
.
<p>[foo]</p>
````````````````````````````````
Note that this is a link, because a link label ends with the first
following closing bracket:
```````````````````````````````` example
[foo*]: /url
*[foo*]
.
<p>*<a href="/url">foo*</a></p>
````````````````````````````````
Full and compact references take precedence over shortcut
references:
```````````````````````````````` example
[foo][bar]
[foo]: /url1
[bar]: /url2
.
<p><a href="/url2">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo][]
[foo]: /url1
.
<p><a href="/url1">foo</a></p>
````````````````````````````````
Inline links also take precedence:
```````````````````````````````` example
[foo]()
[foo]: /url1
.
<p><a href="">foo</a></p>
````````````````````````````````
```````````````````````````````` example
[foo](not a link)
[foo]: /url1
.
<p><a href="/url1">foo</a>(not a link)</p>
````````````````````````````````
In the following case `[bar][baz]` is parsed as a reference,
`[foo]` as normal text:
```````````````````````````````` example
[foo][bar][baz]
[baz]: /url
.
<p>[foo]<a href="/url">bar</a></p>
````````````````````````````````
Here, though, `[foo][bar]` is parsed as a reference, since
`[bar]` is defined:
```````````````````````````````` example
[foo][bar][baz]
[baz]: /url1
[bar]: /url2
.
<p><a href="/url2">foo</a><a href="/url1">baz</a></p>
````````````````````````````````
Here `[foo]` is not parsed as a shortcut reference, because it
is followed by a link label (even though `[bar]` is not defined):
```````````````````````````````` example
[foo][bar][baz]
[baz]: /url1
[foo]: /url2
.
<p>[foo]<a href="/url1">bar</a></p>
````````````````````````````````
## Images
Syntax for images is like the syntax for links, with one
difference. Instead of [link text], we have an
[image description](@). The rules for this are the
same as for [link text], except that (a) an
image description starts with `
.
<p><img src="/url" alt="foo" title="title" /></p>
````````````````````````````````
```````````````````````````````` example
![foo *bar*]
[foo *bar*]: train.jpg "train & tracks"
.
<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p>
````````````````````````````````
```````````````````````````````` example
](/url2)
.
<p><img src="/url2" alt="foo bar" /></p>
````````````````````````````````
```````````````````````````````` example
](/url2)
.
<p><img src="/url2" alt="foo bar" /></p>
````````````````````````````````
Though this spec is concerned with parsing, not rendering, it is
recommended that in rendering to HTML, only the plain string content
of the [image description] be used. Note that in
the above example, the alt attribute's value is `foo bar`, not `foo
[bar](/url)` or `foo <a href="/url">bar</a>`. Only the plain string
content is rendered, without formatting.
```````````````````````````````` example
![foo *bar*][]
[foo *bar*]: train.jpg "train & tracks"
.
<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p>
````````````````````````````````
```````````````````````````````` example
![foo *bar*][foobar]
[FOOBAR]: train.jpg "train & tracks"
.
<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p>
````````````````````````````````
```````````````````````````````` example

.
<p><img src="train.jpg" alt="foo" /></p>
````````````````````````````````
```````````````````````````````` example
My 
.
<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p>
````````````````````````````````
```````````````````````````````` example

.
<p><img src="url" alt="foo" /></p>
````````````````````````````````
```````````````````````````````` example

.
<p><img src="/url" alt="" /></p>
````````````````````````````````
Reference-style:
```````````````````````````````` example
![foo][bar]
[bar]: /url
.
<p><img src="/url" alt="foo" /></p>
````````````````````````````````
```````````````````````````````` example
![foo][bar]
[BAR]: /url
.
<p><img src="/url" alt="foo" /></p>
````````````````````````````````
Collapsed:
```````````````````````````````` example
![foo][]
[foo]: /url "title"
.
<p><img src="/url" alt="foo" title="title" /></p>
````````````````````````````````
```````````````````````````````` example
![*foo* bar][]
[*foo* bar]: /url "title"
.
<p><img src="/url" alt="foo bar" title="title" /></p>
````````````````````````````````
The labels are case-insensitive:
```````````````````````````````` example
![Foo][]
[foo]: /url "title"
.
<p><img src="/url" alt="Foo" title="title" /></p>
````````````````````````````````
As with reference links, [whitespace] is not allowed
between the two sets of brackets:
```````````````````````````````` example
![foo]
[]
[foo]: /url "title"
.
<p><img src="/url" alt="foo" title="title" />
[]</p>
````````````````````````````````
Shortcut:
```````````````````````````````` example
![foo]
[foo]: /url "title"
.
<p><img src="/url" alt="foo" title="title" /></p>
````````````````````````````````
```````````````````````````````` example
![*foo* bar]
[*foo* bar]: /url "title"
.
<p><img src="/url" alt="foo bar" title="title" /></p>
````````````````````````````````
Note that link labels cannot contain unescaped brackets:
```````````````````````````````` example
![[foo]]
[[foo]]: /url "title"
.
<p>![[foo]]</p>
<p>[[foo]]: /url "title"</p>
````````````````````````````````
The link labels are case-insensitive:
```````````````````````````````` example
![Foo]
[foo]: /url "title"
.
<p><img src="/url" alt="Foo" title="title" /></p>
````````````````````````````````
If you just want a literal `!` followed by bracketed text, you can
backslash-escape the opening `[`:
```````````````````````````````` example
!\[foo]
[foo]: /url "title"
.
<p>![foo]</p>
````````````````````````````````
If you want a link after a literal `!`, backslash-escape the
`!`:
```````````````````````````````` example
\![foo]
[foo]: /url "title"
.
<p>!<a href="/url" title="title">foo</a></p>
````````````````````````````````
## Autolinks
[Autolink](@)s are absolute URIs and email addresses inside
`<` and `>`. They are parsed as links, with the URL or email address
as the link label.
A [URI autolink](@) consists of `<`, followed by an
[absolute URI] followed by `>`. It is parsed as
a link to the URI, with the URI as the link's label.
An [absolute URI](@),
for these purposes, consists of a [scheme] followed by a colon (`:`)
followed by zero or more characters other than ASCII
[whitespace] and control characters, `<`, and `>`. If
the URI includes these characters, they must be percent-encoded
(e.g. `%20` for a space).
For purposes of this spec, a [scheme](@) is any sequence
of 2--32 characters beginning with an ASCII letter and followed
by any combination of ASCII letters, digits, or the symbols plus
("+"), period ("."), or hyphen ("-").
Here are some valid autolinks:
```````````````````````````````` example
<http://foo.bar.baz>
.
<p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p>
````````````````````````````````
```````````````````````````````` example
<http://foo.bar.baz/test?q=hello&id=22&boolean>
.
<p><a href="http://foo.bar.baz/test?q=hello&id=22&boolean">http://foo.bar.baz/test?q=hello&id=22&boolean</a></p>
````````````````````````````````
```````````````````````````````` example
<irc://foo.bar:2233/baz>
.
<p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p>
````````````````````````````````
Uppercase is also fine:
```````````````````````````````` example
<MAILTO:[email protected]>
.
<p><a href="MAILTO:[email protected]">MAILTO:[email protected]</a></p>
````````````````````````````````
Note that many strings that count as [absolute URIs] for
purposes of this spec are not valid URIs, because their
schemes are not registered or because of other problems
with their syntax:
```````````````````````````````` example
<a+b+c:d>
.
<p><a href="a+b+c:d">a+b+c:d</a></p>
````````````````````````````````
```````````````````````````````` example
<made-up-scheme://foo,bar>
.
<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p>
````````````````````````````````
```````````````````````````````` example
<http://../>
.
<p><a href="http://../">http://../</a></p>
````````````````````````````````
```````````````````````````````` example
<localhost:5001/foo>
.
<p><a href="localhost:5001/foo">localhost:5001/foo</a></p>
````````````````````````````````
Spaces are not allowed in autolinks:
```````````````````````````````` example
<http://foo.bar/baz bim>
.
<p><http://foo.bar/baz bim></p>
````````````````````````````````
Backslash-escapes do not work inside autolinks:
```````````````````````````````` example
<http://example.com/\[\>
.
<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p>
````````````````````````````````
An [email autolink](@)
consists of `<`, followed by an [email address],
followed by `>`. The link's label is the email address,
and the URL is `mailto:` followed by the email address.
An [email address](@),
for these purposes, is anything that matches
the [non-normative regex from the HTML5
spec](https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email)):
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?
(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
Examples of email autolinks:
```````````````````````````````` example
<[email protected]>
.
<p><a href="mailto:[email protected]">[email protected]</a></p>
````````````````````````````````
```````````````````````````````` example
<[email protected]>
.
<p><a href="mailto:[email protected]">[email protected]</a></p>
````````````````````````````````
Backslash-escapes do not work inside email autolinks:
```````````````````````````````` example
<foo\[email protected]>
.
<p><[email protected]></p>
````````````````````````````````
These are not autolinks:
```````````````````````````````` example
<>
.
<p><></p>
````````````````````````````````
```````````````````````````````` example
< http://foo.bar >
.
<p>< http://foo.bar ></p>
````````````````````````````````
```````````````````````````````` example
<m:abc>
.
<p><m:abc></p>
````````````````````````````````
```````````````````````````````` example
<foo.bar.baz>
.
<p><foo.bar.baz></p>
````````````````````````````````
```````````````````````````````` example
http://example.com
.
<p>http://example.com</p>
````````````````````````````````
```````````````````````````````` example
[email protected]
.
<p>[email protected]</p>
````````````````````````````````
<div class="extension">
## Autolinks (extension)
GFM enables the `autolink` extension, where autolinks will be recognised in a
greater number of conditions.
[Autolink]s can also be constructed without requiring the use of `<` and to `>`
to delimit them, although they will be recognized under a smaller set of
circumstances. All such recognized autolinks can only come at the beginning of
a line, after whitespace, or any of the delimiting characters `*`, `_`, `~`,
and `(`.
An [extended www autolink](@) will be recognized
when the text `www.` is found followed by a [valid domain].
A [valid domain](@) consists of segments
of alphanumeric characters, underscores (`_`) and hyphens (`-`)
separated by periods (`.`).
There must be at least one period,
and no underscores may be present in the last two segments of the domain.
The scheme `http` will be inserted automatically:
```````````````````````````````` example autolink
www.commonmark.org
.
<p><a href="http://www.commonmark.org">www.commonmark.org</a></p>
````````````````````````````````
After a [valid domain], zero or more non-space non-`<` characters may follow:
```````````````````````````````` example autolink
Visit www.commonmark.org/help for more information.
.
<p>Visit <a href="http://www.commonmark.org/help">www.commonmark.org/help</a> for more information.</p>
````````````````````````````````
We then apply [extended autolink path validation](@) as follows:
Trailing punctuation (specifically, `?`, `!`, `.`, `,`, `:`, `*`, `_`, and `~`)
will not be considered part of the autolink, though they may be included in the
interior of the link:
```````````````````````````````` example autolink
Visit www.commonmark.org.
Visit www.commonmark.org/a.b.
.
<p>Visit <a href="http://www.commonmark.org">www.commonmark.org</a>.</p>
<p>Visit <a href="http://www.commonmark.org/a.b">www.commonmark.org/a.b</a>.</p>
````````````````````````````````
When an autolink ends in `)`, we scan the entire autolink for the total number
of parentheses. If there is a greater number of closing parentheses than
opening ones, we don't consider the unmatched trailing parentheses part of the
autolink, in order to facilitate including an autolink inside a parenthesis:
```````````````````````````````` example autolink
www.google.com/search?q=Markup+(business)
www.google.com/search?q=Markup+(business)))
(www.google.com/search?q=Markup+(business))
(www.google.com/search?q=Markup+(business)
.
<p><a href="http://www.google.com/search?q=Markup+(business)">www.google.com/search?q=Markup+(business)</a></p>
<p><a href="http://www.google.com/search?q=Markup+(business)">www.google.com/search?q=Markup+(business)</a>))</p>
<p>(<a href="http://www.google.com/search?q=Markup+(business)">www.google.com/search?q=Markup+(business)</a>)</p>
<p>(<a href="http://www.google.com/search?q=Markup+(business)">www.google.com/search?q=Markup+(business)</a></p>
````````````````````````````````
This check is only done when the link ends in a closing parentheses `)`, so if
the only parentheses are in the interior of the autolink, no special rules are
applied:
```````````````````````````````` example autolink
www.google.com/search?q=(business))+ok
.
<p><a href="http://www.google.com/search?q=(business))+ok">www.google.com/search?q=(business))+ok</a></p>
````````````````````````````````
If an autolink ends in a semicolon (`;`), we check to see if it appears to
resemble an [entity reference][entity references]; if the preceding text is `&`
followed by one or more alphanumeric characters. If so, it is excluded from
the autolink:
```````````````````````````````` example autolink
www.google.com/search?q=commonmark&hl=en
www.google.com/search?q=commonmark&hl;
.
<p><a href="http://www.google.com/search?q=commonmark&hl=en">www.google.com/search?q=commonmark&hl=en</a></p>
<p><a href="http://www.google.com/search?q=commonmark">www.google.com/search?q=commonmark</a>&hl;</p>
````````````````````````````````
`<` immediately ends an autolink.
```````````````````````````````` example autolink
www.commonmark.org/he<lp
.
<p><a href="http://www.commonmark.org/he">www.commonmark.org/he</a><lp</p>
````````````````````````````````
An [extended url autolink](@) will be recognised when one of the schemes
`http://`, `https://`, or `ftp://`, followed by a [valid domain], then zero or
more non-space non-`<` characters according to
[extended autolink path validation]:
```````````````````````````````` example autolink
http://commonmark.org
(Visit https://encrypted.google.com/search?q=Markup+(business))
Anonymous FTP is available at ftp://foo.bar.baz.
.
<p><a href="http://commonmark.org">http://commonmark.org</a></p>
<p>(Visit <a href="https://encrypted.google.com/search?q=Markup+(business)">https://encrypted.google.com/search?q=Markup+(business)</a>)</p>
<p>Anonymous FTP is available at <a href="ftp://foo.bar.baz">ftp://foo.bar.baz</a>.</p>
````````````````````````````````
An [extended email autolink](@) will be recognised when an email address is
recognised within any text node. Email addresses are recognised according to
the following rules:
* One ore more characters which are alphanumeric, or `.`, `-`, `_`, or `+`.
* An `@` symbol.
* One or more characters which are alphanumeric, or `-` or `_`,
separated by periods (`.`).
There must be at least one period.
The last character must not be one of `-` or `_`.
The scheme `mailto:` will automatically be added to the generated link:
```````````````````````````````` example autolink
[email protected]
.
<p><a href="mailto:[email protected]">[email protected]</a></p>
````````````````````````````````
`+` can occur before the `@`, but not after.
```````````````````````````````` example autolink
hello@mail+xyz.example isn't valid, but [email protected] is.
.
<p>hello@mail+xyz.example isn't valid, but <a href="mailto:[email protected]">[email protected]</a> is.</p>
````````````````````````````````
`.`, `-`, and `_` can occur on both sides of the `@`, but only `.` may occur at
the end of the email address, in which case it will not be considered part of
the address:
```````````````````````````````` example autolink
[email protected]
[email protected].
[email protected]
[email protected]_
.
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="mailto:[email protected]">[email protected]</a>.</p>
<p>[email protected]</p>
<p>[email protected]_</p>
````````````````````````````````
</div>
## Raw HTML
Text between `<` and `>` that looks like an HTML tag is parsed as a
raw HTML tag and will be rendered in HTML without escaping.
Tag and attribute names are not limited to current HTML tags,
so custom tags (and even, say, DocBook tags) may be used.
Here is the grammar for tags:
A [tag name](@) consists of an ASCII letter
followed by zero or more ASCII letters, digits, or
hyphens (`-`).
An [attribute](@) consists of [whitespace],
an [attribute name], and an optional
[attribute value specification].
An [attribute name](@)
consists of an ASCII letter, `_`, or `:`, followed by zero or more ASCII
letters, digits, `_`, `.`, `:`, or `-`. (Note: This is the XML
specification restricted to ASCII. HTML5 is laxer.)
An [attribute value specification](@)
consists of optional [whitespace],
a `=` character, optional [whitespace], and an [attribute
value].
An [attribute value](@)
consists of an [unquoted attribute value],
a [single-quoted attribute value], or a [double-quoted attribute value].
An [unquoted attribute value](@)
is a nonempty string of characters not
including [whitespace], `"`, `'`, `=`, `<`, `>`, or `` ` ``.
A [single-quoted attribute value](@)
consists of `'`, zero or more
characters not including `'`, and a final `'`.
A [double-quoted attribute value](@)
consists of `"`, zero or more
characters not including `"`, and a final `"`.
An [open tag](@) consists of a `<` character, a [tag name],
zero or more [attributes], optional [whitespace], an optional `/`
character, and a `>` character.
A [closing tag](@) consists of the string `</`, a
[tag name], optional [whitespace], and the character `>`.
An [HTML comment](@) consists of `<!--` + *text* + `-->`,
where *text* does not start with `>` or `->`, does not end with `-`,
and does not contain `--`. (See the
[HTML5 spec](http://www.w3.org/TR/html5/syntax.html#comments).)
A [processing instruction](@)
consists of the string `<?`, a string
of characters not including the string `?>`, and the string
`?>`.
A [declaration](@) consists of the
string `<!`, a name consisting of one or more uppercase ASCII letters,
[whitespace], a string of characters not including the
character `>`, and the character `>`.
A [CDATA section](@) consists of
the string `<![CDATA[`, a string of characters not including the string
`]]>`, and the string `]]>`.
An [HTML tag](@) consists of an [open tag], a [closing tag],
an [HTML comment], a [processing instruction], a [declaration],
or a [CDATA section].
Here are some simple open tags:
```````````````````````````````` example
<a><bab><c2c>
.
<p><a><bab><c2c></p>
````````````````````````````````
Empty elements:
```````````````````````````````` example
<a/><b2/>
.
<p><a/><b2/></p>
````````````````````````````````
[Whitespace] is allowed:
```````````````````````````````` example
<a /><b2
data="foo" >
.
<p><a /><b2
data="foo" ></p>
````````````````````````````````
With attributes:
```````````````````````````````` example
<a foo="bar" bam = 'baz <em>"</em>'
_boolean zoop:33=zoop:33 />
.
<p><a foo="bar" bam = 'baz <em>"</em>'
_boolean zoop:33=zoop:33 /></p>
````````````````````````````````
Custom tag names can be used:
```````````````````````````````` example
Foo <responsive-image src="foo.jpg" />
.
<p>Foo <responsive-image src="foo.jpg" /></p>
````````````````````````````````
Illegal tag names, not parsed as HTML:
```````````````````````````````` example
<33> <__>
.
<p><33> <__></p>
````````````````````````````````
Illegal attribute names:
```````````````````````````````` example
<a h*#ref="hi">
.
<p><a h*#ref="hi"></p>
````````````````````````````````
Illegal attribute values:
```````````````````````````````` example
<a href="hi'> <a href=hi'>
.
<p><a href="hi'> <a href=hi'></p>
````````````````````````````````
Illegal [whitespace]:
```````````````````````````````` example
< a><
foo><bar/ >
<foo bar=baz
bim!bop />
.
<p>< a><
foo><bar/ >
<foo bar=baz
bim!bop /></p>
````````````````````````````````
Missing [whitespace]:
```````````````````````````````` example
<a href='bar'title=title>
.
<p><a href='bar'title=title></p>
````````````````````````````````
Closing tags:
```````````````````````````````` example
</a></foo >
.
<p></a></foo ></p>
````````````````````````````````
Illegal attributes in closing tag:
```````````````````````````````` example
</a href="foo">
.
<p></a href="foo"></p>
````````````````````````````````
Comments:
```````````````````````````````` example
foo <!-- this is a
comment - with hyphen -->
.
<p>foo <!-- this is a
comment - with hyphen --></p>
````````````````````````````````
```````````````````````````````` example
foo <!-- not a comment -- two hyphens -->
.
<p>foo <!-- not a comment -- two hyphens --></p>
````````````````````````````````
Not comments:
```````````````````````````````` example
foo <!--> foo -->
foo <!-- foo--->
.
<p>foo <!--> foo --></p>
<p>foo <!-- foo---></p>
````````````````````````````````
Processing instructions:
```````````````````````````````` example
foo <?php echo $a; ?>
.
<p>foo <?php echo $a; ?></p>
````````````````````````````````
Declarations:
```````````````````````````````` example
foo <!ELEMENT br EMPTY>
.
<p>foo <!ELEMENT br EMPTY></p>
````````````````````````````````
CDATA sections:
```````````````````````````````` example
foo <![CDATA[>&<]]>
.
<p>foo <![CDATA[>&<]]></p>
````````````````````````````````
Entity and numeric character references are preserved in HTML
attributes:
```````````````````````````````` example
foo <a href="ö">
.
<p>foo <a href="ö"></p>
````````````````````````````````
Backslash escapes do not work in HTML attributes:
```````````````````````````````` example
foo <a href="\*">
.
<p>foo <a href="\*"></p>
````````````````````````````````
```````````````````````````````` example
<a href="\"">
.
<p><a href="""></p>
````````````````````````````````
<div class="extension">
## Disallowed Raw HTML (extension)
GFM enables the `tagfilter` extension, where the following HTML tags will be
filtered when rendering HTML output:
* `<title>`
* `<textarea>`
* `<style>`
* `<xmp>`
* `<iframe>`
* `<noembed>`
* `<noframes>`
* `<script>`
* `<plaintext>`
Filtering is done by replacing the leading `<` with the entity `<`. These
tags are chosen in particular as they change how HTML is interpreted in a way
unique to them (i.e. nested HTML is interpreted differently), and this is
usually undesireable in the context of other rendered Markdown content.
All other HTML tags are left untouched.
```````````````````````````````` example tagfilter
<strong> <title> <style> <em>
<blockquote>
<xmp> is disallowed. <XMP> is also disallowed.
</blockquote>
.
<p><strong> <title> <style> <em></p>
<blockquote>
<xmp> is disallowed. <XMP> is also disallowed.
</blockquote>
````````````````````````````````
</div>
## Hard line breaks
A line break (not in a code span or HTML tag) that is preceded
by two or more spaces and does not occur at the end of a block
is parsed as a [hard line break](@) (rendered
in HTML as a `<br />` tag):
```````````````````````````````` example
foo
baz
.
<p>foo<br />
baz</p>
````````````````````````````````
For a more visible alternative, a backslash before the
[line ending] may be used instead of two spaces:
```````````````````````````````` example
foo\
baz
.
<p>foo<br />
baz</p>
````````````````````````````````
More than two spaces can be used:
```````````````````````````````` example
foo
baz
.
<p>foo<br />
baz</p>
````````````````````````````````
Leading spaces at the beginning of the next line are ignored:
```````````````````````````````` example
foo
bar
.
<p>foo<br />
bar</p>
````````````````````````````````
```````````````````````````````` example
foo\
bar
.
<p>foo<br />
bar</p>
````````````````````````````````
Line breaks can occur inside emphasis, links, and other constructs
that allow inline content:
```````````````````````````````` example
*foo
bar*
.
<p><em>foo<br />
bar</em></p>
````````````````````````````````
```````````````````````````````` example
*foo\
bar*
.
<p><em>foo<br />
bar</em></p>
````````````````````````````````
Line breaks do not occur inside code spans
```````````````````````````````` example
`code
span`
.
<p><code>code span</code></p>
````````````````````````````````
```````````````````````````````` example
`code\
span`
.
<p><code>code\ span</code></p>
````````````````````````````````
or HTML tags:
```````````````````````````````` example
<a href="foo
bar">
.
<p><a href="foo
bar"></p>
````````````````````````````````
```````````````````````````````` example
<a href="foo\
bar">
.
<p><a href="foo\
bar"></p>
````````````````````````````````
Hard line breaks are for separating inline content within a block.
Neither syntax for hard line breaks works at the end of a paragraph or
other block element:
```````````````````````````````` example
foo\
.
<p>foo\</p>
````````````````````````````````
```````````````````````````````` example
foo
.
<p>foo</p>
````````````````````````````````
```````````````````````````````` example
### foo\
.
<h3>foo\</h3>
````````````````````````````````
```````````````````````````````` example
### foo
.
<h3>foo</h3>
````````````````````````````````
## Soft line breaks
A regular line break (not in a code span or HTML tag) that is not
preceded by two or more spaces or a backslash is parsed as a
[softbreak](@). (A softbreak may be rendered in HTML either as a
[line ending] or as a space. The result will be the same in
browsers. In the examples here, a [line ending] will be used.)
```````````````````````````````` example
foo
baz
.
<p>foo
baz</p>
````````````````````````````````
Spaces at the end of the line and beginning of the next line are
removed:
```````````````````````````````` example
foo
baz
.
<p>foo
baz</p>
````````````````````````````````
A conforming parser may render a soft line break in HTML either as a
line break or as a space.
A renderer may also provide an option to render soft line breaks
as hard line breaks.
## Textual content
Any characters not given an interpretation by the above rules will
be parsed as plain textual content.
```````````````````````````````` example
hello $.;'there
.
<p>hello $.;'there</p>
````````````````````````````````
```````````````````````````````` example
Foo χρῆν
.
<p>Foo χρῆν</p>
````````````````````````````````
Internal spaces are preserved verbatim:
```````````````````````````````` example
Multiple spaces
.
<p>Multiple spaces</p>
````````````````````````````````
<!-- END TESTS -->
# Appendix: A parsing strategy
In this appendix we describe some features of the parsing strategy
used in the CommonMark reference implementations.
## Overview
Parsing has two phases:
1. In the first phase, lines of input are consumed and the block
structure of the document---its division into paragraphs, block quotes,
list items, and so on---is constructed. Text is assigned to these
blocks but not parsed. Link reference definitions are parsed and a
map of links is constructed.
2. In the second phase, the raw text contents of paragraphs and headings
are parsed into sequences of Markdown inline elements (strings,
code spans, links, emphasis, and so on), using the map of link
references constructed in phase 1.
At each point in processing, the document is represented as a tree of
**blocks**. The root of the tree is a `document` block. The `document`
may have any number of other blocks as **children**. These children
may, in turn, have other blocks as children. The last child of a block
is normally considered **open**, meaning that subsequent lines of input
can alter its contents. (Blocks that are not open are **closed**.)
Here, for example, is a possible document tree, with the open blocks
marked by arrows:
``` tree
-> document
-> block_quote
paragraph
"Lorem ipsum dolor\nsit amet."
-> list (type=bullet tight=true bullet_char=-)
list_item
paragraph
"Qui *quodsi iracundia*"
-> list_item
-> paragraph
"aliquando id"
```
## Phase 1: block structure
Each line that is processed has an effect on this tree. The line is
analyzed and, depending on its contents, the document may be altered
in one or more of the following ways:
1. One or more open blocks may be closed.
2. One or more new blocks may be created as children of the
last open block.
3. Text may be added to the last (deepest) open block remaining
on the tree.
Once a line has been incorporated into the tree in this way,
it can be discarded, so input can be read in a stream.
For each line, we follow this procedure:
1. First we iterate through the open blocks, starting with the
root document, and descending through last children down to the last
open block. Each block imposes a condition that the line must satisfy
if the block is to remain open. For example, a block quote requires a
`>` character. A paragraph requires a non-blank line.
In this phase we may match all or just some of the open
blocks. But we cannot close unmatched blocks yet, because we may have a
[lazy continuation line].
2. Next, after consuming the continuation markers for existing
blocks, we look for new block starts (e.g. `>` for a block quote).
If we encounter a new block start, we close any blocks unmatched
in step 1 before creating the new block as a child of the last
matched block.
3. Finally, we look at the remainder of the line (after block
markers like `>`, list markers, and indentation have been consumed).
This is text that can be incorporated into the last open
block (a paragraph, code block, heading, or raw HTML).
Setext headings are formed when we see a line of a paragraph
that is a [setext heading underline].
Reference link definitions are detected when a paragraph is closed;
the accumulated text lines are parsed to see if they begin with
one or more reference link definitions. Any remainder becomes a
normal paragraph.
We can see how this works by considering how the tree above is
generated by four lines of Markdown:
``` markdown
> Lorem ipsum dolor
sit amet.
> - Qui *quodsi iracundia*
> - aliquando id
```
At the outset, our document model is just
``` tree
-> document
```
The first line of our text,
``` markdown
> Lorem ipsum dolor
```
causes a `block_quote` block to be created as a child of our
open `document` block, and a `paragraph` block as a child of
the `block_quote`. Then the text is added to the last open
block, the `paragraph`:
``` tree
-> document
-> block_quote
-> paragraph
"Lorem ipsum dolor"
```
The next line,
``` markdown
sit amet.
```
is a "lazy continuation" of the open `paragraph`, so it gets added
to the paragraph's text:
``` tree
-> document
-> block_quote
-> paragraph
"Lorem ipsum dolor\nsit amet."
```
The third line,
``` markdown
> - Qui *quodsi iracundia*
```
causes the `paragraph` block to be closed, and a new `list` block
opened as a child of the `block_quote`. A `list_item` is also
added as a child of the `list`, and a `paragraph` as a child of
the `list_item`. The text is then added to the new `paragraph`:
``` tree
-> document
-> block_quote
paragraph
"Lorem ipsum dolor\nsit amet."
-> list (type=bullet tight=true bullet_char=-)
-> list_item
-> paragraph
"Qui *quodsi iracundia*"
```
The fourth line,
``` markdown
> - aliquando id
```
causes the `list_item` (and its child the `paragraph`) to be closed,
and a new `list_item` opened up as child of the `list`. A `paragraph`
is added as a child of the new `list_item`, to contain the text.
We thus obtain the final tree:
``` tree
-> document
-> block_quote
paragraph
"Lorem ipsum dolor\nsit amet."
-> list (type=bullet tight=true bullet_char=-)
list_item
paragraph
"Qui *quodsi iracundia*"
-> list_item
-> paragraph
"aliquando id"
```
## Phase 2: inline structure
Once all of the input has been parsed, all open blocks are closed.
We then "walk the tree," visiting every node, and parse raw
string contents of paragraphs and headings as inlines. At this
point we have seen all the link reference definitions, so we can
resolve reference links as we go.
``` tree
document
block_quote
paragraph
str "Lorem ipsum dolor"
softbreak
str "sit amet."
list (type=bullet tight=true bullet_char=-)
list_item
paragraph
str "Qui "
emph
str "quodsi iracundia"
list_item
paragraph
str "aliquando id"
```
Notice how the [line ending] in the first paragraph has
been parsed as a `softbreak`, and the asterisks in the first list item
have become an `emph`.
### An algorithm for parsing nested emphasis and links
By far the trickiest part of inline parsing is handling emphasis,
strong emphasis, links, and images. This is done using the following
algorithm.
When we're parsing inlines and we hit either
- a run of `*` or `_` characters, or
- a `[` or `.
The [delimiter stack] is a doubly linked list. Each
element contains a pointer to a text node, plus information about
- the type of delimiter (`[`, `![`, `*`, `_`)
- the number of delimiters,
- whether the delimiter is "active" (all are active to start), and
- whether the delimiter is a potential opener, a potential closer,
or both (which depends on what sort of characters precede
and follow the delimiters).
When we hit a `]` character, we call the *look for link or image*
procedure (see below).
When we hit the end of the input, we call the *process emphasis*
procedure (see below), with `stack_bottom` = NULL.
#### *look for link or image*
Starting at the top of the delimiter stack, we look backwards
through the stack for an opening `[` or `![` delimiter.
- If we don't find one, we return a literal text node `]`.
- If we do find one, but it's not *active*, we remove the inactive
delimiter from the stack, and return a literal text node `]`.
- If we find one and it's active, then we parse ahead to see if
we have an inline link/image, reference link/image, compact reference
link/image, or shortcut reference link/image.
+ If we don't, then we remove the opening delimiter from the
delimiter stack and return a literal text node `]`.
+ If we do, then
* We return a link or image node whose children are the inlines
after the text node pointed to by the opening delimiter.
* We run *process emphasis* on these inlines, with the `[` opener
as `stack_bottom`.
* We remove the opening delimiter.
* If we have a link (and not an image), we also set all
`[` delimiters before the opening delimiter to *inactive*. (This
will prevent us from getting links within links.)
#### *process emphasis*
Parameter `stack_bottom` sets a lower bound to how far we
descend in the [delimiter stack]. If it is NULL, we can
go all the way to the bottom. Otherwise, we stop before
visiting `stack_bottom`.
Let `current_position` point to the element on the [delimiter stack]
just above `stack_bottom` (or the first element if `stack_bottom`
is NULL).
We keep track of the `openers_bottom` for each delimiter
type (`*`, `_`) and each length of the closing delimiter run
(modulo 3). Initialize this to `stack_bottom`.
Then we repeat the following until we run out of potential
closers:
- Move `current_position` forward in the delimiter stack (if needed)
until we find the first potential closer with delimiter `*` or `_`.
(This will be the potential closer closest
to the beginning of the input -- the first one in parse order.)
- Now, look back in the stack (staying above `stack_bottom` and
the `openers_bottom` for this delimiter type) for the
first matching potential opener ("matching" means same delimiter).
- If one is found:
+ Figure out whether we have emphasis or strong emphasis:
if both closer and opener spans have length >= 2, we have
strong, otherwise regular.
+ Insert an emph or strong emph node accordingly, after
the text node corresponding to the opener.
+ Remove any delimiters between the opener and closer from
the delimiter stack.
+ Remove 1 (for regular emph) or 2 (for strong emph) delimiters
from the opening and closing text nodes. If they become empty
as a result, remove them and remove the corresponding element
of the delimiter stack. If the closing node is removed, reset
`current_position` to the next element in the stack.
- If none is found:
+ Set `openers_bottom` to the element before `current_position`.
(We know that there are no openers for this kind of closer up to and
including this point, so this puts a lower bound on future searches.)
+ If the closer at `current_position` is not a potential opener,
remove it from the delimiter stack (since we know it can't
be a closer either).
+ Advance `current_position` to the next element in the stack.
After we're done, we remove all delimiters above `stack_bottom` from the
delimiter stack.
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/extensions-table-prefer-style-attributes.txt | ---
title: Extensions test with --table-prefer-style-attributes
author: FUJI Goro
version: 0.1
date: '2018-02-20'
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
...
## Tables
Table alignment:
```````````````````````````````` example
aaa | bbb | ccc | ddd | eee
:-- | --- | :-: | --- | --:
fff | ggg | hhh | iii | jjj
.
<table>
<thead>
<tr>
<th style="text-align: left">aaa</th>
<th>bbb</th>
<th style="text-align: center">ccc</th>
<th>ddd</th>
<th style="text-align: right">eee</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">fff</td>
<td>ggg</td>
<td style="text-align: center">hhh</td>
<td>iii</td>
<td style="text-align: right">jjj</td>
</tr>
</tbody>
</table>
````````````````````````````````
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/cmark.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from ctypes import CDLL, c_char_p, c_size_t, c_int, c_void_p
from subprocess import *
import platform
import os
def pipe_through_prog(prog, text):
p1 = Popen(prog.split(), stdout=PIPE, stdin=PIPE, stderr=PIPE)
[result, err] = p1.communicate(input=text.encode('utf-8'))
return [p1.returncode, result.decode('utf-8'), err]
def parse(lib, extlib, text, extensions):
cmark_gfm_core_extensions_ensure_registered = extlib.cmark_gfm_core_extensions_ensure_registered
find_syntax_extension = lib.cmark_find_syntax_extension
find_syntax_extension.restype = c_void_p
find_syntax_extension.argtypes = [c_char_p]
parser_attach_syntax_extension = lib.cmark_parser_attach_syntax_extension
parser_attach_syntax_extension.argtypes = [c_void_p, c_void_p]
parser_new = lib.cmark_parser_new
parser_new.restype = c_void_p
parser_new.argtypes = [c_int]
parser_feed = lib.cmark_parser_feed
parser_feed.argtypes = [c_void_p, c_char_p, c_int]
parser_finish = lib.cmark_parser_finish
parser_finish.restype = c_void_p
parser_finish.argtypes = [c_void_p]
cmark_gfm_core_extensions_ensure_registered()
parser = parser_new(0)
for e in set(extensions):
ext = find_syntax_extension(bytes(e, 'utf-8'))
if not ext:
raise Exception("Extension not found: '{}'".format(e))
parser_attach_syntax_extension(parser, ext)
textbytes = text.encode('utf-8')
textlen = len(textbytes)
parser_feed(parser, textbytes, textlen)
return [parser_finish(parser), parser]
def to_html(lib, extlib, text, extensions):
document, parser = parse(lib, extlib, text, extensions)
parser_get_syntax_extensions = lib.cmark_parser_get_syntax_extensions
parser_get_syntax_extensions.restype = c_void_p
parser_get_syntax_extensions.argtypes = [c_void_p]
syntax_extensions = parser_get_syntax_extensions(parser)
render_html = lib.cmark_render_html
render_html.restype = c_char_p
render_html.argtypes = [c_void_p, c_int, c_void_p]
# 1 << 17 == CMARK_OPT_UNSAFE
result = render_html(document, 1 << 17, syntax_extensions).decode('utf-8')
return [0, result, '']
def to_commonmark(lib, extlib, text, extensions):
document, _ = parse(lib, extlib, text, extensions)
render_commonmark = lib.cmark_render_commonmark
render_commonmark.restype = c_char_p
render_commonmark.argtypes = [c_void_p, c_int, c_int]
result = render_commonmark(document, 0, 0).decode('utf-8')
return [0, result, '']
class CMark:
def __init__(self, prog=None, library_dir=None, extensions=None):
self.prog = prog
self.extensions = []
if extensions:
self.extensions = extensions.split()
if prog:
prog += ' --unsafe'
extsfun = lambda exts: ''.join([' -e ' + e for e in set(exts)])
self.to_html = lambda x, exts=[]: pipe_through_prog(prog + extsfun(exts + self.extensions), x)
self.to_commonmark = lambda x, exts=[]: pipe_through_prog(prog + ' -t commonmark' + extsfun(exts + self.extensions), x)
else:
sysname = platform.system()
if sysname == 'Darwin':
libnames = [ ["lib", ".dylib" ] ]
elif sysname == 'Windows':
libnames = [ ["", ".dll"], ["lib", ".dll"] ]
else:
libnames = [ ["lib", ".so"] ]
if not library_dir:
library_dir = os.path.join("..", "build", "src")
for prefix, suffix in libnames:
candidate = os.path.join(library_dir, prefix + "cmark-gfm" + suffix)
if os.path.isfile(candidate):
libpath = candidate
break
cmark = CDLL(libpath)
extlib = CDLL(os.path.join(
library_dir, "..", "extensions", prefix + "cmark-gfm-extensions" + suffix))
self.to_html = lambda x, exts=[]: to_html(cmark, extlib, x, exts + self.extensions)
self.to_commonmark = lambda x, exts=[]: to_commonmark(cmark, extlib, x, exts + self.extensions)
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/roundtrip_tests.py | import re
import sys
from spec_tests import get_tests, do_test
from cmark import CMark
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Run cmark roundtrip tests.')
parser.add_argument('-p', '--program', dest='program', nargs='?', default=None,
help='program to test')
parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt',
help='path to spec')
parser.add_argument('-P', '--pattern', dest='pattern', nargs='?',
default=None, help='limit to sections matching regex pattern')
parser.add_argument('--library-dir', dest='library_dir', nargs='?',
default=None, help='directory containing dynamic library')
parser.add_argument('--extensions', dest='extensions', nargs='?',
default=None, help='space separated list of extensions to enable')
parser.add_argument('--no-normalize', dest='normalize',
action='store_const', const=False, default=True,
help='do not normalize HTML')
parser.add_argument('-n', '--number', type=int, default=None,
help='only consider the test with the given number')
args = parser.parse_args(sys.argv[1:])
spec = sys.argv[1]
def converter(md, exts):
cmark = CMark(prog=args.program, library_dir=args.library_dir, extensions=args.extensions)
[ec, result, err] = cmark.to_commonmark(md, exts)
if ec == 0:
[ec, html, err] = cmark.to_html(result, exts)
if ec == 0:
# In the commonmark writer we insert dummy HTML
# comments between lists, and between lists and code
# blocks. Strip these out, since the spec uses
# two blank lines instead:
return [ec, re.sub('<!-- end list -->\n', '', html), '']
else:
return [ec, html, err]
else:
return [ec, result, err]
tests = get_tests(args.spec)
result_counts = {'pass': 0, 'fail': 0, 'error': 0, 'skip': 0}
for test in tests:
do_test(converter, test, args.normalize, result_counts)
sys.stdout.buffer.write("{pass} passed, {fail} failed, {error} errored, {skip} skipped\n".format(**result_counts).encode('utf-8'))
exit(result_counts['fail'] + result_counts['error'])
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/test/afl_test_cases/test.md | # H1
H2
--
t ☺
*b* **em** `c`
≥\&\
\_e\_
4) I1
5) I2
> [l](/u "t")
>
> - [f]
> - 
>
>> <ftp://hh>
>> <u@hh>
~~~ l☺
cb
~~~
c1
c2
***
<div>
<b>x</b>
</div>
| a | b |
| --- | --- |
| c | `d|` \| e |
google ~~yahoo~~
google.com http://google.com [email protected]
and <xmp> but
<surewhynot>
sure
</surewhynot>
[f]: /u "t"
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/wrappers/wrapper_ext.py | #!/usr/bin/env python
#
# Example for using the shared library from python.
# Will work with either python 2 or python 3.
# Requires cmark-gfm and cmark-gfm-extensions libraries to be installed.
#
# This particular example uses the GitHub extensions from the gfm-extensions
# library. EXTENSIONS specifies which to use, and the sample shows how to
# connect them into a parser.
#
import sys
import ctypes
if sys.platform == 'darwin':
libname = 'libcmark-gfm.dylib'
extname = 'libcmark-gfm-extensions.dylib'
elif sys.platform == 'win32':
libname = 'cmark-gfm.dll'
extname = 'cmark-gfm-extensions.dll'
else:
libname = 'libcmark-gfm.so'
extname = 'libcmark-gfm-extensions.so'
cmark = ctypes.CDLL(libname)
cmark_ext = ctypes.CDLL(extname)
# Options for the GFM rendering call
OPTS = 0 # defaults
# The GFM extensions that we want to use
EXTENSIONS = (
'autolink',
'table',
'strikethrough',
'tagfilter',
)
# Use ctypes to access the functions in libcmark-gfm
F_cmark_parser_new = cmark.cmark_parser_new
F_cmark_parser_new.restype = ctypes.c_void_p
F_cmark_parser_new.argtypes = (ctypes.c_int,)
F_cmark_parser_feed = cmark.cmark_parser_feed
F_cmark_parser_feed.restype = None
F_cmark_parser_feed.argtypes = (ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t)
F_cmark_parser_finish = cmark.cmark_parser_finish
F_cmark_parser_finish.restype = ctypes.c_void_p
F_cmark_parser_finish.argtypes = (ctypes.c_void_p,)
F_cmark_parser_attach_syntax_extension = cmark.cmark_parser_attach_syntax_extension
F_cmark_parser_attach_syntax_extension.restype = ctypes.c_int
F_cmark_parser_attach_syntax_extension.argtypes = (ctypes.c_void_p, ctypes.c_void_p)
F_cmark_parser_get_syntax_extensions = cmark.cmark_parser_get_syntax_extensions
F_cmark_parser_get_syntax_extensions.restype = ctypes.c_void_p
F_cmark_parser_get_syntax_extensions.argtypes = (ctypes.c_void_p,)
F_cmark_parser_free = cmark.cmark_parser_free
F_cmark_parser_free.restype = None
F_cmark_parser_free.argtypes = (ctypes.c_void_p,)
F_cmark_node_free = cmark.cmark_node_free
F_cmark_node_free.restype = None
F_cmark_node_free.argtypes = (ctypes.c_void_p,)
F_cmark_find_syntax_extension = cmark.cmark_find_syntax_extension
F_cmark_find_syntax_extension.restype = ctypes.c_void_p
F_cmark_find_syntax_extension.argtypes = (ctypes.c_char_p,)
F_cmark_render_html = cmark.cmark_render_html
F_cmark_render_html.restype = ctypes.c_char_p
F_cmark_render_html.argtypes = (ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p)
# Set up the libcmark-gfm library and its extensions
F_register = cmark_ext.cmark_gfm_core_extensions_ensure_registered
F_register.restype = None
F_register.argtypes = ( )
F_register()
def md2html(text):
"Use cmark-gfm to render the Markdown into an HTML fragment."
parser = F_cmark_parser_new(OPTS)
assert parser
for name in EXTENSIONS:
ext = F_cmark_find_syntax_extension(name)
assert ext
rv = F_cmark_parser_attach_syntax_extension(parser, ext)
assert rv
exts = F_cmark_parser_get_syntax_extensions(parser)
F_cmark_parser_feed(parser, text, len(text))
doc = F_cmark_parser_finish(parser)
assert doc
output = F_cmark_render_html(doc, OPTS, exts)
F_cmark_parser_free(parser)
F_cmark_node_free(doc)
return output
sys.stdout.write(md2html(sys.stdin.read()))
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/wrappers/wrapper.py | #!/usr/bin/env python
# Example for using the shared library from python
# Will work with either python 2 or python 3
# Requires cmark library to be installed
from ctypes import CDLL, c_char_p, c_long
import sys
import platform
sysname = platform.system()
if sysname == 'Darwin':
libname = "libcmark.dylib"
elif sysname == 'Windows':
libname = "cmark.dll"
else:
libname = "libcmark.so"
cmark = CDLL(libname)
markdown = cmark.cmark_markdown_to_html
markdown.restype = c_char_p
markdown.argtypes = [c_char_p, c_long, c_long]
opts = 0 # defaults
def md2html(text):
if sys.version_info >= (3,0):
textbytes = text.encode('utf-8')
textlen = len(textbytes)
return markdown(textbytes, textlen, opts).decode('utf-8')
else:
textbytes = text
textlen = len(text)
return markdown(textbytes, textlen, opts)
sys.stdout.write(md2html(sys.stdin.read()))
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/wrappers/wrapper.rb | #!/usr/bin/env ruby
require 'ffi'
module CMark
extend FFI::Library
ffi_lib ['libcmark', 'cmark']
attach_function :cmark_markdown_to_html, [:string, :int, :int], :string
end
def markdown_to_html(s)
len = s.bytesize
CMark::cmark_markdown_to_html(s, len, 0)
end
STDOUT.write(markdown_to_html(ARGF.read()))
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/wrappers/wrapper.js |
const cmark = require('node-cmark');
const markdown = '# h1 title';
cmark.markdown2html(markdown);
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/tools/mkcasefold.pl | binmode STDOUT;
print(" switch (c) {\n");
my $lastchar = "";
while (<STDIN>) {
if (/^[A-F0-9]/ and / [CF]; /) {
my ($char, $type, $subst) = m/([A-F0-9]+); ([CF]); ([^;]+)/;
if ($char eq $lastchar) {
break;
}
my @subst = $subst =~ m/(\w+)/g;
printf(" case 0x%s:\n", $char);
foreach (@subst) {
printf(" bufpush(0x%s);\n", $_);
}
printf(" break;\n");
$lastchar = $char;
}
}
printf(" default:\n");
printf(" bufpush(c);\n");
print(" }\n");
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/tools/appveyor-build.bat | @echo off
if "%MSVC_VERSION%" == "10" goto msvc10
call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" amd64
goto build
:msvc10
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
:build
nmake
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/cmark-gfm/tools/make_entities_inc.py | # Creates C data structures for binary lookup table of entities,
# using python's html5 entity data.
# Usage: python3 tools/make_entities_inc.py > src/entities.inc
import html
entities5 = html.entities.html5
# remove keys without semicolons. For some reason the list
# has duplicates of a few things, like auml, one with and one
# without a semicolon.
entities = sorted([(k[:-1], entities5[k].encode('utf-8')) for k in entities5.keys() if k[-1] == ';'])
# Print out the header:
print("""/* Autogenerated by tools/make_headers_inc.py */
struct cmark_entity_node {
unsigned char *entity;
unsigned char bytes[8];
};
#define CMARK_ENTITY_MIN_LENGTH 2
#define CMARK_ENTITY_MAX_LENGTH 32""")
print("#define CMARK_NUM_ENTITIES " + str(len(entities)));
print("\nstatic const struct cmark_entity_node cmark_entities[] = {");
for (ent, bs) in entities:
print('{(unsigned char*)"' + ent + '", {' + ', '.join(map(str, bs)) + ', 0}},')
print("};")
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/z.mod | module github.com/gernest/zunicode
exports zunicode
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/examples.zig | const unicode = @import("./src/index.zig");
const utf8 = unicode.utf8;
const warn = @import("std").debug.warn;
test "ExampleRuneLen" {
warn("\n{}\n", try utf8.runeLen('a'));
warn("{}\n", try utf8.runeLen(0x754c)); // chinese character 0x754c 界
// Test 1/1 ExampleRuneLen...
// 1
// 3
// OK
}
test "Example_is" {
const mixed = "\t5Ὂg̀9! ℃ᾭG";
var iter = utf8.Iterator.init(mixed);
var a = []u8{0} ** 5;
warn("\n");
while (true) {
const next = try iter.next();
if (next == null) {
break;
}
const size = try utf8.encodeRune(a[0..], next.?.value);
warn("For {}:\n", a[0..size]);
if (unicode.isControl(next.?.value)) {
warn("\t is control rune\n");
}
if (unicode.isDigit(next.?.value)) {
warn("\t is digit rune\n");
}
if (unicode.isGraphic(next.?.value)) {
warn("\t is graphic rune\n");
}
if (unicode.isLetter(next.?.value)) {
warn("\t is letter rune\n");
}
if (unicode.isLower(next.?.value)) {
warn("\t is lower case rune\n");
}
if (unicode.isMark(next.?.value)) {
warn("\t is mark rune\n");
}
if (unicode.isNumber(next.?.value)) {
warn("\t is number rune\n");
}
if (unicode.isPrint(next.?.value)) {
warn("\t is printable rune\n");
}
if (unicode.isPunct(next.?.value)) {
warn("\t is punct rune\n");
}
if (unicode.isSpace(next.?.value)) {
warn("\t is space rune\n");
}
if (unicode.isSymbol(next.?.value)) {
warn("\t is symbol rune\n");
}
if (unicode.isTitle(next.?.value)) {
warn("\t is title rune\n");
}
if (unicode.isUpper(next.?.value)) {
warn("\t is upper case rune\n");
}
}
// Test 2/2 Example_is...
// For :
// is control rune
// is space rune
// For 5:
// is digit rune
// is graphic rune
// is number rune
// is printable rune
// For Ὂ:
// is graphic rune
// is letter rune
// is printable rune
// is upper case rune
// For g:
// is graphic rune
// is letter rune
// is lower case rune
// is printable rune
// For ̀:
// is graphic rune
// is mark rune
// is printable rune
// For 9:
// is digit rune
// is graphic rune
// is number rune
// is printable rune
// For !:
// is graphic rune
// is printable rune
// is punct rune
// For :
// is graphic rune
// is printable rune
// is space rune
// For ℃:
// is graphic rune
// is printable rune
// is symbol rune
// For ᾭ:
// is graphic rune
// is letter rune
// is printable rune
// is title rune
// For G:
// is graphic rune
// is letter rune
// is printable rune
// is upper case rune
// OK
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/README.md | # zunicode
[](https://travis-ci.org/gernest/zunicode)
unicode library for ziglang. |
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/build.zig | const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
var main_tests = b.addTest("src/all_test.zig");
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
b.default_step.dependOn(test_step);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/.travis.yml | language: minimal
install:
- wget https://ziglang.org/builds/zig-linux-x86_64-0.5.0+4f594527c.tar.xz
- tar xf zig-linux-x86_64-0.5.0+4f594527c.tar.xz
- mv zig-linux-x86_64-0.5.0+4f594527c bin
script:
- ./bin/zig build |
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/utf16_test.zig | const std = @import("std");
const unicode = @import("zunicode.zig");
const utf16 = @import("utf16.zig");
const mem = std.mem;
const testing = std.testing;
test "constants" {
testing.expectEqual(utf16.max_rune, unicode.tables.max_rune);
}
const encodeTest = struct {
in: []const i32,
out: []const u16,
};
const encode_tests = [_]encodeTest{
encodeTest{ .in = &[_]i32{ 1, 2, 3, 4 }, .out = &[_]u16{ 1, 2, 3, 4 } },
encodeTest{
.in = &[_]i32{ 0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff },
.out = &[_]u16{ 0xffff, 0xd800, 0xdc00, 0xd800, 0xdc01, 0xd808, 0xdf45, 0xdbff, 0xdfff },
},
encodeTest{
.in = &[_]i32{ 'a', 'b', 0xd7ff, 0xd800, 0xdfff, 0xe000, 0x110000, -1 },
.out = &[_]u16{ 'a', 'b', 0xd7ff, 0xfffd, 0xfffd, 0xe000, 0xfffd, 0xfffd },
},
};
test "encode" {
var a = std.testing.allocator;
for (encode_tests) |ts, i| {
const value = try utf16.encode(a, ts.in);
testing.expectEqualSlices(u16, ts.out, value.items);
value.deinit();
}
}
test "encodeRune" {
for (encode_tests) |tt, i| {
var j: usize = 0;
for (tt.in) |r| {
const pair = utf16.encodeRune(r);
if (r < 0x10000 or r > unicode.tables.max_rune) {
testing.expect(!(j >= tt.out.len));
testing.expect(!(pair.r1 != unicode.tables.replacement_char or pair.r2 != unicode.tables.replacement_char));
j += 1;
} else {
testing.expect(!(j >= tt.out.len));
testing.expect(!(pair.r1 != @intCast(i32, tt.out[j]) or pair.r2 != @intCast(i32, tt.out[j + 1])));
j += 2;
const dec = utf16.decodeRune(pair.r1, pair.r2);
testing.expectEqual(r, dec);
}
}
}
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/utf16.zig | const std = @import("std");
const mem = std.mem;
const ArrayList = std.ArrayList;
const warn = std.debug.warn;
pub const replacement_rune: i32 = 0xfffd;
pub const max_rune: i32 = 0x10ffff;
// 0xd800-0xdc00 encodes the high 10 bits of a pair.
// 0xdc00-0xe000 encodes the low 10 bits of a pair.
// the value is those 20 bits plus 0x10000.
const surr1: i32 = 0xd800;
const surr2: i32 = 0xdc00;
const surr3: i32 = 0xe000;
const surrSelf: i32 = 0x10000;
// isSurrogate reports whether the specified Unicode code point
// can appear in a surrogate pair.
pub fn issSurrogate(r: i32) bool {
return surr1 <= r and r < surr3;
}
// ArrayUTF16 this holds an array/slice of utf16 code points. The API of this
// packages avoid ussing raw []u16 to simplify manamemeng and freeing of memory.
pub const ArrayUTF16 = ArrayList(u16);
pub const ArrayUTF8 = ArrayList(i32);
// decodeRune returns the UTF-16 decoding of a surrogate pair.
// If the pair is not a valid UTF-16 surrogate pair, DecodeRune returns
// the Unicode replacement code point U+FFFD.
pub fn decodeRune(r1: i32, r2: i32) i32 {
if (surr1 <= r1 and r1 < surr2 and surr2 <= r2 and r2 < surr3) {
return (((r1 - surr1) << 10) | (r2 - surr2)) + surrSelf;
}
return replacement_rune;
}
pub const Pair = struct {
r1: i32,
r2: i32,
};
// encodeRune returns the UTF-16 surrogate pair r1, r2 for the given rune.
// If the rune is not a valid Unicode code point or does not need encoding,
// EncodeRune returns U+FFFD, U+FFFD.
pub fn encodeRune(r: i32) Pair {
if (r < surrSelf or r > max_rune) {
return Pair{ .r1 = replacement_rune, .r2 = replacement_rune };
}
const rn = r - surrSelf;
return Pair{ .r1 = surr1 + ((rn >> 10) & 0x3ff), .r2 = surr2 + (rn & 0x3ff) };
}
// encode returns the UTF-16 encoding of the Unicode code point sequence s. It
// is up to the caller to free the returned slice from the allocator a when done.
pub fn encode(allocator: *mem.Allocator, s: []const i32) !ArrayUTF16 {
var n: usize = s.len;
for (s) |v| {
if (v >= surrSelf) {
n += 1;
}
}
var list = ArrayUTF16.init(allocator);
try list.resize(n);
n = 0;
for (s) |v, id| {
if (0 <= v and v < surr1 or surr3 <= v and v < surrSelf) {
list.items[n] = @intCast(u16, v);
n += 1;
} else if (surrSelf <= v and v <= max_rune) {
const r = encodeRune(v);
list.items[n] = @intCast(u16, r.r1);
list.items[n + 1] = @intCast(u16, r.r2);
n += 2;
} else {
list.items[n] = @intCast(u16, replacement_rune);
n += 1;
}
}
list.shrink(n);
return list;
}
// decode returns the Unicode code point sequence represented
// by the UTF-16 encoding s.
pub fn decode(a: *mem.Allocator, s: []u16) !ArrayUTF8 {
var list = ArrayUTF8.init(a);
try list.resize(s.len);
var n = 0;
var i: usize = 0;
while (i < s.len) : (i += 1) {
const r = @intCast(i32, s[i]);
if (r < surr1 or surr3 <= r) {
//normal rune
list.items[n] = r;
} else if (surr1 <= r and r < surr2 and i + 1 < len(s) and surr2 <= s[i + 1] and s[i + 1] < surr3) {
// valid surrogate sequence
list.items[n] = decodeRune(r, @intCast(i32, s[i + 1]));
i += 1;
} else {
list.items[n] = replacement_rune;
}
n += 1;
}
list.shrink(n);
return list;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/utf8_test.zig | const std = @import("std");
const unicode = @import("zunicode.zig");
const utf8 = @import("utf8.zig");
const t = std.testing;
test "init" {
t.expectEqual(utf8.max_rune, unicode.tables.max_rune);
t.expectEqual(utf8.rune_error, unicode.tables.replacement_char);
}
const Utf8Map = struct {
r: i32,
str: []const u8,
fn init(r: i32, str: []const u8) Utf8Map {
return Utf8Map{ .r = r, .str = str };
}
};
const utf8_map = [_]Utf8Map{
Utf8Map.init(0x0000, "\x00"),
Utf8Map.init(0x0001, "\x01"),
Utf8Map.init(0x007e, "\x7e"),
Utf8Map.init(0x007f, "\x7f"),
Utf8Map.init(0x0080, "\xc2\x80"),
Utf8Map.init(0x0081, "\xc2\x81"),
Utf8Map.init(0x00bf, "\xc2\xbf"),
Utf8Map.init(0x00c0, "\xc3\x80"),
Utf8Map.init(0x00c1, "\xc3\x81"),
Utf8Map.init(0x00c8, "\xc3\x88"),
Utf8Map.init(0x00d0, "\xc3\x90"),
Utf8Map.init(0x00e0, "\xc3\xa0"),
Utf8Map.init(0x00f0, "\xc3\xb0"),
Utf8Map.init(0x00f8, "\xc3\xb8"),
Utf8Map.init(0x00ff, "\xc3\xbf"),
Utf8Map.init(0x0100, "\xc4\x80"),
Utf8Map.init(0x07ff, "\xdf\xbf"),
Utf8Map.init(0x0400, "\xd0\x80"),
Utf8Map.init(0x0800, "\xe0\xa0\x80"),
Utf8Map.init(0x0801, "\xe0\xa0\x81"),
Utf8Map.init(0x1000, "\xe1\x80\x80"),
Utf8Map.init(0xd000, "\xed\x80\x80"),
Utf8Map.init(0xd7ff, "\xed\x9f\xbf"), // last code point before surrogate half.
Utf8Map.init(0xe000, "\xee\x80\x80"), // first code point after surrogate half.
Utf8Map.init(0xfffe, "\xef\xbf\xbe"),
Utf8Map.init(0xffff, "\xef\xbf\xbf"),
Utf8Map.init(0x10000, "\xf0\x90\x80\x80"),
Utf8Map.init(0x10001, "\xf0\x90\x80\x81"),
Utf8Map.init(0x40000, "\xf1\x80\x80\x80"),
Utf8Map.init(0x10fffe, "\xf4\x8f\xbf\xbe"),
Utf8Map.init(0x10ffff, "\xf4\x8f\xbf\xbf"),
Utf8Map.init(0xFFFD, "\xef\xbf\xbd"),
};
const surrogete_map = [_]Utf8Map{
Utf8Map.init(0xd800, "\xed\xa0\x80"),
Utf8Map.init(0xdfff, "\xed\xbf\xbf"),
};
const test_strings = [][]const u8{
"",
"abcd",
"☺☻☹",
"日a本b語ç日ð本Ê語þ日¥本¼語i日©",
"日a本b語ç日ð本Ê語þ日¥本¼語i日©日a本b語ç日ð本Ê語þ日¥本¼語i日©日a本b語ç日ð本Ê語þ日¥本¼語i日©",
"\x80\x80\x80\x80",
};
test "fullRune" {
for (utf8_map) |m| {
t.expectEqual(true, utf8.fullRune(m.str));
}
const sample = [_][]const u8{ "\xc0", "\xc1" };
for (sample) |m| {
t.expectEqual(true, utf8.fullRune(m));
}
}
test "encodeRune" {
for (utf8_map) |m, idx| {
var buf = [_]u8{0} ** 10;
const n = try utf8.encodeRune(buf[0..], m.r);
const ok = std.mem.eql(u8, buf[0..n], m.str);
t.expectEqualSlices(u8, m.str, buf[0..n]);
}
}
test "decodeRune" {
for (utf8_map) |m| {
const r = try utf8.decodeRune(m.str);
t.expectEqual(m.r, r.value);
t.expectEqual(m.str.len, r.size);
}
}
test "surrogateRune" {
for (surrogete_map) |m| {
t.expectError(error.RuneError, utf8.decodeRune(m.str));
}
}
test "Iterator" {
const source = "a,b,c";
var iter = utf8.Iterator.init(source);
var a = try iter.next();
t.expect(a != null);
t.expect('a' == a.?.value);
_ = try iter.next();
a = try iter.next();
t.expect(a != null);
t.expect(a != null);
t.expect('b' == a.?.value);
_ = try iter.next();
_ = try iter.next();
a = try iter.next();
t.expect(a == null);
iter.reset(0);
a = try iter.peek();
t.expect(a != null);
const b = try iter.next();
t.expect(b != null);
t.expectEqual(a.?.value, b.?.value);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/all_test.zig | test "all" {
_ = @import("./zunicode_test.zig");
_ = @import("./utf8_test.zig");
_ = @import("./utf16_test.zig");
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/tables.zig | // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by maketables; DO NOT EDIT.
// To regenerate, run:
// maketables --tables=all --data=http://www.unicode.org/Public/10.0.0/ucd/UnicodeData.txt --casefolding=http://www.unicode.org/Public/10.0.0/ucd/CaseFolding.txt
pub const max_rune: i32 = 0x10ffff;
pub const replacement_char: i32 = 0xfffd;
pub const max_ascii: i32 = 0x7f;
pub const max_latin1: i32 = 0xff;
pub const pC: u8 = 1;
pub const pP: u8 = 2;
pub const pN: u8 = 4;
pub const pS: u8 = 8;
pub const pZ: u8 = 16;
pub const pLu: u8 = 32;
pub const pLl: u8 = 64;
pub const pp: u8 = 128;
pub const pg: u8 = 144;
pub const pLo: u8 = 96;
pub const pLmask: u8 = 96;
/// If the Delta field of a CaseRange is UpperLower, it means
/// this CaseRange represents a sequence of the form (say)
/// Upper Lower Upper Lower.
pub const upper_lower: i32 = @intCast(i32, max_rune) + 1;
pub const RangeTable = struct {
r16: []Range16,
r32: []Range32,
latin_offset: usize,
};
pub const Range16 = struct {
lo: u16,
hi: u16,
stride: u16,
pub fn init(lo: u16, hi: u16, stride: u16) Range16 {
return Range16{ .lo = lo, .hi = hi, .stride = stride };
}
};
pub const Range32 = struct {
lo: u32,
hi: u32,
stride: u32,
pub fn init(lo: u32, hi: u32, stride: u32) Range32 {
return Range32{ .lo = lo, .hi = hi, .stride = stride };
}
};
pub const Case = enum(usize) {
Upper,
Lower,
Title,
Max,
pub fn rune(self: Case) i32 {
return @intCast(i32, @enumToInt(self));
}
};
pub const CaseRange = struct {
lo: u32,
hi: u32,
delta: []const i32,
pub fn init(lo: u32, hi: u32, delta: []const i32) CaseRange {
return CaseRange{ .lo = lo, .hi = hi, .delta = delta };
}
};
pub const linear_max: usize = 18;
pub const FoldPair = struct {
from: u16,
to: u16,
pub fn init(from: u16, to: u16) FoldPair {
return FoldPair{ .from = from, .to = to };
}
};
// Version is the Unicode edition from which the tables are derived.
pub const Version = "10.0.0";
// Categories is the set of Unicode category tables.
pub const Category = enum {
C,
Cc,
Cf,
Co,
Cs,
L,
Ll,
Lm,
Lo,
Lt,
Lu,
M,
Mc,
Me,
Mn,
N,
Nd,
Nl,
No,
P,
Pc,
Pd,
Pe,
Pf,
Pi,
Po,
Ps,
S,
Sc,
Sk,
Sm,
So,
Z,
Zl,
Zp,
Zs,
pub fn table(self: Category) *RangeTable {
return switch (self) {
Category.C => C,
Category.Cc => Cc,
Category.Cf => Cf,
Category.Co => Co,
Category.Cs => Cs,
Category.L => L,
Category.Ll => Ll,
Category.Lm => Lm,
Category.Lo => Lo,
Category.Lt => Lt,
Category.Lu => Lu,
Category.M => M,
Category.Mc => Mc,
Category.Me => Me,
Category.Mn => Mn,
Category.N => N,
Category.Nd => Nd,
Category.Nl => Nl,
Category.No => No,
Category.P => P,
Category.Pc => Pc,
Category.Pd => Pd,
Category.Pe => Pe,
Category.Pf => Pf,
Category.Pi => Pi,
Category.Po => Po,
Category.Ps => Ps,
Category.S => S,
Category.Sc => Sc,
Category.Sk => Sk,
Category.Sm => Sm,
Category.So => So,
Category.Z => Z,
Category.Zl => Zl,
Category.Zp => Zp,
Category.Zs => Zs,
else => unreachable,
};
}
pub fn list() []Category {
return []Category{ Category.C, Category.Cc, Category.Cf, Category.Co, Category.Cs, Category.L, Category.Ll, Category.Lm, Category.Lo, Category.Lt, Category.Lu, Category.M, Category.Mc, Category.Me, Category.Mn, Category.N, Category.Nd, Category.Nl, Category.No, Category.P, Category.Pc, Category.Pd, Category.Pe, Category.Pf, Category.Pi, Category.Po, Category.Ps, Category.S, Category.Sc, Category.Sk, Category.Sm, Category.So, Category.Z, Category.Zl, Category.Zp, Category.Zs };
}
};
const _C = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0000, 0x001f, 1),
Range16.init(0x007f, 0x009f, 1),
Range16.init(0x00ad, 0x0600, 1363),
Range16.init(0x0601, 0x0605, 1),
Range16.init(0x061c, 0x06dd, 193),
Range16.init(0x070f, 0x08e2, 467),
Range16.init(0x180e, 0x200b, 2045),
Range16.init(0x200c, 0x200f, 1),
Range16.init(0x202a, 0x202e, 1),
Range16.init(0x2060, 0x2064, 1),
Range16.init(0x2066, 0x206f, 1),
Range16.init(0xd800, 0xf8ff, 1),
Range16.init(0xfeff, 0xfff9, 250),
Range16.init(0xfffa, 0xfffb, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x110bd, 0x1bca0, 44003),
Range32.init(0x1bca1, 0x1bca3, 1),
Range32.init(0x1d173, 0x1d17a, 1),
Range32.init(0xe0001, 0xe0020, 31),
Range32.init(0xe0021, 0xe007f, 1),
Range32.init(0xf0000, 0xffffd, 1),
Range32.init(0x100000, 0x10fffd, 1),
};
break :init r[0..];
},
.latin_offset = 2,
};
const _Cc = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0000, 0x001f, 1),
Range16.init(0x007f, 0x009f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 2,
};
const _Cf = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00ad, 0x0600, 1363),
Range16.init(0x0601, 0x0605, 1),
Range16.init(0x061c, 0x06dd, 193),
Range16.init(0x070f, 0x08e2, 467),
Range16.init(0x180e, 0x200b, 2045),
Range16.init(0x200c, 0x200f, 1),
Range16.init(0x202a, 0x202e, 1),
Range16.init(0x2060, 0x2064, 1),
Range16.init(0x2066, 0x206f, 1),
Range16.init(0xfeff, 0xfff9, 250),
Range16.init(0xfffa, 0xfffb, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x110bd, 0x1bca0, 44003),
Range32.init(0x1bca1, 0x1bca3, 1),
Range32.init(0x1d173, 0x1d17a, 1),
Range32.init(0xe0001, 0xe0020, 31),
Range32.init(0xe0021, 0xe007f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Co = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xe000, 0xf8ff, 1)};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0xf0000, 0xffffd, 1),
Range32.init(0x100000, 0x10fffd, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Cs = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xd800, 0xdfff, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _L = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0041, 0x005a, 1),
Range16.init(0x0061, 0x007a, 1),
Range16.init(0x00aa, 0x00b5, 11),
Range16.init(0x00ba, 0x00c0, 6),
Range16.init(0x00c1, 0x00d6, 1),
Range16.init(0x00d8, 0x00f6, 1),
Range16.init(0x00f8, 0x02c1, 1),
Range16.init(0x02c6, 0x02d1, 1),
Range16.init(0x02e0, 0x02e4, 1),
Range16.init(0x02ec, 0x02ee, 2),
Range16.init(0x0370, 0x0374, 1),
Range16.init(0x0376, 0x0377, 1),
Range16.init(0x037a, 0x037d, 1),
Range16.init(0x037f, 0x0386, 7),
Range16.init(0x0388, 0x038a, 1),
Range16.init(0x038c, 0x038e, 2),
Range16.init(0x038f, 0x03a1, 1),
Range16.init(0x03a3, 0x03f5, 1),
Range16.init(0x03f7, 0x0481, 1),
Range16.init(0x048a, 0x052f, 1),
Range16.init(0x0531, 0x0556, 1),
Range16.init(0x0559, 0x0561, 8),
Range16.init(0x0562, 0x0587, 1),
Range16.init(0x05d0, 0x05ea, 1),
Range16.init(0x05f0, 0x05f2, 1),
Range16.init(0x0620, 0x064a, 1),
Range16.init(0x066e, 0x066f, 1),
Range16.init(0x0671, 0x06d3, 1),
Range16.init(0x06d5, 0x06e5, 16),
Range16.init(0x06e6, 0x06ee, 8),
Range16.init(0x06ef, 0x06fa, 11),
Range16.init(0x06fb, 0x06fc, 1),
Range16.init(0x06ff, 0x0710, 17),
Range16.init(0x0712, 0x072f, 1),
Range16.init(0x074d, 0x07a5, 1),
Range16.init(0x07b1, 0x07ca, 25),
Range16.init(0x07cb, 0x07ea, 1),
Range16.init(0x07f4, 0x07f5, 1),
Range16.init(0x07fa, 0x0800, 6),
Range16.init(0x0801, 0x0815, 1),
Range16.init(0x081a, 0x0824, 10),
Range16.init(0x0828, 0x0840, 24),
Range16.init(0x0841, 0x0858, 1),
Range16.init(0x0860, 0x086a, 1),
Range16.init(0x08a0, 0x08b4, 1),
Range16.init(0x08b6, 0x08bd, 1),
Range16.init(0x0904, 0x0939, 1),
Range16.init(0x093d, 0x0950, 19),
Range16.init(0x0958, 0x0961, 1),
Range16.init(0x0971, 0x0980, 1),
Range16.init(0x0985, 0x098c, 1),
Range16.init(0x098f, 0x0990, 1),
Range16.init(0x0993, 0x09a8, 1),
Range16.init(0x09aa, 0x09b0, 1),
Range16.init(0x09b2, 0x09b6, 4),
Range16.init(0x09b7, 0x09b9, 1),
Range16.init(0x09bd, 0x09ce, 17),
Range16.init(0x09dc, 0x09dd, 1),
Range16.init(0x09df, 0x09e1, 1),
Range16.init(0x09f0, 0x09f1, 1),
Range16.init(0x09fc, 0x0a05, 9),
Range16.init(0x0a06, 0x0a0a, 1),
Range16.init(0x0a0f, 0x0a10, 1),
Range16.init(0x0a13, 0x0a28, 1),
Range16.init(0x0a2a, 0x0a30, 1),
Range16.init(0x0a32, 0x0a33, 1),
Range16.init(0x0a35, 0x0a36, 1),
Range16.init(0x0a38, 0x0a39, 1),
Range16.init(0x0a59, 0x0a5c, 1),
Range16.init(0x0a5e, 0x0a72, 20),
Range16.init(0x0a73, 0x0a74, 1),
Range16.init(0x0a85, 0x0a8d, 1),
Range16.init(0x0a8f, 0x0a91, 1),
Range16.init(0x0a93, 0x0aa8, 1),
Range16.init(0x0aaa, 0x0ab0, 1),
Range16.init(0x0ab2, 0x0ab3, 1),
Range16.init(0x0ab5, 0x0ab9, 1),
Range16.init(0x0abd, 0x0ad0, 19),
Range16.init(0x0ae0, 0x0ae1, 1),
Range16.init(0x0af9, 0x0b05, 12),
Range16.init(0x0b06, 0x0b0c, 1),
Range16.init(0x0b0f, 0x0b10, 1),
Range16.init(0x0b13, 0x0b28, 1),
Range16.init(0x0b2a, 0x0b30, 1),
Range16.init(0x0b32, 0x0b33, 1),
Range16.init(0x0b35, 0x0b39, 1),
Range16.init(0x0b3d, 0x0b5c, 31),
Range16.init(0x0b5d, 0x0b5f, 2),
Range16.init(0x0b60, 0x0b61, 1),
Range16.init(0x0b71, 0x0b83, 18),
Range16.init(0x0b85, 0x0b8a, 1),
Range16.init(0x0b8e, 0x0b90, 1),
Range16.init(0x0b92, 0x0b95, 1),
Range16.init(0x0b99, 0x0b9a, 1),
Range16.init(0x0b9c, 0x0b9e, 2),
Range16.init(0x0b9f, 0x0ba3, 4),
Range16.init(0x0ba4, 0x0ba8, 4),
Range16.init(0x0ba9, 0x0baa, 1),
Range16.init(0x0bae, 0x0bb9, 1),
Range16.init(0x0bd0, 0x0c05, 53),
Range16.init(0x0c06, 0x0c0c, 1),
Range16.init(0x0c0e, 0x0c10, 1),
Range16.init(0x0c12, 0x0c28, 1),
Range16.init(0x0c2a, 0x0c39, 1),
Range16.init(0x0c3d, 0x0c58, 27),
Range16.init(0x0c59, 0x0c5a, 1),
Range16.init(0x0c60, 0x0c61, 1),
Range16.init(0x0c80, 0x0c85, 5),
Range16.init(0x0c86, 0x0c8c, 1),
Range16.init(0x0c8e, 0x0c90, 1),
Range16.init(0x0c92, 0x0ca8, 1),
Range16.init(0x0caa, 0x0cb3, 1),
Range16.init(0x0cb5, 0x0cb9, 1),
Range16.init(0x0cbd, 0x0cde, 33),
Range16.init(0x0ce0, 0x0ce1, 1),
Range16.init(0x0cf1, 0x0cf2, 1),
Range16.init(0x0d05, 0x0d0c, 1),
Range16.init(0x0d0e, 0x0d10, 1),
Range16.init(0x0d12, 0x0d3a, 1),
Range16.init(0x0d3d, 0x0d4e, 17),
Range16.init(0x0d54, 0x0d56, 1),
Range16.init(0x0d5f, 0x0d61, 1),
Range16.init(0x0d7a, 0x0d7f, 1),
Range16.init(0x0d85, 0x0d96, 1),
Range16.init(0x0d9a, 0x0db1, 1),
Range16.init(0x0db3, 0x0dbb, 1),
Range16.init(0x0dbd, 0x0dc0, 3),
Range16.init(0x0dc1, 0x0dc6, 1),
Range16.init(0x0e01, 0x0e30, 1),
Range16.init(0x0e32, 0x0e33, 1),
Range16.init(0x0e40, 0x0e46, 1),
Range16.init(0x0e81, 0x0e82, 1),
Range16.init(0x0e84, 0x0e87, 3),
Range16.init(0x0e88, 0x0e8a, 2),
Range16.init(0x0e8d, 0x0e94, 7),
Range16.init(0x0e95, 0x0e97, 1),
Range16.init(0x0e99, 0x0e9f, 1),
Range16.init(0x0ea1, 0x0ea3, 1),
Range16.init(0x0ea5, 0x0ea7, 2),
Range16.init(0x0eaa, 0x0eab, 1),
Range16.init(0x0ead, 0x0eb0, 1),
Range16.init(0x0eb2, 0x0eb3, 1),
Range16.init(0x0ebd, 0x0ec0, 3),
Range16.init(0x0ec1, 0x0ec4, 1),
Range16.init(0x0ec6, 0x0edc, 22),
Range16.init(0x0edd, 0x0edf, 1),
Range16.init(0x0f00, 0x0f40, 64),
Range16.init(0x0f41, 0x0f47, 1),
Range16.init(0x0f49, 0x0f6c, 1),
Range16.init(0x0f88, 0x0f8c, 1),
Range16.init(0x1000, 0x102a, 1),
Range16.init(0x103f, 0x1050, 17),
Range16.init(0x1051, 0x1055, 1),
Range16.init(0x105a, 0x105d, 1),
Range16.init(0x1061, 0x1065, 4),
Range16.init(0x1066, 0x106e, 8),
Range16.init(0x106f, 0x1070, 1),
Range16.init(0x1075, 0x1081, 1),
Range16.init(0x108e, 0x10a0, 18),
Range16.init(0x10a1, 0x10c5, 1),
Range16.init(0x10c7, 0x10cd, 6),
Range16.init(0x10d0, 0x10fa, 1),
Range16.init(0x10fc, 0x1248, 1),
Range16.init(0x124a, 0x124d, 1),
Range16.init(0x1250, 0x1256, 1),
Range16.init(0x1258, 0x125a, 2),
Range16.init(0x125b, 0x125d, 1),
Range16.init(0x1260, 0x1288, 1),
Range16.init(0x128a, 0x128d, 1),
Range16.init(0x1290, 0x12b0, 1),
Range16.init(0x12b2, 0x12b5, 1),
Range16.init(0x12b8, 0x12be, 1),
Range16.init(0x12c0, 0x12c2, 2),
Range16.init(0x12c3, 0x12c5, 1),
Range16.init(0x12c8, 0x12d6, 1),
Range16.init(0x12d8, 0x1310, 1),
Range16.init(0x1312, 0x1315, 1),
Range16.init(0x1318, 0x135a, 1),
Range16.init(0x1380, 0x138f, 1),
Range16.init(0x13a0, 0x13f5, 1),
Range16.init(0x13f8, 0x13fd, 1),
Range16.init(0x1401, 0x166c, 1),
Range16.init(0x166f, 0x167f, 1),
Range16.init(0x1681, 0x169a, 1),
Range16.init(0x16a0, 0x16ea, 1),
Range16.init(0x16f1, 0x16f8, 1),
Range16.init(0x1700, 0x170c, 1),
Range16.init(0x170e, 0x1711, 1),
Range16.init(0x1720, 0x1731, 1),
Range16.init(0x1740, 0x1751, 1),
Range16.init(0x1760, 0x176c, 1),
Range16.init(0x176e, 0x1770, 1),
Range16.init(0x1780, 0x17b3, 1),
Range16.init(0x17d7, 0x17dc, 5),
Range16.init(0x1820, 0x1877, 1),
Range16.init(0x1880, 0x1884, 1),
Range16.init(0x1887, 0x18a8, 1),
Range16.init(0x18aa, 0x18b0, 6),
Range16.init(0x18b1, 0x18f5, 1),
Range16.init(0x1900, 0x191e, 1),
Range16.init(0x1950, 0x196d, 1),
Range16.init(0x1970, 0x1974, 1),
Range16.init(0x1980, 0x19ab, 1),
Range16.init(0x19b0, 0x19c9, 1),
Range16.init(0x1a00, 0x1a16, 1),
Range16.init(0x1a20, 0x1a54, 1),
Range16.init(0x1aa7, 0x1b05, 94),
Range16.init(0x1b06, 0x1b33, 1),
Range16.init(0x1b45, 0x1b4b, 1),
Range16.init(0x1b83, 0x1ba0, 1),
Range16.init(0x1bae, 0x1baf, 1),
Range16.init(0x1bba, 0x1be5, 1),
Range16.init(0x1c00, 0x1c23, 1),
Range16.init(0x1c4d, 0x1c4f, 1),
Range16.init(0x1c5a, 0x1c7d, 1),
Range16.init(0x1c80, 0x1c88, 1),
Range16.init(0x1ce9, 0x1cec, 1),
Range16.init(0x1cee, 0x1cf1, 1),
Range16.init(0x1cf5, 0x1cf6, 1),
Range16.init(0x1d00, 0x1dbf, 1),
Range16.init(0x1e00, 0x1f15, 1),
Range16.init(0x1f18, 0x1f1d, 1),
Range16.init(0x1f20, 0x1f45, 1),
Range16.init(0x1f48, 0x1f4d, 1),
Range16.init(0x1f50, 0x1f57, 1),
Range16.init(0x1f59, 0x1f5f, 2),
Range16.init(0x1f60, 0x1f7d, 1),
Range16.init(0x1f80, 0x1fb4, 1),
Range16.init(0x1fb6, 0x1fbc, 1),
Range16.init(0x1fbe, 0x1fc2, 4),
Range16.init(0x1fc3, 0x1fc4, 1),
Range16.init(0x1fc6, 0x1fcc, 1),
Range16.init(0x1fd0, 0x1fd3, 1),
Range16.init(0x1fd6, 0x1fdb, 1),
Range16.init(0x1fe0, 0x1fec, 1),
Range16.init(0x1ff2, 0x1ff4, 1),
Range16.init(0x1ff6, 0x1ffc, 1),
Range16.init(0x2071, 0x207f, 14),
Range16.init(0x2090, 0x209c, 1),
Range16.init(0x2102, 0x2107, 5),
Range16.init(0x210a, 0x2113, 1),
Range16.init(0x2115, 0x2119, 4),
Range16.init(0x211a, 0x211d, 1),
Range16.init(0x2124, 0x212a, 2),
Range16.init(0x212b, 0x212d, 1),
Range16.init(0x212f, 0x2139, 1),
Range16.init(0x213c, 0x213f, 1),
Range16.init(0x2145, 0x2149, 1),
Range16.init(0x214e, 0x2183, 53),
Range16.init(0x2184, 0x2c00, 2684),
Range16.init(0x2c01, 0x2c2e, 1),
Range16.init(0x2c30, 0x2c5e, 1),
Range16.init(0x2c60, 0x2ce4, 1),
Range16.init(0x2ceb, 0x2cee, 1),
Range16.init(0x2cf2, 0x2cf3, 1),
Range16.init(0x2d00, 0x2d25, 1),
Range16.init(0x2d27, 0x2d2d, 6),
Range16.init(0x2d30, 0x2d67, 1),
Range16.init(0x2d6f, 0x2d80, 17),
Range16.init(0x2d81, 0x2d96, 1),
Range16.init(0x2da0, 0x2da6, 1),
Range16.init(0x2da8, 0x2dae, 1),
Range16.init(0x2db0, 0x2db6, 1),
Range16.init(0x2db8, 0x2dbe, 1),
Range16.init(0x2dc0, 0x2dc6, 1),
Range16.init(0x2dc8, 0x2dce, 1),
Range16.init(0x2dd0, 0x2dd6, 1),
Range16.init(0x2dd8, 0x2dde, 1),
Range16.init(0x2e2f, 0x3005, 470),
Range16.init(0x3006, 0x3031, 43),
Range16.init(0x3032, 0x3035, 1),
Range16.init(0x303b, 0x303c, 1),
Range16.init(0x3041, 0x3096, 1),
Range16.init(0x309d, 0x309f, 1),
Range16.init(0x30a1, 0x30fa, 1),
Range16.init(0x30fc, 0x30ff, 1),
Range16.init(0x3105, 0x312e, 1),
Range16.init(0x3131, 0x318e, 1),
Range16.init(0x31a0, 0x31ba, 1),
Range16.init(0x31f0, 0x31ff, 1),
Range16.init(0x3400, 0x4db5, 1),
Range16.init(0x4e00, 0x9fea, 1),
Range16.init(0xa000, 0xa48c, 1),
Range16.init(0xa4d0, 0xa4fd, 1),
Range16.init(0xa500, 0xa60c, 1),
Range16.init(0xa610, 0xa61f, 1),
Range16.init(0xa62a, 0xa62b, 1),
Range16.init(0xa640, 0xa66e, 1),
Range16.init(0xa67f, 0xa69d, 1),
Range16.init(0xa6a0, 0xa6e5, 1),
Range16.init(0xa717, 0xa71f, 1),
Range16.init(0xa722, 0xa788, 1),
Range16.init(0xa78b, 0xa7ae, 1),
Range16.init(0xa7b0, 0xa7b7, 1),
Range16.init(0xa7f7, 0xa801, 1),
Range16.init(0xa803, 0xa805, 1),
Range16.init(0xa807, 0xa80a, 1),
Range16.init(0xa80c, 0xa822, 1),
Range16.init(0xa840, 0xa873, 1),
Range16.init(0xa882, 0xa8b3, 1),
Range16.init(0xa8f2, 0xa8f7, 1),
Range16.init(0xa8fb, 0xa8fd, 2),
Range16.init(0xa90a, 0xa925, 1),
Range16.init(0xa930, 0xa946, 1),
Range16.init(0xa960, 0xa97c, 1),
Range16.init(0xa984, 0xa9b2, 1),
Range16.init(0xa9cf, 0xa9e0, 17),
Range16.init(0xa9e1, 0xa9e4, 1),
Range16.init(0xa9e6, 0xa9ef, 1),
Range16.init(0xa9fa, 0xa9fe, 1),
Range16.init(0xaa00, 0xaa28, 1),
Range16.init(0xaa40, 0xaa42, 1),
Range16.init(0xaa44, 0xaa4b, 1),
Range16.init(0xaa60, 0xaa76, 1),
Range16.init(0xaa7a, 0xaa7e, 4),
Range16.init(0xaa7f, 0xaaaf, 1),
Range16.init(0xaab1, 0xaab5, 4),
Range16.init(0xaab6, 0xaab9, 3),
Range16.init(0xaaba, 0xaabd, 1),
Range16.init(0xaac0, 0xaac2, 2),
Range16.init(0xaadb, 0xaadd, 1),
Range16.init(0xaae0, 0xaaea, 1),
Range16.init(0xaaf2, 0xaaf4, 1),
Range16.init(0xab01, 0xab06, 1),
Range16.init(0xab09, 0xab0e, 1),
Range16.init(0xab11, 0xab16, 1),
Range16.init(0xab20, 0xab26, 1),
Range16.init(0xab28, 0xab2e, 1),
Range16.init(0xab30, 0xab5a, 1),
Range16.init(0xab5c, 0xab65, 1),
Range16.init(0xab70, 0xabe2, 1),
Range16.init(0xac00, 0xd7a3, 1),
Range16.init(0xd7b0, 0xd7c6, 1),
Range16.init(0xd7cb, 0xd7fb, 1),
Range16.init(0xf900, 0xfa6d, 1),
Range16.init(0xfa70, 0xfad9, 1),
Range16.init(0xfb00, 0xfb06, 1),
Range16.init(0xfb13, 0xfb17, 1),
Range16.init(0xfb1d, 0xfb1f, 2),
Range16.init(0xfb20, 0xfb28, 1),
Range16.init(0xfb2a, 0xfb36, 1),
Range16.init(0xfb38, 0xfb3c, 1),
Range16.init(0xfb3e, 0xfb40, 2),
Range16.init(0xfb41, 0xfb43, 2),
Range16.init(0xfb44, 0xfb46, 2),
Range16.init(0xfb47, 0xfbb1, 1),
Range16.init(0xfbd3, 0xfd3d, 1),
Range16.init(0xfd50, 0xfd8f, 1),
Range16.init(0xfd92, 0xfdc7, 1),
Range16.init(0xfdf0, 0xfdfb, 1),
Range16.init(0xfe70, 0xfe74, 1),
Range16.init(0xfe76, 0xfefc, 1),
Range16.init(0xff21, 0xff3a, 1),
Range16.init(0xff41, 0xff5a, 1),
Range16.init(0xff66, 0xffbe, 1),
Range16.init(0xffc2, 0xffc7, 1),
Range16.init(0xffca, 0xffcf, 1),
Range16.init(0xffd2, 0xffd7, 1),
Range16.init(0xffda, 0xffdc, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10000, 0x1000b, 1),
Range32.init(0x1000d, 0x10026, 1),
Range32.init(0x10028, 0x1003a, 1),
Range32.init(0x1003c, 0x1003d, 1),
Range32.init(0x1003f, 0x1004d, 1),
Range32.init(0x10050, 0x1005d, 1),
Range32.init(0x10080, 0x100fa, 1),
Range32.init(0x10280, 0x1029c, 1),
Range32.init(0x102a0, 0x102d0, 1),
Range32.init(0x10300, 0x1031f, 1),
Range32.init(0x1032d, 0x10340, 1),
Range32.init(0x10342, 0x10349, 1),
Range32.init(0x10350, 0x10375, 1),
Range32.init(0x10380, 0x1039d, 1),
Range32.init(0x103a0, 0x103c3, 1),
Range32.init(0x103c8, 0x103cf, 1),
Range32.init(0x10400, 0x1049d, 1),
Range32.init(0x104b0, 0x104d3, 1),
Range32.init(0x104d8, 0x104fb, 1),
Range32.init(0x10500, 0x10527, 1),
Range32.init(0x10530, 0x10563, 1),
Range32.init(0x10600, 0x10736, 1),
Range32.init(0x10740, 0x10755, 1),
Range32.init(0x10760, 0x10767, 1),
Range32.init(0x10800, 0x10805, 1),
Range32.init(0x10808, 0x1080a, 2),
Range32.init(0x1080b, 0x10835, 1),
Range32.init(0x10837, 0x10838, 1),
Range32.init(0x1083c, 0x1083f, 3),
Range32.init(0x10840, 0x10855, 1),
Range32.init(0x10860, 0x10876, 1),
Range32.init(0x10880, 0x1089e, 1),
Range32.init(0x108e0, 0x108f2, 1),
Range32.init(0x108f4, 0x108f5, 1),
Range32.init(0x10900, 0x10915, 1),
Range32.init(0x10920, 0x10939, 1),
Range32.init(0x10980, 0x109b7, 1),
Range32.init(0x109be, 0x109bf, 1),
Range32.init(0x10a00, 0x10a10, 16),
Range32.init(0x10a11, 0x10a13, 1),
Range32.init(0x10a15, 0x10a17, 1),
Range32.init(0x10a19, 0x10a33, 1),
Range32.init(0x10a60, 0x10a7c, 1),
Range32.init(0x10a80, 0x10a9c, 1),
Range32.init(0x10ac0, 0x10ac7, 1),
Range32.init(0x10ac9, 0x10ae4, 1),
Range32.init(0x10b00, 0x10b35, 1),
Range32.init(0x10b40, 0x10b55, 1),
Range32.init(0x10b60, 0x10b72, 1),
Range32.init(0x10b80, 0x10b91, 1),
Range32.init(0x10c00, 0x10c48, 1),
Range32.init(0x10c80, 0x10cb2, 1),
Range32.init(0x10cc0, 0x10cf2, 1),
Range32.init(0x11003, 0x11037, 1),
Range32.init(0x11083, 0x110af, 1),
Range32.init(0x110d0, 0x110e8, 1),
Range32.init(0x11103, 0x11126, 1),
Range32.init(0x11150, 0x11172, 1),
Range32.init(0x11176, 0x11183, 13),
Range32.init(0x11184, 0x111b2, 1),
Range32.init(0x111c1, 0x111c4, 1),
Range32.init(0x111da, 0x111dc, 2),
Range32.init(0x11200, 0x11211, 1),
Range32.init(0x11213, 0x1122b, 1),
Range32.init(0x11280, 0x11286, 1),
Range32.init(0x11288, 0x1128a, 2),
Range32.init(0x1128b, 0x1128d, 1),
Range32.init(0x1128f, 0x1129d, 1),
Range32.init(0x1129f, 0x112a8, 1),
Range32.init(0x112b0, 0x112de, 1),
Range32.init(0x11305, 0x1130c, 1),
Range32.init(0x1130f, 0x11310, 1),
Range32.init(0x11313, 0x11328, 1),
Range32.init(0x1132a, 0x11330, 1),
Range32.init(0x11332, 0x11333, 1),
Range32.init(0x11335, 0x11339, 1),
Range32.init(0x1133d, 0x11350, 19),
Range32.init(0x1135d, 0x11361, 1),
Range32.init(0x11400, 0x11434, 1),
Range32.init(0x11447, 0x1144a, 1),
Range32.init(0x11480, 0x114af, 1),
Range32.init(0x114c4, 0x114c5, 1),
Range32.init(0x114c7, 0x11580, 185),
Range32.init(0x11581, 0x115ae, 1),
Range32.init(0x115d8, 0x115db, 1),
Range32.init(0x11600, 0x1162f, 1),
Range32.init(0x11644, 0x11680, 60),
Range32.init(0x11681, 0x116aa, 1),
Range32.init(0x11700, 0x11719, 1),
Range32.init(0x118a0, 0x118df, 1),
Range32.init(0x118ff, 0x11a00, 257),
Range32.init(0x11a0b, 0x11a32, 1),
Range32.init(0x11a3a, 0x11a50, 22),
Range32.init(0x11a5c, 0x11a83, 1),
Range32.init(0x11a86, 0x11a89, 1),
Range32.init(0x11ac0, 0x11af8, 1),
Range32.init(0x11c00, 0x11c08, 1),
Range32.init(0x11c0a, 0x11c2e, 1),
Range32.init(0x11c40, 0x11c72, 50),
Range32.init(0x11c73, 0x11c8f, 1),
Range32.init(0x11d00, 0x11d06, 1),
Range32.init(0x11d08, 0x11d09, 1),
Range32.init(0x11d0b, 0x11d30, 1),
Range32.init(0x11d46, 0x12000, 698),
Range32.init(0x12001, 0x12399, 1),
Range32.init(0x12480, 0x12543, 1),
Range32.init(0x13000, 0x1342e, 1),
Range32.init(0x14400, 0x14646, 1),
Range32.init(0x16800, 0x16a38, 1),
Range32.init(0x16a40, 0x16a5e, 1),
Range32.init(0x16ad0, 0x16aed, 1),
Range32.init(0x16b00, 0x16b2f, 1),
Range32.init(0x16b40, 0x16b43, 1),
Range32.init(0x16b63, 0x16b77, 1),
Range32.init(0x16b7d, 0x16b8f, 1),
Range32.init(0x16f00, 0x16f44, 1),
Range32.init(0x16f50, 0x16f93, 67),
Range32.init(0x16f94, 0x16f9f, 1),
Range32.init(0x16fe0, 0x16fe1, 1),
Range32.init(0x17000, 0x187ec, 1),
Range32.init(0x18800, 0x18af2, 1),
Range32.init(0x1b000, 0x1b11e, 1),
Range32.init(0x1b170, 0x1b2fb, 1),
Range32.init(0x1bc00, 0x1bc6a, 1),
Range32.init(0x1bc70, 0x1bc7c, 1),
Range32.init(0x1bc80, 0x1bc88, 1),
Range32.init(0x1bc90, 0x1bc99, 1),
Range32.init(0x1d400, 0x1d454, 1),
Range32.init(0x1d456, 0x1d49c, 1),
Range32.init(0x1d49e, 0x1d49f, 1),
Range32.init(0x1d4a2, 0x1d4a5, 3),
Range32.init(0x1d4a6, 0x1d4a9, 3),
Range32.init(0x1d4aa, 0x1d4ac, 1),
Range32.init(0x1d4ae, 0x1d4b9, 1),
Range32.init(0x1d4bb, 0x1d4bd, 2),
Range32.init(0x1d4be, 0x1d4c3, 1),
Range32.init(0x1d4c5, 0x1d505, 1),
Range32.init(0x1d507, 0x1d50a, 1),
Range32.init(0x1d50d, 0x1d514, 1),
Range32.init(0x1d516, 0x1d51c, 1),
Range32.init(0x1d51e, 0x1d539, 1),
Range32.init(0x1d53b, 0x1d53e, 1),
Range32.init(0x1d540, 0x1d544, 1),
Range32.init(0x1d546, 0x1d54a, 4),
Range32.init(0x1d54b, 0x1d550, 1),
Range32.init(0x1d552, 0x1d6a5, 1),
Range32.init(0x1d6a8, 0x1d6c0, 1),
Range32.init(0x1d6c2, 0x1d6da, 1),
Range32.init(0x1d6dc, 0x1d6fa, 1),
Range32.init(0x1d6fc, 0x1d714, 1),
Range32.init(0x1d716, 0x1d734, 1),
Range32.init(0x1d736, 0x1d74e, 1),
Range32.init(0x1d750, 0x1d76e, 1),
Range32.init(0x1d770, 0x1d788, 1),
Range32.init(0x1d78a, 0x1d7a8, 1),
Range32.init(0x1d7aa, 0x1d7c2, 1),
Range32.init(0x1d7c4, 0x1d7cb, 1),
Range32.init(0x1e800, 0x1e8c4, 1),
Range32.init(0x1e900, 0x1e943, 1),
Range32.init(0x1ee00, 0x1ee03, 1),
Range32.init(0x1ee05, 0x1ee1f, 1),
Range32.init(0x1ee21, 0x1ee22, 1),
Range32.init(0x1ee24, 0x1ee27, 3),
Range32.init(0x1ee29, 0x1ee32, 1),
Range32.init(0x1ee34, 0x1ee37, 1),
Range32.init(0x1ee39, 0x1ee3b, 2),
Range32.init(0x1ee42, 0x1ee47, 5),
Range32.init(0x1ee49, 0x1ee4d, 2),
Range32.init(0x1ee4e, 0x1ee4f, 1),
Range32.init(0x1ee51, 0x1ee52, 1),
Range32.init(0x1ee54, 0x1ee57, 3),
Range32.init(0x1ee59, 0x1ee61, 2),
Range32.init(0x1ee62, 0x1ee64, 2),
Range32.init(0x1ee67, 0x1ee6a, 1),
Range32.init(0x1ee6c, 0x1ee72, 1),
Range32.init(0x1ee74, 0x1ee77, 1),
Range32.init(0x1ee79, 0x1ee7c, 1),
Range32.init(0x1ee7e, 0x1ee80, 2),
Range32.init(0x1ee81, 0x1ee89, 1),
Range32.init(0x1ee8b, 0x1ee9b, 1),
Range32.init(0x1eea1, 0x1eea3, 1),
Range32.init(0x1eea5, 0x1eea9, 1),
Range32.init(0x1eeab, 0x1eebb, 1),
Range32.init(0x20000, 0x2a6d6, 1),
Range32.init(0x2a700, 0x2b734, 1),
Range32.init(0x2b740, 0x2b81d, 1),
Range32.init(0x2b820, 0x2cea1, 1),
Range32.init(0x2ceb0, 0x2ebe0, 1),
Range32.init(0x2f800, 0x2fa1d, 1),
};
break :init r[0..];
},
.latin_offset = 6,
};
const _Ll = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0061, 0x007a, 1),
Range16.init(0x00b5, 0x00df, 42),
Range16.init(0x00e0, 0x00f6, 1),
Range16.init(0x00f8, 0x00ff, 1),
Range16.init(0x0101, 0x0137, 2),
Range16.init(0x0138, 0x0148, 2),
Range16.init(0x0149, 0x0177, 2),
Range16.init(0x017a, 0x017e, 2),
Range16.init(0x017f, 0x0180, 1),
Range16.init(0x0183, 0x0185, 2),
Range16.init(0x0188, 0x018c, 4),
Range16.init(0x018d, 0x0192, 5),
Range16.init(0x0195, 0x0199, 4),
Range16.init(0x019a, 0x019b, 1),
Range16.init(0x019e, 0x01a1, 3),
Range16.init(0x01a3, 0x01a5, 2),
Range16.init(0x01a8, 0x01aa, 2),
Range16.init(0x01ab, 0x01ad, 2),
Range16.init(0x01b0, 0x01b4, 4),
Range16.init(0x01b6, 0x01b9, 3),
Range16.init(0x01ba, 0x01bd, 3),
Range16.init(0x01be, 0x01bf, 1),
Range16.init(0x01c6, 0x01cc, 3),
Range16.init(0x01ce, 0x01dc, 2),
Range16.init(0x01dd, 0x01ef, 2),
Range16.init(0x01f0, 0x01f3, 3),
Range16.init(0x01f5, 0x01f9, 4),
Range16.init(0x01fb, 0x0233, 2),
Range16.init(0x0234, 0x0239, 1),
Range16.init(0x023c, 0x023f, 3),
Range16.init(0x0240, 0x0242, 2),
Range16.init(0x0247, 0x024f, 2),
Range16.init(0x0250, 0x0293, 1),
Range16.init(0x0295, 0x02af, 1),
Range16.init(0x0371, 0x0373, 2),
Range16.init(0x0377, 0x037b, 4),
Range16.init(0x037c, 0x037d, 1),
Range16.init(0x0390, 0x03ac, 28),
Range16.init(0x03ad, 0x03ce, 1),
Range16.init(0x03d0, 0x03d1, 1),
Range16.init(0x03d5, 0x03d7, 1),
Range16.init(0x03d9, 0x03ef, 2),
Range16.init(0x03f0, 0x03f3, 1),
Range16.init(0x03f5, 0x03fb, 3),
Range16.init(0x03fc, 0x0430, 52),
Range16.init(0x0431, 0x045f, 1),
Range16.init(0x0461, 0x0481, 2),
Range16.init(0x048b, 0x04bf, 2),
Range16.init(0x04c2, 0x04ce, 2),
Range16.init(0x04cf, 0x052f, 2),
Range16.init(0x0561, 0x0587, 1),
Range16.init(0x13f8, 0x13fd, 1),
Range16.init(0x1c80, 0x1c88, 1),
Range16.init(0x1d00, 0x1d2b, 1),
Range16.init(0x1d6b, 0x1d77, 1),
Range16.init(0x1d79, 0x1d9a, 1),
Range16.init(0x1e01, 0x1e95, 2),
Range16.init(0x1e96, 0x1e9d, 1),
Range16.init(0x1e9f, 0x1eff, 2),
Range16.init(0x1f00, 0x1f07, 1),
Range16.init(0x1f10, 0x1f15, 1),
Range16.init(0x1f20, 0x1f27, 1),
Range16.init(0x1f30, 0x1f37, 1),
Range16.init(0x1f40, 0x1f45, 1),
Range16.init(0x1f50, 0x1f57, 1),
Range16.init(0x1f60, 0x1f67, 1),
Range16.init(0x1f70, 0x1f7d, 1),
Range16.init(0x1f80, 0x1f87, 1),
Range16.init(0x1f90, 0x1f97, 1),
Range16.init(0x1fa0, 0x1fa7, 1),
Range16.init(0x1fb0, 0x1fb4, 1),
Range16.init(0x1fb6, 0x1fb7, 1),
Range16.init(0x1fbe, 0x1fc2, 4),
Range16.init(0x1fc3, 0x1fc4, 1),
Range16.init(0x1fc6, 0x1fc7, 1),
Range16.init(0x1fd0, 0x1fd3, 1),
Range16.init(0x1fd6, 0x1fd7, 1),
Range16.init(0x1fe0, 0x1fe7, 1),
Range16.init(0x1ff2, 0x1ff4, 1),
Range16.init(0x1ff6, 0x1ff7, 1),
Range16.init(0x210a, 0x210e, 4),
Range16.init(0x210f, 0x2113, 4),
Range16.init(0x212f, 0x2139, 5),
Range16.init(0x213c, 0x213d, 1),
Range16.init(0x2146, 0x2149, 1),
Range16.init(0x214e, 0x2184, 54),
Range16.init(0x2c30, 0x2c5e, 1),
Range16.init(0x2c61, 0x2c65, 4),
Range16.init(0x2c66, 0x2c6c, 2),
Range16.init(0x2c71, 0x2c73, 2),
Range16.init(0x2c74, 0x2c76, 2),
Range16.init(0x2c77, 0x2c7b, 1),
Range16.init(0x2c81, 0x2ce3, 2),
Range16.init(0x2ce4, 0x2cec, 8),
Range16.init(0x2cee, 0x2cf3, 5),
Range16.init(0x2d00, 0x2d25, 1),
Range16.init(0x2d27, 0x2d2d, 6),
Range16.init(0xa641, 0xa66d, 2),
Range16.init(0xa681, 0xa69b, 2),
Range16.init(0xa723, 0xa72f, 2),
Range16.init(0xa730, 0xa731, 1),
Range16.init(0xa733, 0xa771, 2),
Range16.init(0xa772, 0xa778, 1),
Range16.init(0xa77a, 0xa77c, 2),
Range16.init(0xa77f, 0xa787, 2),
Range16.init(0xa78c, 0xa78e, 2),
Range16.init(0xa791, 0xa793, 2),
Range16.init(0xa794, 0xa795, 1),
Range16.init(0xa797, 0xa7a9, 2),
Range16.init(0xa7b5, 0xa7b7, 2),
Range16.init(0xa7fa, 0xab30, 822),
Range16.init(0xab31, 0xab5a, 1),
Range16.init(0xab60, 0xab65, 1),
Range16.init(0xab70, 0xabbf, 1),
Range16.init(0xfb00, 0xfb06, 1),
Range16.init(0xfb13, 0xfb17, 1),
Range16.init(0xff41, 0xff5a, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10428, 0x1044f, 1),
Range32.init(0x104d8, 0x104fb, 1),
Range32.init(0x10cc0, 0x10cf2, 1),
Range32.init(0x118c0, 0x118df, 1),
Range32.init(0x1d41a, 0x1d433, 1),
Range32.init(0x1d44e, 0x1d454, 1),
Range32.init(0x1d456, 0x1d467, 1),
Range32.init(0x1d482, 0x1d49b, 1),
Range32.init(0x1d4b6, 0x1d4b9, 1),
Range32.init(0x1d4bb, 0x1d4bd, 2),
Range32.init(0x1d4be, 0x1d4c3, 1),
Range32.init(0x1d4c5, 0x1d4cf, 1),
Range32.init(0x1d4ea, 0x1d503, 1),
Range32.init(0x1d51e, 0x1d537, 1),
Range32.init(0x1d552, 0x1d56b, 1),
Range32.init(0x1d586, 0x1d59f, 1),
Range32.init(0x1d5ba, 0x1d5d3, 1),
Range32.init(0x1d5ee, 0x1d607, 1),
Range32.init(0x1d622, 0x1d63b, 1),
Range32.init(0x1d656, 0x1d66f, 1),
Range32.init(0x1d68a, 0x1d6a5, 1),
Range32.init(0x1d6c2, 0x1d6da, 1),
Range32.init(0x1d6dc, 0x1d6e1, 1),
Range32.init(0x1d6fc, 0x1d714, 1),
Range32.init(0x1d716, 0x1d71b, 1),
Range32.init(0x1d736, 0x1d74e, 1),
Range32.init(0x1d750, 0x1d755, 1),
Range32.init(0x1d770, 0x1d788, 1),
Range32.init(0x1d78a, 0x1d78f, 1),
Range32.init(0x1d7aa, 0x1d7c2, 1),
Range32.init(0x1d7c4, 0x1d7c9, 1),
Range32.init(0x1d7cb, 0x1e922, 4439),
Range32.init(0x1e923, 0x1e943, 1),
};
break :init r[0..];
},
.latin_offset = 4,
};
const _Lm = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x02b0, 0x02c1, 1),
Range16.init(0x02c6, 0x02d1, 1),
Range16.init(0x02e0, 0x02e4, 1),
Range16.init(0x02ec, 0x02ee, 2),
Range16.init(0x0374, 0x037a, 6),
Range16.init(0x0559, 0x0640, 231),
Range16.init(0x06e5, 0x06e6, 1),
Range16.init(0x07f4, 0x07f5, 1),
Range16.init(0x07fa, 0x081a, 32),
Range16.init(0x0824, 0x0828, 4),
Range16.init(0x0971, 0x0e46, 1237),
Range16.init(0x0ec6, 0x10fc, 566),
Range16.init(0x17d7, 0x1843, 108),
Range16.init(0x1aa7, 0x1c78, 465),
Range16.init(0x1c79, 0x1c7d, 1),
Range16.init(0x1d2c, 0x1d6a, 1),
Range16.init(0x1d78, 0x1d9b, 35),
Range16.init(0x1d9c, 0x1dbf, 1),
Range16.init(0x2071, 0x207f, 14),
Range16.init(0x2090, 0x209c, 1),
Range16.init(0x2c7c, 0x2c7d, 1),
Range16.init(0x2d6f, 0x2e2f, 192),
Range16.init(0x3005, 0x3031, 44),
Range16.init(0x3032, 0x3035, 1),
Range16.init(0x303b, 0x309d, 98),
Range16.init(0x309e, 0x30fc, 94),
Range16.init(0x30fd, 0x30fe, 1),
Range16.init(0xa015, 0xa4f8, 1251),
Range16.init(0xa4f9, 0xa4fd, 1),
Range16.init(0xa60c, 0xa67f, 115),
Range16.init(0xa69c, 0xa69d, 1),
Range16.init(0xa717, 0xa71f, 1),
Range16.init(0xa770, 0xa788, 24),
Range16.init(0xa7f8, 0xa7f9, 1),
Range16.init(0xa9cf, 0xa9e6, 23),
Range16.init(0xaa70, 0xaadd, 109),
Range16.init(0xaaf3, 0xaaf4, 1),
Range16.init(0xab5c, 0xab5f, 1),
Range16.init(0xff70, 0xff9e, 46),
Range16.init(0xff9f, 0xff9f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16b40, 0x16b40, 1),
Range32.init(0x16b41, 0x16b43, 1),
Range32.init(0x16f93, 0x16f9f, 1),
Range32.init(0x16fe0, 0x16fe1, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Lo = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00aa, 0x00ba, 16),
Range16.init(0x01bb, 0x01c0, 5),
Range16.init(0x01c1, 0x01c3, 1),
Range16.init(0x0294, 0x05d0, 828),
Range16.init(0x05d1, 0x05ea, 1),
Range16.init(0x05f0, 0x05f2, 1),
Range16.init(0x0620, 0x063f, 1),
Range16.init(0x0641, 0x064a, 1),
Range16.init(0x066e, 0x066f, 1),
Range16.init(0x0671, 0x06d3, 1),
Range16.init(0x06d5, 0x06ee, 25),
Range16.init(0x06ef, 0x06fa, 11),
Range16.init(0x06fb, 0x06fc, 1),
Range16.init(0x06ff, 0x0710, 17),
Range16.init(0x0712, 0x072f, 1),
Range16.init(0x074d, 0x07a5, 1),
Range16.init(0x07b1, 0x07ca, 25),
Range16.init(0x07cb, 0x07ea, 1),
Range16.init(0x0800, 0x0815, 1),
Range16.init(0x0840, 0x0858, 1),
Range16.init(0x0860, 0x086a, 1),
Range16.init(0x08a0, 0x08b4, 1),
Range16.init(0x08b6, 0x08bd, 1),
Range16.init(0x0904, 0x0939, 1),
Range16.init(0x093d, 0x0950, 19),
Range16.init(0x0958, 0x0961, 1),
Range16.init(0x0972, 0x0980, 1),
Range16.init(0x0985, 0x098c, 1),
Range16.init(0x098f, 0x0990, 1),
Range16.init(0x0993, 0x09a8, 1),
Range16.init(0x09aa, 0x09b0, 1),
Range16.init(0x09b2, 0x09b6, 4),
Range16.init(0x09b7, 0x09b9, 1),
Range16.init(0x09bd, 0x09ce, 17),
Range16.init(0x09dc, 0x09dd, 1),
Range16.init(0x09df, 0x09e1, 1),
Range16.init(0x09f0, 0x09f1, 1),
Range16.init(0x09fc, 0x0a05, 9),
Range16.init(0x0a06, 0x0a0a, 1),
Range16.init(0x0a0f, 0x0a10, 1),
Range16.init(0x0a13, 0x0a28, 1),
Range16.init(0x0a2a, 0x0a30, 1),
Range16.init(0x0a32, 0x0a33, 1),
Range16.init(0x0a35, 0x0a36, 1),
Range16.init(0x0a38, 0x0a39, 1),
Range16.init(0x0a59, 0x0a5c, 1),
Range16.init(0x0a5e, 0x0a72, 20),
Range16.init(0x0a73, 0x0a74, 1),
Range16.init(0x0a85, 0x0a8d, 1),
Range16.init(0x0a8f, 0x0a91, 1),
Range16.init(0x0a93, 0x0aa8, 1),
Range16.init(0x0aaa, 0x0ab0, 1),
Range16.init(0x0ab2, 0x0ab3, 1),
Range16.init(0x0ab5, 0x0ab9, 1),
Range16.init(0x0abd, 0x0ad0, 19),
Range16.init(0x0ae0, 0x0ae1, 1),
Range16.init(0x0af9, 0x0b05, 12),
Range16.init(0x0b06, 0x0b0c, 1),
Range16.init(0x0b0f, 0x0b10, 1),
Range16.init(0x0b13, 0x0b28, 1),
Range16.init(0x0b2a, 0x0b30, 1),
Range16.init(0x0b32, 0x0b33, 1),
Range16.init(0x0b35, 0x0b39, 1),
Range16.init(0x0b3d, 0x0b5c, 31),
Range16.init(0x0b5d, 0x0b5f, 2),
Range16.init(0x0b60, 0x0b61, 1),
Range16.init(0x0b71, 0x0b83, 18),
Range16.init(0x0b85, 0x0b8a, 1),
Range16.init(0x0b8e, 0x0b90, 1),
Range16.init(0x0b92, 0x0b95, 1),
Range16.init(0x0b99, 0x0b9a, 1),
Range16.init(0x0b9c, 0x0b9e, 2),
Range16.init(0x0b9f, 0x0ba3, 4),
Range16.init(0x0ba4, 0x0ba8, 4),
Range16.init(0x0ba9, 0x0baa, 1),
Range16.init(0x0bae, 0x0bb9, 1),
Range16.init(0x0bd0, 0x0c05, 53),
Range16.init(0x0c06, 0x0c0c, 1),
Range16.init(0x0c0e, 0x0c10, 1),
Range16.init(0x0c12, 0x0c28, 1),
Range16.init(0x0c2a, 0x0c39, 1),
Range16.init(0x0c3d, 0x0c58, 27),
Range16.init(0x0c59, 0x0c5a, 1),
Range16.init(0x0c60, 0x0c61, 1),
Range16.init(0x0c80, 0x0c85, 5),
Range16.init(0x0c86, 0x0c8c, 1),
Range16.init(0x0c8e, 0x0c90, 1),
Range16.init(0x0c92, 0x0ca8, 1),
Range16.init(0x0caa, 0x0cb3, 1),
Range16.init(0x0cb5, 0x0cb9, 1),
Range16.init(0x0cbd, 0x0cde, 33),
Range16.init(0x0ce0, 0x0ce1, 1),
Range16.init(0x0cf1, 0x0cf2, 1),
Range16.init(0x0d05, 0x0d0c, 1),
Range16.init(0x0d0e, 0x0d10, 1),
Range16.init(0x0d12, 0x0d3a, 1),
Range16.init(0x0d3d, 0x0d4e, 17),
Range16.init(0x0d54, 0x0d56, 1),
Range16.init(0x0d5f, 0x0d61, 1),
Range16.init(0x0d7a, 0x0d7f, 1),
Range16.init(0x0d85, 0x0d96, 1),
Range16.init(0x0d9a, 0x0db1, 1),
Range16.init(0x0db3, 0x0dbb, 1),
Range16.init(0x0dbd, 0x0dc0, 3),
Range16.init(0x0dc1, 0x0dc6, 1),
Range16.init(0x0e01, 0x0e30, 1),
Range16.init(0x0e32, 0x0e33, 1),
Range16.init(0x0e40, 0x0e45, 1),
Range16.init(0x0e81, 0x0e82, 1),
Range16.init(0x0e84, 0x0e87, 3),
Range16.init(0x0e88, 0x0e8a, 2),
Range16.init(0x0e8d, 0x0e94, 7),
Range16.init(0x0e95, 0x0e97, 1),
Range16.init(0x0e99, 0x0e9f, 1),
Range16.init(0x0ea1, 0x0ea3, 1),
Range16.init(0x0ea5, 0x0ea7, 2),
Range16.init(0x0eaa, 0x0eab, 1),
Range16.init(0x0ead, 0x0eb0, 1),
Range16.init(0x0eb2, 0x0eb3, 1),
Range16.init(0x0ebd, 0x0ec0, 3),
Range16.init(0x0ec1, 0x0ec4, 1),
Range16.init(0x0edc, 0x0edf, 1),
Range16.init(0x0f00, 0x0f40, 64),
Range16.init(0x0f41, 0x0f47, 1),
Range16.init(0x0f49, 0x0f6c, 1),
Range16.init(0x0f88, 0x0f8c, 1),
Range16.init(0x1000, 0x102a, 1),
Range16.init(0x103f, 0x1050, 17),
Range16.init(0x1051, 0x1055, 1),
Range16.init(0x105a, 0x105d, 1),
Range16.init(0x1061, 0x1065, 4),
Range16.init(0x1066, 0x106e, 8),
Range16.init(0x106f, 0x1070, 1),
Range16.init(0x1075, 0x1081, 1),
Range16.init(0x108e, 0x10d0, 66),
Range16.init(0x10d1, 0x10fa, 1),
Range16.init(0x10fd, 0x1248, 1),
Range16.init(0x124a, 0x124d, 1),
Range16.init(0x1250, 0x1256, 1),
Range16.init(0x1258, 0x125a, 2),
Range16.init(0x125b, 0x125d, 1),
Range16.init(0x1260, 0x1288, 1),
Range16.init(0x128a, 0x128d, 1),
Range16.init(0x1290, 0x12b0, 1),
Range16.init(0x12b2, 0x12b5, 1),
Range16.init(0x12b8, 0x12be, 1),
Range16.init(0x12c0, 0x12c2, 2),
Range16.init(0x12c3, 0x12c5, 1),
Range16.init(0x12c8, 0x12d6, 1),
Range16.init(0x12d8, 0x1310, 1),
Range16.init(0x1312, 0x1315, 1),
Range16.init(0x1318, 0x135a, 1),
Range16.init(0x1380, 0x138f, 1),
Range16.init(0x1401, 0x166c, 1),
Range16.init(0x166f, 0x167f, 1),
Range16.init(0x1681, 0x169a, 1),
Range16.init(0x16a0, 0x16ea, 1),
Range16.init(0x16f1, 0x16f8, 1),
Range16.init(0x1700, 0x170c, 1),
Range16.init(0x170e, 0x1711, 1),
Range16.init(0x1720, 0x1731, 1),
Range16.init(0x1740, 0x1751, 1),
Range16.init(0x1760, 0x176c, 1),
Range16.init(0x176e, 0x1770, 1),
Range16.init(0x1780, 0x17b3, 1),
Range16.init(0x17dc, 0x1820, 68),
Range16.init(0x1821, 0x1842, 1),
Range16.init(0x1844, 0x1877, 1),
Range16.init(0x1880, 0x1884, 1),
Range16.init(0x1887, 0x18a8, 1),
Range16.init(0x18aa, 0x18b0, 6),
Range16.init(0x18b1, 0x18f5, 1),
Range16.init(0x1900, 0x191e, 1),
Range16.init(0x1950, 0x196d, 1),
Range16.init(0x1970, 0x1974, 1),
Range16.init(0x1980, 0x19ab, 1),
Range16.init(0x19b0, 0x19c9, 1),
Range16.init(0x1a00, 0x1a16, 1),
Range16.init(0x1a20, 0x1a54, 1),
Range16.init(0x1b05, 0x1b33, 1),
Range16.init(0x1b45, 0x1b4b, 1),
Range16.init(0x1b83, 0x1ba0, 1),
Range16.init(0x1bae, 0x1baf, 1),
Range16.init(0x1bba, 0x1be5, 1),
Range16.init(0x1c00, 0x1c23, 1),
Range16.init(0x1c4d, 0x1c4f, 1),
Range16.init(0x1c5a, 0x1c77, 1),
Range16.init(0x1ce9, 0x1cec, 1),
Range16.init(0x1cee, 0x1cf1, 1),
Range16.init(0x1cf5, 0x1cf6, 1),
Range16.init(0x2135, 0x2138, 1),
Range16.init(0x2d30, 0x2d67, 1),
Range16.init(0x2d80, 0x2d96, 1),
Range16.init(0x2da0, 0x2da6, 1),
Range16.init(0x2da8, 0x2dae, 1),
Range16.init(0x2db0, 0x2db6, 1),
Range16.init(0x2db8, 0x2dbe, 1),
Range16.init(0x2dc0, 0x2dc6, 1),
Range16.init(0x2dc8, 0x2dce, 1),
Range16.init(0x2dd0, 0x2dd6, 1),
Range16.init(0x2dd8, 0x2dde, 1),
Range16.init(0x3006, 0x303c, 54),
Range16.init(0x3041, 0x3096, 1),
Range16.init(0x309f, 0x30a1, 2),
Range16.init(0x30a2, 0x30fa, 1),
Range16.init(0x30ff, 0x3105, 6),
Range16.init(0x3106, 0x312e, 1),
Range16.init(0x3131, 0x318e, 1),
Range16.init(0x31a0, 0x31ba, 1),
Range16.init(0x31f0, 0x31ff, 1),
Range16.init(0x3400, 0x4db5, 1),
Range16.init(0x4e00, 0x9fea, 1),
Range16.init(0xa000, 0xa014, 1),
Range16.init(0xa016, 0xa48c, 1),
Range16.init(0xa4d0, 0xa4f7, 1),
Range16.init(0xa500, 0xa60b, 1),
Range16.init(0xa610, 0xa61f, 1),
Range16.init(0xa62a, 0xa62b, 1),
Range16.init(0xa66e, 0xa6a0, 50),
Range16.init(0xa6a1, 0xa6e5, 1),
Range16.init(0xa78f, 0xa7f7, 104),
Range16.init(0xa7fb, 0xa801, 1),
Range16.init(0xa803, 0xa805, 1),
Range16.init(0xa807, 0xa80a, 1),
Range16.init(0xa80c, 0xa822, 1),
Range16.init(0xa840, 0xa873, 1),
Range16.init(0xa882, 0xa8b3, 1),
Range16.init(0xa8f2, 0xa8f7, 1),
Range16.init(0xa8fb, 0xa8fd, 2),
Range16.init(0xa90a, 0xa925, 1),
Range16.init(0xa930, 0xa946, 1),
Range16.init(0xa960, 0xa97c, 1),
Range16.init(0xa984, 0xa9b2, 1),
Range16.init(0xa9e0, 0xa9e4, 1),
Range16.init(0xa9e7, 0xa9ef, 1),
Range16.init(0xa9fa, 0xa9fe, 1),
Range16.init(0xaa00, 0xaa28, 1),
Range16.init(0xaa40, 0xaa42, 1),
Range16.init(0xaa44, 0xaa4b, 1),
Range16.init(0xaa60, 0xaa6f, 1),
Range16.init(0xaa71, 0xaa76, 1),
Range16.init(0xaa7a, 0xaa7e, 4),
Range16.init(0xaa7f, 0xaaaf, 1),
Range16.init(0xaab1, 0xaab5, 4),
Range16.init(0xaab6, 0xaab9, 3),
Range16.init(0xaaba, 0xaabd, 1),
Range16.init(0xaac0, 0xaac2, 2),
Range16.init(0xaadb, 0xaadc, 1),
Range16.init(0xaae0, 0xaaea, 1),
Range16.init(0xaaf2, 0xab01, 15),
Range16.init(0xab02, 0xab06, 1),
Range16.init(0xab09, 0xab0e, 1),
Range16.init(0xab11, 0xab16, 1),
Range16.init(0xab20, 0xab26, 1),
Range16.init(0xab28, 0xab2e, 1),
Range16.init(0xabc0, 0xabe2, 1),
Range16.init(0xac00, 0xd7a3, 1),
Range16.init(0xd7b0, 0xd7c6, 1),
Range16.init(0xd7cb, 0xd7fb, 1),
Range16.init(0xf900, 0xfa6d, 1),
Range16.init(0xfa70, 0xfad9, 1),
Range16.init(0xfb1d, 0xfb1f, 2),
Range16.init(0xfb20, 0xfb28, 1),
Range16.init(0xfb2a, 0xfb36, 1),
Range16.init(0xfb38, 0xfb3c, 1),
Range16.init(0xfb3e, 0xfb40, 2),
Range16.init(0xfb41, 0xfb43, 2),
Range16.init(0xfb44, 0xfb46, 2),
Range16.init(0xfb47, 0xfbb1, 1),
Range16.init(0xfbd3, 0xfd3d, 1),
Range16.init(0xfd50, 0xfd8f, 1),
Range16.init(0xfd92, 0xfdc7, 1),
Range16.init(0xfdf0, 0xfdfb, 1),
Range16.init(0xfe70, 0xfe74, 1),
Range16.init(0xfe76, 0xfefc, 1),
Range16.init(0xff66, 0xff6f, 1),
Range16.init(0xff71, 0xff9d, 1),
Range16.init(0xffa0, 0xffbe, 1),
Range16.init(0xffc2, 0xffc7, 1),
Range16.init(0xffca, 0xffcf, 1),
Range16.init(0xffd2, 0xffd7, 1),
Range16.init(0xffda, 0xffdc, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10000, 0x1000b, 1),
Range32.init(0x1000d, 0x10026, 1),
Range32.init(0x10028, 0x1003a, 1),
Range32.init(0x1003c, 0x1003d, 1),
Range32.init(0x1003f, 0x1004d, 1),
Range32.init(0x10050, 0x1005d, 1),
Range32.init(0x10080, 0x100fa, 1),
Range32.init(0x10280, 0x1029c, 1),
Range32.init(0x102a0, 0x102d0, 1),
Range32.init(0x10300, 0x1031f, 1),
Range32.init(0x1032d, 0x10340, 1),
Range32.init(0x10342, 0x10349, 1),
Range32.init(0x10350, 0x10375, 1),
Range32.init(0x10380, 0x1039d, 1),
Range32.init(0x103a0, 0x103c3, 1),
Range32.init(0x103c8, 0x103cf, 1),
Range32.init(0x10450, 0x1049d, 1),
Range32.init(0x10500, 0x10527, 1),
Range32.init(0x10530, 0x10563, 1),
Range32.init(0x10600, 0x10736, 1),
Range32.init(0x10740, 0x10755, 1),
Range32.init(0x10760, 0x10767, 1),
Range32.init(0x10800, 0x10805, 1),
Range32.init(0x10808, 0x1080a, 2),
Range32.init(0x1080b, 0x10835, 1),
Range32.init(0x10837, 0x10838, 1),
Range32.init(0x1083c, 0x1083f, 3),
Range32.init(0x10840, 0x10855, 1),
Range32.init(0x10860, 0x10876, 1),
Range32.init(0x10880, 0x1089e, 1),
Range32.init(0x108e0, 0x108f2, 1),
Range32.init(0x108f4, 0x108f5, 1),
Range32.init(0x10900, 0x10915, 1),
Range32.init(0x10920, 0x10939, 1),
Range32.init(0x10980, 0x109b7, 1),
Range32.init(0x109be, 0x109bf, 1),
Range32.init(0x10a00, 0x10a10, 16),
Range32.init(0x10a11, 0x10a13, 1),
Range32.init(0x10a15, 0x10a17, 1),
Range32.init(0x10a19, 0x10a33, 1),
Range32.init(0x10a60, 0x10a7c, 1),
Range32.init(0x10a80, 0x10a9c, 1),
Range32.init(0x10ac0, 0x10ac7, 1),
Range32.init(0x10ac9, 0x10ae4, 1),
Range32.init(0x10b00, 0x10b35, 1),
Range32.init(0x10b40, 0x10b55, 1),
Range32.init(0x10b60, 0x10b72, 1),
Range32.init(0x10b80, 0x10b91, 1),
Range32.init(0x10c00, 0x10c48, 1),
Range32.init(0x11003, 0x11037, 1),
Range32.init(0x11083, 0x110af, 1),
Range32.init(0x110d0, 0x110e8, 1),
Range32.init(0x11103, 0x11126, 1),
Range32.init(0x11150, 0x11172, 1),
Range32.init(0x11176, 0x11183, 13),
Range32.init(0x11184, 0x111b2, 1),
Range32.init(0x111c1, 0x111c4, 1),
Range32.init(0x111da, 0x111dc, 2),
Range32.init(0x11200, 0x11211, 1),
Range32.init(0x11213, 0x1122b, 1),
Range32.init(0x11280, 0x11286, 1),
Range32.init(0x11288, 0x1128a, 2),
Range32.init(0x1128b, 0x1128d, 1),
Range32.init(0x1128f, 0x1129d, 1),
Range32.init(0x1129f, 0x112a8, 1),
Range32.init(0x112b0, 0x112de, 1),
Range32.init(0x11305, 0x1130c, 1),
Range32.init(0x1130f, 0x11310, 1),
Range32.init(0x11313, 0x11328, 1),
Range32.init(0x1132a, 0x11330, 1),
Range32.init(0x11332, 0x11333, 1),
Range32.init(0x11335, 0x11339, 1),
Range32.init(0x1133d, 0x11350, 19),
Range32.init(0x1135d, 0x11361, 1),
Range32.init(0x11400, 0x11434, 1),
Range32.init(0x11447, 0x1144a, 1),
Range32.init(0x11480, 0x114af, 1),
Range32.init(0x114c4, 0x114c5, 1),
Range32.init(0x114c7, 0x11580, 185),
Range32.init(0x11581, 0x115ae, 1),
Range32.init(0x115d8, 0x115db, 1),
Range32.init(0x11600, 0x1162f, 1),
Range32.init(0x11644, 0x11680, 60),
Range32.init(0x11681, 0x116aa, 1),
Range32.init(0x11700, 0x11719, 1),
Range32.init(0x118ff, 0x11a00, 257),
Range32.init(0x11a0b, 0x11a32, 1),
Range32.init(0x11a3a, 0x11a50, 22),
Range32.init(0x11a5c, 0x11a83, 1),
Range32.init(0x11a86, 0x11a89, 1),
Range32.init(0x11ac0, 0x11af8, 1),
Range32.init(0x11c00, 0x11c08, 1),
Range32.init(0x11c0a, 0x11c2e, 1),
Range32.init(0x11c40, 0x11c72, 50),
Range32.init(0x11c73, 0x11c8f, 1),
Range32.init(0x11d00, 0x11d06, 1),
Range32.init(0x11d08, 0x11d09, 1),
Range32.init(0x11d0b, 0x11d30, 1),
Range32.init(0x11d46, 0x12000, 698),
Range32.init(0x12001, 0x12399, 1),
Range32.init(0x12480, 0x12543, 1),
Range32.init(0x13000, 0x1342e, 1),
Range32.init(0x14400, 0x14646, 1),
Range32.init(0x16800, 0x16a38, 1),
Range32.init(0x16a40, 0x16a5e, 1),
Range32.init(0x16ad0, 0x16aed, 1),
Range32.init(0x16b00, 0x16b2f, 1),
Range32.init(0x16b63, 0x16b77, 1),
Range32.init(0x16b7d, 0x16b8f, 1),
Range32.init(0x16f00, 0x16f44, 1),
Range32.init(0x16f50, 0x17000, 176),
Range32.init(0x17001, 0x187ec, 1),
Range32.init(0x18800, 0x18af2, 1),
Range32.init(0x1b000, 0x1b11e, 1),
Range32.init(0x1b170, 0x1b2fb, 1),
Range32.init(0x1bc00, 0x1bc6a, 1),
Range32.init(0x1bc70, 0x1bc7c, 1),
Range32.init(0x1bc80, 0x1bc88, 1),
Range32.init(0x1bc90, 0x1bc99, 1),
Range32.init(0x1e800, 0x1e8c4, 1),
Range32.init(0x1ee00, 0x1ee03, 1),
Range32.init(0x1ee05, 0x1ee1f, 1),
Range32.init(0x1ee21, 0x1ee22, 1),
Range32.init(0x1ee24, 0x1ee27, 3),
Range32.init(0x1ee29, 0x1ee32, 1),
Range32.init(0x1ee34, 0x1ee37, 1),
Range32.init(0x1ee39, 0x1ee3b, 2),
Range32.init(0x1ee42, 0x1ee47, 5),
Range32.init(0x1ee49, 0x1ee4d, 2),
Range32.init(0x1ee4e, 0x1ee4f, 1),
Range32.init(0x1ee51, 0x1ee52, 1),
Range32.init(0x1ee54, 0x1ee57, 3),
Range32.init(0x1ee59, 0x1ee61, 2),
Range32.init(0x1ee62, 0x1ee64, 2),
Range32.init(0x1ee67, 0x1ee6a, 1),
Range32.init(0x1ee6c, 0x1ee72, 1),
Range32.init(0x1ee74, 0x1ee77, 1),
Range32.init(0x1ee79, 0x1ee7c, 1),
Range32.init(0x1ee7e, 0x1ee80, 2),
Range32.init(0x1ee81, 0x1ee89, 1),
Range32.init(0x1ee8b, 0x1ee9b, 1),
Range32.init(0x1eea1, 0x1eea3, 1),
Range32.init(0x1eea5, 0x1eea9, 1),
Range32.init(0x1eeab, 0x1eebb, 1),
Range32.init(0x20000, 0x2a6d6, 1),
Range32.init(0x2a700, 0x2b734, 1),
Range32.init(0x2b740, 0x2b81d, 1),
Range32.init(0x2b820, 0x2cea1, 1),
Range32.init(0x2ceb0, 0x2ebe0, 1),
Range32.init(0x2f800, 0x2fa1d, 1),
};
break :init r[0..];
},
.latin_offset = 1,
};
const _Lt = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x01c5, 0x01cb, 3),
Range16.init(0x01f2, 0x1f88, 7574),
Range16.init(0x1f89, 0x1f8f, 1),
Range16.init(0x1f98, 0x1f9f, 1),
Range16.init(0x1fa8, 0x1faf, 1),
Range16.init(0x1fbc, 0x1fcc, 16),
Range16.init(0x1ffc, 0x1ffc, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Lu = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0041, 0x005a, 1),
Range16.init(0x00c0, 0x00d6, 1),
Range16.init(0x00d8, 0x00de, 1),
Range16.init(0x0100, 0x0136, 2),
Range16.init(0x0139, 0x0147, 2),
Range16.init(0x014a, 0x0178, 2),
Range16.init(0x0179, 0x017d, 2),
Range16.init(0x0181, 0x0182, 1),
Range16.init(0x0184, 0x0186, 2),
Range16.init(0x0187, 0x0189, 2),
Range16.init(0x018a, 0x018b, 1),
Range16.init(0x018e, 0x0191, 1),
Range16.init(0x0193, 0x0194, 1),
Range16.init(0x0196, 0x0198, 1),
Range16.init(0x019c, 0x019d, 1),
Range16.init(0x019f, 0x01a0, 1),
Range16.init(0x01a2, 0x01a6, 2),
Range16.init(0x01a7, 0x01a9, 2),
Range16.init(0x01ac, 0x01ae, 2),
Range16.init(0x01af, 0x01b1, 2),
Range16.init(0x01b2, 0x01b3, 1),
Range16.init(0x01b5, 0x01b7, 2),
Range16.init(0x01b8, 0x01bc, 4),
Range16.init(0x01c4, 0x01cd, 3),
Range16.init(0x01cf, 0x01db, 2),
Range16.init(0x01de, 0x01ee, 2),
Range16.init(0x01f1, 0x01f4, 3),
Range16.init(0x01f6, 0x01f8, 1),
Range16.init(0x01fa, 0x0232, 2),
Range16.init(0x023a, 0x023b, 1),
Range16.init(0x023d, 0x023e, 1),
Range16.init(0x0241, 0x0243, 2),
Range16.init(0x0244, 0x0246, 1),
Range16.init(0x0248, 0x024e, 2),
Range16.init(0x0370, 0x0372, 2),
Range16.init(0x0376, 0x037f, 9),
Range16.init(0x0386, 0x0388, 2),
Range16.init(0x0389, 0x038a, 1),
Range16.init(0x038c, 0x038e, 2),
Range16.init(0x038f, 0x0391, 2),
Range16.init(0x0392, 0x03a1, 1),
Range16.init(0x03a3, 0x03ab, 1),
Range16.init(0x03cf, 0x03d2, 3),
Range16.init(0x03d3, 0x03d4, 1),
Range16.init(0x03d8, 0x03ee, 2),
Range16.init(0x03f4, 0x03f7, 3),
Range16.init(0x03f9, 0x03fa, 1),
Range16.init(0x03fd, 0x042f, 1),
Range16.init(0x0460, 0x0480, 2),
Range16.init(0x048a, 0x04c0, 2),
Range16.init(0x04c1, 0x04cd, 2),
Range16.init(0x04d0, 0x052e, 2),
Range16.init(0x0531, 0x0556, 1),
Range16.init(0x10a0, 0x10c5, 1),
Range16.init(0x10c7, 0x10cd, 6),
Range16.init(0x13a0, 0x13f5, 1),
Range16.init(0x1e00, 0x1e94, 2),
Range16.init(0x1e9e, 0x1efe, 2),
Range16.init(0x1f08, 0x1f0f, 1),
Range16.init(0x1f18, 0x1f1d, 1),
Range16.init(0x1f28, 0x1f2f, 1),
Range16.init(0x1f38, 0x1f3f, 1),
Range16.init(0x1f48, 0x1f4d, 1),
Range16.init(0x1f59, 0x1f5f, 2),
Range16.init(0x1f68, 0x1f6f, 1),
Range16.init(0x1fb8, 0x1fbb, 1),
Range16.init(0x1fc8, 0x1fcb, 1),
Range16.init(0x1fd8, 0x1fdb, 1),
Range16.init(0x1fe8, 0x1fec, 1),
Range16.init(0x1ff8, 0x1ffb, 1),
Range16.init(0x2102, 0x2107, 5),
Range16.init(0x210b, 0x210d, 1),
Range16.init(0x2110, 0x2112, 1),
Range16.init(0x2115, 0x2119, 4),
Range16.init(0x211a, 0x211d, 1),
Range16.init(0x2124, 0x212a, 2),
Range16.init(0x212b, 0x212d, 1),
Range16.init(0x2130, 0x2133, 1),
Range16.init(0x213e, 0x213f, 1),
Range16.init(0x2145, 0x2183, 62),
Range16.init(0x2c00, 0x2c2e, 1),
Range16.init(0x2c60, 0x2c62, 2),
Range16.init(0x2c63, 0x2c64, 1),
Range16.init(0x2c67, 0x2c6d, 2),
Range16.init(0x2c6e, 0x2c70, 1),
Range16.init(0x2c72, 0x2c75, 3),
Range16.init(0x2c7e, 0x2c80, 1),
Range16.init(0x2c82, 0x2ce2, 2),
Range16.init(0x2ceb, 0x2ced, 2),
Range16.init(0x2cf2, 0xa640, 31054),
Range16.init(0xa642, 0xa66c, 2),
Range16.init(0xa680, 0xa69a, 2),
Range16.init(0xa722, 0xa72e, 2),
Range16.init(0xa732, 0xa76e, 2),
Range16.init(0xa779, 0xa77d, 2),
Range16.init(0xa77e, 0xa786, 2),
Range16.init(0xa78b, 0xa78d, 2),
Range16.init(0xa790, 0xa792, 2),
Range16.init(0xa796, 0xa7aa, 2),
Range16.init(0xa7ab, 0xa7ae, 1),
Range16.init(0xa7b0, 0xa7b4, 1),
Range16.init(0xa7b6, 0xff21, 22379),
Range16.init(0xff22, 0xff3a, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10400, 0x10427, 1),
Range32.init(0x104b0, 0x104d3, 1),
Range32.init(0x10c80, 0x10cb2, 1),
Range32.init(0x118a0, 0x118bf, 1),
Range32.init(0x1d400, 0x1d419, 1),
Range32.init(0x1d434, 0x1d44d, 1),
Range32.init(0x1d468, 0x1d481, 1),
Range32.init(0x1d49c, 0x1d49e, 2),
Range32.init(0x1d49f, 0x1d4a5, 3),
Range32.init(0x1d4a6, 0x1d4a9, 3),
Range32.init(0x1d4aa, 0x1d4ac, 1),
Range32.init(0x1d4ae, 0x1d4b5, 1),
Range32.init(0x1d4d0, 0x1d4e9, 1),
Range32.init(0x1d504, 0x1d505, 1),
Range32.init(0x1d507, 0x1d50a, 1),
Range32.init(0x1d50d, 0x1d514, 1),
Range32.init(0x1d516, 0x1d51c, 1),
Range32.init(0x1d538, 0x1d539, 1),
Range32.init(0x1d53b, 0x1d53e, 1),
Range32.init(0x1d540, 0x1d544, 1),
Range32.init(0x1d546, 0x1d54a, 4),
Range32.init(0x1d54b, 0x1d550, 1),
Range32.init(0x1d56c, 0x1d585, 1),
Range32.init(0x1d5a0, 0x1d5b9, 1),
Range32.init(0x1d5d4, 0x1d5ed, 1),
Range32.init(0x1d608, 0x1d621, 1),
Range32.init(0x1d63c, 0x1d655, 1),
Range32.init(0x1d670, 0x1d689, 1),
Range32.init(0x1d6a8, 0x1d6c0, 1),
Range32.init(0x1d6e2, 0x1d6fa, 1),
Range32.init(0x1d71c, 0x1d734, 1),
Range32.init(0x1d756, 0x1d76e, 1),
Range32.init(0x1d790, 0x1d7a8, 1),
Range32.init(0x1d7ca, 0x1e900, 4406),
Range32.init(0x1e901, 0x1e921, 1),
};
break :init r[0..];
},
.latin_offset = 3,
};
const _M = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0300, 0x036f, 1),
Range16.init(0x0483, 0x0489, 1),
Range16.init(0x0591, 0x05bd, 1),
Range16.init(0x05bf, 0x05c1, 2),
Range16.init(0x05c2, 0x05c4, 2),
Range16.init(0x05c5, 0x05c7, 2),
Range16.init(0x0610, 0x061a, 1),
Range16.init(0x064b, 0x065f, 1),
Range16.init(0x0670, 0x06d6, 102),
Range16.init(0x06d7, 0x06dc, 1),
Range16.init(0x06df, 0x06e4, 1),
Range16.init(0x06e7, 0x06e8, 1),
Range16.init(0x06ea, 0x06ed, 1),
Range16.init(0x0711, 0x0730, 31),
Range16.init(0x0731, 0x074a, 1),
Range16.init(0x07a6, 0x07b0, 1),
Range16.init(0x07eb, 0x07f3, 1),
Range16.init(0x0816, 0x0819, 1),
Range16.init(0x081b, 0x0823, 1),
Range16.init(0x0825, 0x0827, 1),
Range16.init(0x0829, 0x082d, 1),
Range16.init(0x0859, 0x085b, 1),
Range16.init(0x08d4, 0x08e1, 1),
Range16.init(0x08e3, 0x0903, 1),
Range16.init(0x093a, 0x093c, 1),
Range16.init(0x093e, 0x094f, 1),
Range16.init(0x0951, 0x0957, 1),
Range16.init(0x0962, 0x0963, 1),
Range16.init(0x0981, 0x0983, 1),
Range16.init(0x09bc, 0x09be, 2),
Range16.init(0x09bf, 0x09c4, 1),
Range16.init(0x09c7, 0x09c8, 1),
Range16.init(0x09cb, 0x09cd, 1),
Range16.init(0x09d7, 0x09e2, 11),
Range16.init(0x09e3, 0x0a01, 30),
Range16.init(0x0a02, 0x0a03, 1),
Range16.init(0x0a3c, 0x0a3e, 2),
Range16.init(0x0a3f, 0x0a42, 1),
Range16.init(0x0a47, 0x0a48, 1),
Range16.init(0x0a4b, 0x0a4d, 1),
Range16.init(0x0a51, 0x0a70, 31),
Range16.init(0x0a71, 0x0a75, 4),
Range16.init(0x0a81, 0x0a83, 1),
Range16.init(0x0abc, 0x0abe, 2),
Range16.init(0x0abf, 0x0ac5, 1),
Range16.init(0x0ac7, 0x0ac9, 1),
Range16.init(0x0acb, 0x0acd, 1),
Range16.init(0x0ae2, 0x0ae3, 1),
Range16.init(0x0afa, 0x0aff, 1),
Range16.init(0x0b01, 0x0b03, 1),
Range16.init(0x0b3c, 0x0b3e, 2),
Range16.init(0x0b3f, 0x0b44, 1),
Range16.init(0x0b47, 0x0b48, 1),
Range16.init(0x0b4b, 0x0b4d, 1),
Range16.init(0x0b56, 0x0b57, 1),
Range16.init(0x0b62, 0x0b63, 1),
Range16.init(0x0b82, 0x0bbe, 60),
Range16.init(0x0bbf, 0x0bc2, 1),
Range16.init(0x0bc6, 0x0bc8, 1),
Range16.init(0x0bca, 0x0bcd, 1),
Range16.init(0x0bd7, 0x0c00, 41),
Range16.init(0x0c01, 0x0c03, 1),
Range16.init(0x0c3e, 0x0c44, 1),
Range16.init(0x0c46, 0x0c48, 1),
Range16.init(0x0c4a, 0x0c4d, 1),
Range16.init(0x0c55, 0x0c56, 1),
Range16.init(0x0c62, 0x0c63, 1),
Range16.init(0x0c81, 0x0c83, 1),
Range16.init(0x0cbc, 0x0cbe, 2),
Range16.init(0x0cbf, 0x0cc4, 1),
Range16.init(0x0cc6, 0x0cc8, 1),
Range16.init(0x0cca, 0x0ccd, 1),
Range16.init(0x0cd5, 0x0cd6, 1),
Range16.init(0x0ce2, 0x0ce3, 1),
Range16.init(0x0d00, 0x0d03, 1),
Range16.init(0x0d3b, 0x0d3c, 1),
Range16.init(0x0d3e, 0x0d44, 1),
Range16.init(0x0d46, 0x0d48, 1),
Range16.init(0x0d4a, 0x0d4d, 1),
Range16.init(0x0d57, 0x0d62, 11),
Range16.init(0x0d63, 0x0d82, 31),
Range16.init(0x0d83, 0x0dca, 71),
Range16.init(0x0dcf, 0x0dd4, 1),
Range16.init(0x0dd6, 0x0dd8, 2),
Range16.init(0x0dd9, 0x0ddf, 1),
Range16.init(0x0df2, 0x0df3, 1),
Range16.init(0x0e31, 0x0e34, 3),
Range16.init(0x0e35, 0x0e3a, 1),
Range16.init(0x0e47, 0x0e4e, 1),
Range16.init(0x0eb1, 0x0eb4, 3),
Range16.init(0x0eb5, 0x0eb9, 1),
Range16.init(0x0ebb, 0x0ebc, 1),
Range16.init(0x0ec8, 0x0ecd, 1),
Range16.init(0x0f18, 0x0f19, 1),
Range16.init(0x0f35, 0x0f39, 2),
Range16.init(0x0f3e, 0x0f3f, 1),
Range16.init(0x0f71, 0x0f84, 1),
Range16.init(0x0f86, 0x0f87, 1),
Range16.init(0x0f8d, 0x0f97, 1),
Range16.init(0x0f99, 0x0fbc, 1),
Range16.init(0x0fc6, 0x102b, 101),
Range16.init(0x102c, 0x103e, 1),
Range16.init(0x1056, 0x1059, 1),
Range16.init(0x105e, 0x1060, 1),
Range16.init(0x1062, 0x1064, 1),
Range16.init(0x1067, 0x106d, 1),
Range16.init(0x1071, 0x1074, 1),
Range16.init(0x1082, 0x108d, 1),
Range16.init(0x108f, 0x109a, 11),
Range16.init(0x109b, 0x109d, 1),
Range16.init(0x135d, 0x135f, 1),
Range16.init(0x1712, 0x1714, 1),
Range16.init(0x1732, 0x1734, 1),
Range16.init(0x1752, 0x1753, 1),
Range16.init(0x1772, 0x1773, 1),
Range16.init(0x17b4, 0x17d3, 1),
Range16.init(0x17dd, 0x180b, 46),
Range16.init(0x180c, 0x180d, 1),
Range16.init(0x1885, 0x1886, 1),
Range16.init(0x18a9, 0x1920, 119),
Range16.init(0x1921, 0x192b, 1),
Range16.init(0x1930, 0x193b, 1),
Range16.init(0x1a17, 0x1a1b, 1),
Range16.init(0x1a55, 0x1a5e, 1),
Range16.init(0x1a60, 0x1a7c, 1),
Range16.init(0x1a7f, 0x1ab0, 49),
Range16.init(0x1ab1, 0x1abe, 1),
Range16.init(0x1b00, 0x1b04, 1),
Range16.init(0x1b34, 0x1b44, 1),
Range16.init(0x1b6b, 0x1b73, 1),
Range16.init(0x1b80, 0x1b82, 1),
Range16.init(0x1ba1, 0x1bad, 1),
Range16.init(0x1be6, 0x1bf3, 1),
Range16.init(0x1c24, 0x1c37, 1),
Range16.init(0x1cd0, 0x1cd2, 1),
Range16.init(0x1cd4, 0x1ce8, 1),
Range16.init(0x1ced, 0x1cf2, 5),
Range16.init(0x1cf3, 0x1cf4, 1),
Range16.init(0x1cf7, 0x1cf9, 1),
Range16.init(0x1dc0, 0x1df9, 1),
Range16.init(0x1dfb, 0x1dff, 1),
Range16.init(0x20d0, 0x20f0, 1),
Range16.init(0x2cef, 0x2cf1, 1),
Range16.init(0x2d7f, 0x2de0, 97),
Range16.init(0x2de1, 0x2dff, 1),
Range16.init(0x302a, 0x302f, 1),
Range16.init(0x3099, 0x309a, 1),
Range16.init(0xa66f, 0xa672, 1),
Range16.init(0xa674, 0xa67d, 1),
Range16.init(0xa69e, 0xa69f, 1),
Range16.init(0xa6f0, 0xa6f1, 1),
Range16.init(0xa802, 0xa806, 4),
Range16.init(0xa80b, 0xa823, 24),
Range16.init(0xa824, 0xa827, 1),
Range16.init(0xa880, 0xa881, 1),
Range16.init(0xa8b4, 0xa8c5, 1),
Range16.init(0xa8e0, 0xa8f1, 1),
Range16.init(0xa926, 0xa92d, 1),
Range16.init(0xa947, 0xa953, 1),
Range16.init(0xa980, 0xa983, 1),
Range16.init(0xa9b3, 0xa9c0, 1),
Range16.init(0xa9e5, 0xaa29, 68),
Range16.init(0xaa2a, 0xaa36, 1),
Range16.init(0xaa43, 0xaa4c, 9),
Range16.init(0xaa4d, 0xaa7b, 46),
Range16.init(0xaa7c, 0xaa7d, 1),
Range16.init(0xaab0, 0xaab2, 2),
Range16.init(0xaab3, 0xaab4, 1),
Range16.init(0xaab7, 0xaab8, 1),
Range16.init(0xaabe, 0xaabf, 1),
Range16.init(0xaac1, 0xaaeb, 42),
Range16.init(0xaaec, 0xaaef, 1),
Range16.init(0xaaf5, 0xaaf6, 1),
Range16.init(0xabe3, 0xabea, 1),
Range16.init(0xabec, 0xabed, 1),
Range16.init(0xfb1e, 0xfe00, 738),
Range16.init(0xfe01, 0xfe0f, 1),
Range16.init(0xfe20, 0xfe2f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x101fd, 0x102e0, 227),
Range32.init(0x10376, 0x1037a, 1),
Range32.init(0x10a01, 0x10a03, 1),
Range32.init(0x10a05, 0x10a06, 1),
Range32.init(0x10a0c, 0x10a0f, 1),
Range32.init(0x10a38, 0x10a3a, 1),
Range32.init(0x10a3f, 0x10ae5, 166),
Range32.init(0x10ae6, 0x11000, 1306),
Range32.init(0x11001, 0x11002, 1),
Range32.init(0x11038, 0x11046, 1),
Range32.init(0x1107f, 0x11082, 1),
Range32.init(0x110b0, 0x110ba, 1),
Range32.init(0x11100, 0x11102, 1),
Range32.init(0x11127, 0x11134, 1),
Range32.init(0x11173, 0x11180, 13),
Range32.init(0x11181, 0x11182, 1),
Range32.init(0x111b3, 0x111c0, 1),
Range32.init(0x111ca, 0x111cc, 1),
Range32.init(0x1122c, 0x11237, 1),
Range32.init(0x1123e, 0x112df, 161),
Range32.init(0x112e0, 0x112ea, 1),
Range32.init(0x11300, 0x11303, 1),
Range32.init(0x1133c, 0x1133e, 2),
Range32.init(0x1133f, 0x11344, 1),
Range32.init(0x11347, 0x11348, 1),
Range32.init(0x1134b, 0x1134d, 1),
Range32.init(0x11357, 0x11362, 11),
Range32.init(0x11363, 0x11366, 3),
Range32.init(0x11367, 0x1136c, 1),
Range32.init(0x11370, 0x11374, 1),
Range32.init(0x11435, 0x11446, 1),
Range32.init(0x114b0, 0x114c3, 1),
Range32.init(0x115af, 0x115b5, 1),
Range32.init(0x115b8, 0x115c0, 1),
Range32.init(0x115dc, 0x115dd, 1),
Range32.init(0x11630, 0x11640, 1),
Range32.init(0x116ab, 0x116b7, 1),
Range32.init(0x1171d, 0x1172b, 1),
Range32.init(0x11a01, 0x11a0a, 1),
Range32.init(0x11a33, 0x11a39, 1),
Range32.init(0x11a3b, 0x11a3e, 1),
Range32.init(0x11a47, 0x11a51, 10),
Range32.init(0x11a52, 0x11a5b, 1),
Range32.init(0x11a8a, 0x11a99, 1),
Range32.init(0x11c2f, 0x11c36, 1),
Range32.init(0x11c38, 0x11c3f, 1),
Range32.init(0x11c92, 0x11ca7, 1),
Range32.init(0x11ca9, 0x11cb6, 1),
Range32.init(0x11d31, 0x11d36, 1),
Range32.init(0x11d3a, 0x11d3c, 2),
Range32.init(0x11d3d, 0x11d3f, 2),
Range32.init(0x11d40, 0x11d45, 1),
Range32.init(0x11d47, 0x16af0, 19881),
Range32.init(0x16af1, 0x16af4, 1),
Range32.init(0x16b30, 0x16b36, 1),
Range32.init(0x16f51, 0x16f7e, 1),
Range32.init(0x16f8f, 0x16f92, 1),
Range32.init(0x1bc9d, 0x1bc9e, 1),
Range32.init(0x1d165, 0x1d169, 1),
Range32.init(0x1d16d, 0x1d172, 1),
Range32.init(0x1d17b, 0x1d182, 1),
Range32.init(0x1d185, 0x1d18b, 1),
Range32.init(0x1d1aa, 0x1d1ad, 1),
Range32.init(0x1d242, 0x1d244, 1),
Range32.init(0x1da00, 0x1da36, 1),
Range32.init(0x1da3b, 0x1da6c, 1),
Range32.init(0x1da75, 0x1da84, 15),
Range32.init(0x1da9b, 0x1da9f, 1),
Range32.init(0x1daa1, 0x1daaf, 1),
Range32.init(0x1e000, 0x1e006, 1),
Range32.init(0x1e008, 0x1e018, 1),
Range32.init(0x1e01b, 0x1e021, 1),
Range32.init(0x1e023, 0x1e024, 1),
Range32.init(0x1e026, 0x1e02a, 1),
Range32.init(0x1e8d0, 0x1e8d6, 1),
Range32.init(0x1e944, 0x1e94a, 1),
Range32.init(0xe0100, 0xe01ef, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Mc = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0903, 0x093b, 56),
Range16.init(0x093e, 0x0940, 1),
Range16.init(0x0949, 0x094c, 1),
Range16.init(0x094e, 0x094f, 1),
Range16.init(0x0982, 0x0983, 1),
Range16.init(0x09be, 0x09c0, 1),
Range16.init(0x09c7, 0x09c8, 1),
Range16.init(0x09cb, 0x09cc, 1),
Range16.init(0x09d7, 0x0a03, 44),
Range16.init(0x0a3e, 0x0a40, 1),
Range16.init(0x0a83, 0x0abe, 59),
Range16.init(0x0abf, 0x0ac0, 1),
Range16.init(0x0ac9, 0x0acb, 2),
Range16.init(0x0acc, 0x0b02, 54),
Range16.init(0x0b03, 0x0b3e, 59),
Range16.init(0x0b40, 0x0b47, 7),
Range16.init(0x0b48, 0x0b4b, 3),
Range16.init(0x0b4c, 0x0b57, 11),
Range16.init(0x0bbe, 0x0bbf, 1),
Range16.init(0x0bc1, 0x0bc2, 1),
Range16.init(0x0bc6, 0x0bc8, 1),
Range16.init(0x0bca, 0x0bcc, 1),
Range16.init(0x0bd7, 0x0c01, 42),
Range16.init(0x0c02, 0x0c03, 1),
Range16.init(0x0c41, 0x0c44, 1),
Range16.init(0x0c82, 0x0c83, 1),
Range16.init(0x0cbe, 0x0cc0, 2),
Range16.init(0x0cc1, 0x0cc4, 1),
Range16.init(0x0cc7, 0x0cc8, 1),
Range16.init(0x0cca, 0x0ccb, 1),
Range16.init(0x0cd5, 0x0cd6, 1),
Range16.init(0x0d02, 0x0d03, 1),
Range16.init(0x0d3e, 0x0d40, 1),
Range16.init(0x0d46, 0x0d48, 1),
Range16.init(0x0d4a, 0x0d4c, 1),
Range16.init(0x0d57, 0x0d82, 43),
Range16.init(0x0d83, 0x0dcf, 76),
Range16.init(0x0dd0, 0x0dd1, 1),
Range16.init(0x0dd8, 0x0ddf, 1),
Range16.init(0x0df2, 0x0df3, 1),
Range16.init(0x0f3e, 0x0f3f, 1),
Range16.init(0x0f7f, 0x102b, 172),
Range16.init(0x102c, 0x1031, 5),
Range16.init(0x1038, 0x103b, 3),
Range16.init(0x103c, 0x1056, 26),
Range16.init(0x1057, 0x1062, 11),
Range16.init(0x1063, 0x1064, 1),
Range16.init(0x1067, 0x106d, 1),
Range16.init(0x1083, 0x1084, 1),
Range16.init(0x1087, 0x108c, 1),
Range16.init(0x108f, 0x109a, 11),
Range16.init(0x109b, 0x109c, 1),
Range16.init(0x17b6, 0x17be, 8),
Range16.init(0x17bf, 0x17c5, 1),
Range16.init(0x17c7, 0x17c8, 1),
Range16.init(0x1923, 0x1926, 1),
Range16.init(0x1929, 0x192b, 1),
Range16.init(0x1930, 0x1931, 1),
Range16.init(0x1933, 0x1938, 1),
Range16.init(0x1a19, 0x1a1a, 1),
Range16.init(0x1a55, 0x1a57, 2),
Range16.init(0x1a61, 0x1a63, 2),
Range16.init(0x1a64, 0x1a6d, 9),
Range16.init(0x1a6e, 0x1a72, 1),
Range16.init(0x1b04, 0x1b35, 49),
Range16.init(0x1b3b, 0x1b3d, 2),
Range16.init(0x1b3e, 0x1b41, 1),
Range16.init(0x1b43, 0x1b44, 1),
Range16.init(0x1b82, 0x1ba1, 31),
Range16.init(0x1ba6, 0x1ba7, 1),
Range16.init(0x1baa, 0x1be7, 61),
Range16.init(0x1bea, 0x1bec, 1),
Range16.init(0x1bee, 0x1bf2, 4),
Range16.init(0x1bf3, 0x1c24, 49),
Range16.init(0x1c25, 0x1c2b, 1),
Range16.init(0x1c34, 0x1c35, 1),
Range16.init(0x1ce1, 0x1cf2, 17),
Range16.init(0x1cf3, 0x1cf7, 4),
Range16.init(0x302e, 0x302f, 1),
Range16.init(0xa823, 0xa824, 1),
Range16.init(0xa827, 0xa880, 89),
Range16.init(0xa881, 0xa8b4, 51),
Range16.init(0xa8b5, 0xa8c3, 1),
Range16.init(0xa952, 0xa953, 1),
Range16.init(0xa983, 0xa9b4, 49),
Range16.init(0xa9b5, 0xa9ba, 5),
Range16.init(0xa9bb, 0xa9bd, 2),
Range16.init(0xa9be, 0xa9c0, 1),
Range16.init(0xaa2f, 0xaa30, 1),
Range16.init(0xaa33, 0xaa34, 1),
Range16.init(0xaa4d, 0xaa7b, 46),
Range16.init(0xaa7d, 0xaaeb, 110),
Range16.init(0xaaee, 0xaaef, 1),
Range16.init(0xaaf5, 0xabe3, 238),
Range16.init(0xabe4, 0xabe6, 2),
Range16.init(0xabe7, 0xabe9, 2),
Range16.init(0xabea, 0xabec, 2),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11000, 0x11002, 2),
Range32.init(0x11082, 0x110b0, 46),
Range32.init(0x110b1, 0x110b2, 1),
Range32.init(0x110b7, 0x110b8, 1),
Range32.init(0x1112c, 0x11182, 86),
Range32.init(0x111b3, 0x111b5, 1),
Range32.init(0x111bf, 0x111c0, 1),
Range32.init(0x1122c, 0x1122e, 1),
Range32.init(0x11232, 0x11233, 1),
Range32.init(0x11235, 0x112e0, 171),
Range32.init(0x112e1, 0x112e2, 1),
Range32.init(0x11302, 0x11303, 1),
Range32.init(0x1133e, 0x1133f, 1),
Range32.init(0x11341, 0x11344, 1),
Range32.init(0x11347, 0x11348, 1),
Range32.init(0x1134b, 0x1134d, 1),
Range32.init(0x11357, 0x11362, 11),
Range32.init(0x11363, 0x11435, 210),
Range32.init(0x11436, 0x11437, 1),
Range32.init(0x11440, 0x11441, 1),
Range32.init(0x11445, 0x114b0, 107),
Range32.init(0x114b1, 0x114b2, 1),
Range32.init(0x114b9, 0x114bb, 2),
Range32.init(0x114bc, 0x114be, 1),
Range32.init(0x114c1, 0x115af, 238),
Range32.init(0x115b0, 0x115b1, 1),
Range32.init(0x115b8, 0x115bb, 1),
Range32.init(0x115be, 0x11630, 114),
Range32.init(0x11631, 0x11632, 1),
Range32.init(0x1163b, 0x1163c, 1),
Range32.init(0x1163e, 0x116ac, 110),
Range32.init(0x116ae, 0x116af, 1),
Range32.init(0x116b6, 0x11720, 106),
Range32.init(0x11721, 0x11726, 5),
Range32.init(0x11a07, 0x11a08, 1),
Range32.init(0x11a39, 0x11a57, 30),
Range32.init(0x11a58, 0x11a97, 63),
Range32.init(0x11c2f, 0x11c3e, 15),
Range32.init(0x11ca9, 0x11cb1, 8),
Range32.init(0x11cb4, 0x16f51, 21149),
Range32.init(0x16f52, 0x16f7e, 1),
Range32.init(0x1d165, 0x1d166, 1),
Range32.init(0x1d16d, 0x1d172, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Me = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0488, 0x0489, 1),
Range16.init(0x1abe, 0x20dd, 1567),
Range16.init(0x20de, 0x20e0, 1),
Range16.init(0x20e2, 0x20e4, 1),
Range16.init(0xa670, 0xa672, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Mn = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0300, 0x036f, 1),
Range16.init(0x0483, 0x0487, 1),
Range16.init(0x0591, 0x05bd, 1),
Range16.init(0x05bf, 0x05c1, 2),
Range16.init(0x05c2, 0x05c4, 2),
Range16.init(0x05c5, 0x05c7, 2),
Range16.init(0x0610, 0x061a, 1),
Range16.init(0x064b, 0x065f, 1),
Range16.init(0x0670, 0x06d6, 102),
Range16.init(0x06d7, 0x06dc, 1),
Range16.init(0x06df, 0x06e4, 1),
Range16.init(0x06e7, 0x06e8, 1),
Range16.init(0x06ea, 0x06ed, 1),
Range16.init(0x0711, 0x0730, 31),
Range16.init(0x0731, 0x074a, 1),
Range16.init(0x07a6, 0x07b0, 1),
Range16.init(0x07eb, 0x07f3, 1),
Range16.init(0x0816, 0x0819, 1),
Range16.init(0x081b, 0x0823, 1),
Range16.init(0x0825, 0x0827, 1),
Range16.init(0x0829, 0x082d, 1),
Range16.init(0x0859, 0x085b, 1),
Range16.init(0x08d4, 0x08e1, 1),
Range16.init(0x08e3, 0x0902, 1),
Range16.init(0x093a, 0x093c, 2),
Range16.init(0x0941, 0x0948, 1),
Range16.init(0x094d, 0x0951, 4),
Range16.init(0x0952, 0x0957, 1),
Range16.init(0x0962, 0x0963, 1),
Range16.init(0x0981, 0x09bc, 59),
Range16.init(0x09c1, 0x09c4, 1),
Range16.init(0x09cd, 0x09e2, 21),
Range16.init(0x09e3, 0x0a01, 30),
Range16.init(0x0a02, 0x0a3c, 58),
Range16.init(0x0a41, 0x0a42, 1),
Range16.init(0x0a47, 0x0a48, 1),
Range16.init(0x0a4b, 0x0a4d, 1),
Range16.init(0x0a51, 0x0a70, 31),
Range16.init(0x0a71, 0x0a75, 4),
Range16.init(0x0a81, 0x0a82, 1),
Range16.init(0x0abc, 0x0ac1, 5),
Range16.init(0x0ac2, 0x0ac5, 1),
Range16.init(0x0ac7, 0x0ac8, 1),
Range16.init(0x0acd, 0x0ae2, 21),
Range16.init(0x0ae3, 0x0afa, 23),
Range16.init(0x0afb, 0x0aff, 1),
Range16.init(0x0b01, 0x0b3c, 59),
Range16.init(0x0b3f, 0x0b41, 2),
Range16.init(0x0b42, 0x0b44, 1),
Range16.init(0x0b4d, 0x0b56, 9),
Range16.init(0x0b62, 0x0b63, 1),
Range16.init(0x0b82, 0x0bc0, 62),
Range16.init(0x0bcd, 0x0c00, 51),
Range16.init(0x0c3e, 0x0c40, 1),
Range16.init(0x0c46, 0x0c48, 1),
Range16.init(0x0c4a, 0x0c4d, 1),
Range16.init(0x0c55, 0x0c56, 1),
Range16.init(0x0c62, 0x0c63, 1),
Range16.init(0x0c81, 0x0cbc, 59),
Range16.init(0x0cbf, 0x0cc6, 7),
Range16.init(0x0ccc, 0x0ccd, 1),
Range16.init(0x0ce2, 0x0ce3, 1),
Range16.init(0x0d00, 0x0d01, 1),
Range16.init(0x0d3b, 0x0d3c, 1),
Range16.init(0x0d41, 0x0d44, 1),
Range16.init(0x0d4d, 0x0d62, 21),
Range16.init(0x0d63, 0x0dca, 103),
Range16.init(0x0dd2, 0x0dd4, 1),
Range16.init(0x0dd6, 0x0e31, 91),
Range16.init(0x0e34, 0x0e3a, 1),
Range16.init(0x0e47, 0x0e4e, 1),
Range16.init(0x0eb1, 0x0eb4, 3),
Range16.init(0x0eb5, 0x0eb9, 1),
Range16.init(0x0ebb, 0x0ebc, 1),
Range16.init(0x0ec8, 0x0ecd, 1),
Range16.init(0x0f18, 0x0f19, 1),
Range16.init(0x0f35, 0x0f39, 2),
Range16.init(0x0f71, 0x0f7e, 1),
Range16.init(0x0f80, 0x0f84, 1),
Range16.init(0x0f86, 0x0f87, 1),
Range16.init(0x0f8d, 0x0f97, 1),
Range16.init(0x0f99, 0x0fbc, 1),
Range16.init(0x0fc6, 0x102d, 103),
Range16.init(0x102e, 0x1030, 1),
Range16.init(0x1032, 0x1037, 1),
Range16.init(0x1039, 0x103a, 1),
Range16.init(0x103d, 0x103e, 1),
Range16.init(0x1058, 0x1059, 1),
Range16.init(0x105e, 0x1060, 1),
Range16.init(0x1071, 0x1074, 1),
Range16.init(0x1082, 0x1085, 3),
Range16.init(0x1086, 0x108d, 7),
Range16.init(0x109d, 0x135d, 704),
Range16.init(0x135e, 0x135f, 1),
Range16.init(0x1712, 0x1714, 1),
Range16.init(0x1732, 0x1734, 1),
Range16.init(0x1752, 0x1753, 1),
Range16.init(0x1772, 0x1773, 1),
Range16.init(0x17b4, 0x17b5, 1),
Range16.init(0x17b7, 0x17bd, 1),
Range16.init(0x17c6, 0x17c9, 3),
Range16.init(0x17ca, 0x17d3, 1),
Range16.init(0x17dd, 0x180b, 46),
Range16.init(0x180c, 0x180d, 1),
Range16.init(0x1885, 0x1886, 1),
Range16.init(0x18a9, 0x1920, 119),
Range16.init(0x1921, 0x1922, 1),
Range16.init(0x1927, 0x1928, 1),
Range16.init(0x1932, 0x1939, 7),
Range16.init(0x193a, 0x193b, 1),
Range16.init(0x1a17, 0x1a18, 1),
Range16.init(0x1a1b, 0x1a56, 59),
Range16.init(0x1a58, 0x1a5e, 1),
Range16.init(0x1a60, 0x1a62, 2),
Range16.init(0x1a65, 0x1a6c, 1),
Range16.init(0x1a73, 0x1a7c, 1),
Range16.init(0x1a7f, 0x1ab0, 49),
Range16.init(0x1ab1, 0x1abd, 1),
Range16.init(0x1b00, 0x1b03, 1),
Range16.init(0x1b34, 0x1b36, 2),
Range16.init(0x1b37, 0x1b3a, 1),
Range16.init(0x1b3c, 0x1b42, 6),
Range16.init(0x1b6b, 0x1b73, 1),
Range16.init(0x1b80, 0x1b81, 1),
Range16.init(0x1ba2, 0x1ba5, 1),
Range16.init(0x1ba8, 0x1ba9, 1),
Range16.init(0x1bab, 0x1bad, 1),
Range16.init(0x1be6, 0x1be8, 2),
Range16.init(0x1be9, 0x1bed, 4),
Range16.init(0x1bef, 0x1bf1, 1),
Range16.init(0x1c2c, 0x1c33, 1),
Range16.init(0x1c36, 0x1c37, 1),
Range16.init(0x1cd0, 0x1cd2, 1),
Range16.init(0x1cd4, 0x1ce0, 1),
Range16.init(0x1ce2, 0x1ce8, 1),
Range16.init(0x1ced, 0x1cf4, 7),
Range16.init(0x1cf8, 0x1cf9, 1),
Range16.init(0x1dc0, 0x1df9, 1),
Range16.init(0x1dfb, 0x1dff, 1),
Range16.init(0x20d0, 0x20dc, 1),
Range16.init(0x20e1, 0x20e5, 4),
Range16.init(0x20e6, 0x20f0, 1),
Range16.init(0x2cef, 0x2cf1, 1),
Range16.init(0x2d7f, 0x2de0, 97),
Range16.init(0x2de1, 0x2dff, 1),
Range16.init(0x302a, 0x302d, 1),
Range16.init(0x3099, 0x309a, 1),
Range16.init(0xa66f, 0xa674, 5),
Range16.init(0xa675, 0xa67d, 1),
Range16.init(0xa69e, 0xa69f, 1),
Range16.init(0xa6f0, 0xa6f1, 1),
Range16.init(0xa802, 0xa806, 4),
Range16.init(0xa80b, 0xa825, 26),
Range16.init(0xa826, 0xa8c4, 158),
Range16.init(0xa8c5, 0xa8e0, 27),
Range16.init(0xa8e1, 0xa8f1, 1),
Range16.init(0xa926, 0xa92d, 1),
Range16.init(0xa947, 0xa951, 1),
Range16.init(0xa980, 0xa982, 1),
Range16.init(0xa9b3, 0xa9b6, 3),
Range16.init(0xa9b7, 0xa9b9, 1),
Range16.init(0xa9bc, 0xa9e5, 41),
Range16.init(0xaa29, 0xaa2e, 1),
Range16.init(0xaa31, 0xaa32, 1),
Range16.init(0xaa35, 0xaa36, 1),
Range16.init(0xaa43, 0xaa4c, 9),
Range16.init(0xaa7c, 0xaab0, 52),
Range16.init(0xaab2, 0xaab4, 1),
Range16.init(0xaab7, 0xaab8, 1),
Range16.init(0xaabe, 0xaabf, 1),
Range16.init(0xaac1, 0xaaec, 43),
Range16.init(0xaaed, 0xaaf6, 9),
Range16.init(0xabe5, 0xabe8, 3),
Range16.init(0xabed, 0xfb1e, 20273),
Range16.init(0xfe00, 0xfe0f, 1),
Range16.init(0xfe20, 0xfe2f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x101fd, 0x102e0, 227),
Range32.init(0x10376, 0x1037a, 1),
Range32.init(0x10a01, 0x10a03, 1),
Range32.init(0x10a05, 0x10a06, 1),
Range32.init(0x10a0c, 0x10a0f, 1),
Range32.init(0x10a38, 0x10a3a, 1),
Range32.init(0x10a3f, 0x10ae5, 166),
Range32.init(0x10ae6, 0x11001, 1307),
Range32.init(0x11038, 0x11046, 1),
Range32.init(0x1107f, 0x11081, 1),
Range32.init(0x110b3, 0x110b6, 1),
Range32.init(0x110b9, 0x110ba, 1),
Range32.init(0x11100, 0x11102, 1),
Range32.init(0x11127, 0x1112b, 1),
Range32.init(0x1112d, 0x11134, 1),
Range32.init(0x11173, 0x11180, 13),
Range32.init(0x11181, 0x111b6, 53),
Range32.init(0x111b7, 0x111be, 1),
Range32.init(0x111ca, 0x111cc, 1),
Range32.init(0x1122f, 0x11231, 1),
Range32.init(0x11234, 0x11236, 2),
Range32.init(0x11237, 0x1123e, 7),
Range32.init(0x112df, 0x112e3, 4),
Range32.init(0x112e4, 0x112ea, 1),
Range32.init(0x11300, 0x11301, 1),
Range32.init(0x1133c, 0x11340, 4),
Range32.init(0x11366, 0x1136c, 1),
Range32.init(0x11370, 0x11374, 1),
Range32.init(0x11438, 0x1143f, 1),
Range32.init(0x11442, 0x11444, 1),
Range32.init(0x11446, 0x114b3, 109),
Range32.init(0x114b4, 0x114b8, 1),
Range32.init(0x114ba, 0x114bf, 5),
Range32.init(0x114c0, 0x114c2, 2),
Range32.init(0x114c3, 0x115b2, 239),
Range32.init(0x115b3, 0x115b5, 1),
Range32.init(0x115bc, 0x115bd, 1),
Range32.init(0x115bf, 0x115c0, 1),
Range32.init(0x115dc, 0x115dd, 1),
Range32.init(0x11633, 0x1163a, 1),
Range32.init(0x1163d, 0x1163f, 2),
Range32.init(0x11640, 0x116ab, 107),
Range32.init(0x116ad, 0x116b0, 3),
Range32.init(0x116b1, 0x116b5, 1),
Range32.init(0x116b7, 0x1171d, 102),
Range32.init(0x1171e, 0x1171f, 1),
Range32.init(0x11722, 0x11725, 1),
Range32.init(0x11727, 0x1172b, 1),
Range32.init(0x11a01, 0x11a06, 1),
Range32.init(0x11a09, 0x11a0a, 1),
Range32.init(0x11a33, 0x11a38, 1),
Range32.init(0x11a3b, 0x11a3e, 1),
Range32.init(0x11a47, 0x11a51, 10),
Range32.init(0x11a52, 0x11a56, 1),
Range32.init(0x11a59, 0x11a5b, 1),
Range32.init(0x11a8a, 0x11a96, 1),
Range32.init(0x11a98, 0x11a99, 1),
Range32.init(0x11c30, 0x11c36, 1),
Range32.init(0x11c38, 0x11c3d, 1),
Range32.init(0x11c3f, 0x11c92, 83),
Range32.init(0x11c93, 0x11ca7, 1),
Range32.init(0x11caa, 0x11cb0, 1),
Range32.init(0x11cb2, 0x11cb3, 1),
Range32.init(0x11cb5, 0x11cb6, 1),
Range32.init(0x11d31, 0x11d36, 1),
Range32.init(0x11d3a, 0x11d3c, 2),
Range32.init(0x11d3d, 0x11d3f, 2),
Range32.init(0x11d40, 0x11d45, 1),
Range32.init(0x11d47, 0x16af0, 19881),
Range32.init(0x16af1, 0x16af4, 1),
Range32.init(0x16b30, 0x16b36, 1),
Range32.init(0x16f8f, 0x16f92, 1),
Range32.init(0x1bc9d, 0x1bc9e, 1),
Range32.init(0x1d167, 0x1d169, 1),
Range32.init(0x1d17b, 0x1d182, 1),
Range32.init(0x1d185, 0x1d18b, 1),
Range32.init(0x1d1aa, 0x1d1ad, 1),
Range32.init(0x1d242, 0x1d244, 1),
Range32.init(0x1da00, 0x1da36, 1),
Range32.init(0x1da3b, 0x1da6c, 1),
Range32.init(0x1da75, 0x1da84, 15),
Range32.init(0x1da9b, 0x1da9f, 1),
Range32.init(0x1daa1, 0x1daaf, 1),
Range32.init(0x1e000, 0x1e006, 1),
Range32.init(0x1e008, 0x1e018, 1),
Range32.init(0x1e01b, 0x1e021, 1),
Range32.init(0x1e023, 0x1e024, 1),
Range32.init(0x1e026, 0x1e02a, 1),
Range32.init(0x1e8d0, 0x1e8d6, 1),
Range32.init(0x1e944, 0x1e94a, 1),
Range32.init(0xe0100, 0xe01ef, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _N = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0030, 0x0039, 1),
Range16.init(0x00b2, 0x00b3, 1),
Range16.init(0x00b9, 0x00bc, 3),
Range16.init(0x00bd, 0x00be, 1),
Range16.init(0x0660, 0x0669, 1),
Range16.init(0x06f0, 0x06f9, 1),
Range16.init(0x07c0, 0x07c9, 1),
Range16.init(0x0966, 0x096f, 1),
Range16.init(0x09e6, 0x09ef, 1),
Range16.init(0x09f4, 0x09f9, 1),
Range16.init(0x0a66, 0x0a6f, 1),
Range16.init(0x0ae6, 0x0aef, 1),
Range16.init(0x0b66, 0x0b6f, 1),
Range16.init(0x0b72, 0x0b77, 1),
Range16.init(0x0be6, 0x0bf2, 1),
Range16.init(0x0c66, 0x0c6f, 1),
Range16.init(0x0c78, 0x0c7e, 1),
Range16.init(0x0ce6, 0x0cef, 1),
Range16.init(0x0d58, 0x0d5e, 1),
Range16.init(0x0d66, 0x0d78, 1),
Range16.init(0x0de6, 0x0def, 1),
Range16.init(0x0e50, 0x0e59, 1),
Range16.init(0x0ed0, 0x0ed9, 1),
Range16.init(0x0f20, 0x0f33, 1),
Range16.init(0x1040, 0x1049, 1),
Range16.init(0x1090, 0x1099, 1),
Range16.init(0x1369, 0x137c, 1),
Range16.init(0x16ee, 0x16f0, 1),
Range16.init(0x17e0, 0x17e9, 1),
Range16.init(0x17f0, 0x17f9, 1),
Range16.init(0x1810, 0x1819, 1),
Range16.init(0x1946, 0x194f, 1),
Range16.init(0x19d0, 0x19da, 1),
Range16.init(0x1a80, 0x1a89, 1),
Range16.init(0x1a90, 0x1a99, 1),
Range16.init(0x1b50, 0x1b59, 1),
Range16.init(0x1bb0, 0x1bb9, 1),
Range16.init(0x1c40, 0x1c49, 1),
Range16.init(0x1c50, 0x1c59, 1),
Range16.init(0x2070, 0x2074, 4),
Range16.init(0x2075, 0x2079, 1),
Range16.init(0x2080, 0x2089, 1),
Range16.init(0x2150, 0x2182, 1),
Range16.init(0x2185, 0x2189, 1),
Range16.init(0x2460, 0x249b, 1),
Range16.init(0x24ea, 0x24ff, 1),
Range16.init(0x2776, 0x2793, 1),
Range16.init(0x2cfd, 0x3007, 778),
Range16.init(0x3021, 0x3029, 1),
Range16.init(0x3038, 0x303a, 1),
Range16.init(0x3192, 0x3195, 1),
Range16.init(0x3220, 0x3229, 1),
Range16.init(0x3248, 0x324f, 1),
Range16.init(0x3251, 0x325f, 1),
Range16.init(0x3280, 0x3289, 1),
Range16.init(0x32b1, 0x32bf, 1),
Range16.init(0xa620, 0xa629, 1),
Range16.init(0xa6e6, 0xa6ef, 1),
Range16.init(0xa830, 0xa835, 1),
Range16.init(0xa8d0, 0xa8d9, 1),
Range16.init(0xa900, 0xa909, 1),
Range16.init(0xa9d0, 0xa9d9, 1),
Range16.init(0xa9f0, 0xa9f9, 1),
Range16.init(0xaa50, 0xaa59, 1),
Range16.init(0xabf0, 0xabf9, 1),
Range16.init(0xff10, 0xff19, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10107, 0x10133, 1),
Range32.init(0x10140, 0x10178, 1),
Range32.init(0x1018a, 0x1018b, 1),
Range32.init(0x102e1, 0x102fb, 1),
Range32.init(0x10320, 0x10323, 1),
Range32.init(0x10341, 0x1034a, 9),
Range32.init(0x103d1, 0x103d5, 1),
Range32.init(0x104a0, 0x104a9, 1),
Range32.init(0x10858, 0x1085f, 1),
Range32.init(0x10879, 0x1087f, 1),
Range32.init(0x108a7, 0x108af, 1),
Range32.init(0x108fb, 0x108ff, 1),
Range32.init(0x10916, 0x1091b, 1),
Range32.init(0x109bc, 0x109bd, 1),
Range32.init(0x109c0, 0x109cf, 1),
Range32.init(0x109d2, 0x109ff, 1),
Range32.init(0x10a40, 0x10a47, 1),
Range32.init(0x10a7d, 0x10a7e, 1),
Range32.init(0x10a9d, 0x10a9f, 1),
Range32.init(0x10aeb, 0x10aef, 1),
Range32.init(0x10b58, 0x10b5f, 1),
Range32.init(0x10b78, 0x10b7f, 1),
Range32.init(0x10ba9, 0x10baf, 1),
Range32.init(0x10cfa, 0x10cff, 1),
Range32.init(0x10e60, 0x10e7e, 1),
Range32.init(0x11052, 0x1106f, 1),
Range32.init(0x110f0, 0x110f9, 1),
Range32.init(0x11136, 0x1113f, 1),
Range32.init(0x111d0, 0x111d9, 1),
Range32.init(0x111e1, 0x111f4, 1),
Range32.init(0x112f0, 0x112f9, 1),
Range32.init(0x11450, 0x11459, 1),
Range32.init(0x114d0, 0x114d9, 1),
Range32.init(0x11650, 0x11659, 1),
Range32.init(0x116c0, 0x116c9, 1),
Range32.init(0x11730, 0x1173b, 1),
Range32.init(0x118e0, 0x118f2, 1),
Range32.init(0x11c50, 0x11c6c, 1),
Range32.init(0x11d50, 0x11d59, 1),
Range32.init(0x12400, 0x1246e, 1),
Range32.init(0x16a60, 0x16a69, 1),
Range32.init(0x16b50, 0x16b59, 1),
Range32.init(0x16b5b, 0x16b61, 1),
Range32.init(0x1d360, 0x1d371, 1),
Range32.init(0x1d7ce, 0x1d7ff, 1),
Range32.init(0x1e8c7, 0x1e8cf, 1),
Range32.init(0x1e950, 0x1e959, 1),
Range32.init(0x1f100, 0x1f10c, 1),
};
break :init r[0..];
},
.latin_offset = 4,
};
const _Nd = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0030, 0x0039, 1),
Range16.init(0x0660, 0x0669, 1),
Range16.init(0x06f0, 0x06f9, 1),
Range16.init(0x07c0, 0x07c9, 1),
Range16.init(0x0966, 0x096f, 1),
Range16.init(0x09e6, 0x09ef, 1),
Range16.init(0x0a66, 0x0a6f, 1),
Range16.init(0x0ae6, 0x0aef, 1),
Range16.init(0x0b66, 0x0b6f, 1),
Range16.init(0x0be6, 0x0bef, 1),
Range16.init(0x0c66, 0x0c6f, 1),
Range16.init(0x0ce6, 0x0cef, 1),
Range16.init(0x0d66, 0x0d6f, 1),
Range16.init(0x0de6, 0x0def, 1),
Range16.init(0x0e50, 0x0e59, 1),
Range16.init(0x0ed0, 0x0ed9, 1),
Range16.init(0x0f20, 0x0f29, 1),
Range16.init(0x1040, 0x1049, 1),
Range16.init(0x1090, 0x1099, 1),
Range16.init(0x17e0, 0x17e9, 1),
Range16.init(0x1810, 0x1819, 1),
Range16.init(0x1946, 0x194f, 1),
Range16.init(0x19d0, 0x19d9, 1),
Range16.init(0x1a80, 0x1a89, 1),
Range16.init(0x1a90, 0x1a99, 1),
Range16.init(0x1b50, 0x1b59, 1),
Range16.init(0x1bb0, 0x1bb9, 1),
Range16.init(0x1c40, 0x1c49, 1),
Range16.init(0x1c50, 0x1c59, 1),
Range16.init(0xa620, 0xa629, 1),
Range16.init(0xa8d0, 0xa8d9, 1),
Range16.init(0xa900, 0xa909, 1),
Range16.init(0xa9d0, 0xa9d9, 1),
Range16.init(0xa9f0, 0xa9f9, 1),
Range16.init(0xaa50, 0xaa59, 1),
Range16.init(0xabf0, 0xabf9, 1),
Range16.init(0xff10, 0xff19, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x104a0, 0x104a9, 1),
Range32.init(0x11066, 0x1106f, 1),
Range32.init(0x110f0, 0x110f9, 1),
Range32.init(0x11136, 0x1113f, 1),
Range32.init(0x111d0, 0x111d9, 1),
Range32.init(0x112f0, 0x112f9, 1),
Range32.init(0x11450, 0x11459, 1),
Range32.init(0x114d0, 0x114d9, 1),
Range32.init(0x11650, 0x11659, 1),
Range32.init(0x116c0, 0x116c9, 1),
Range32.init(0x11730, 0x11739, 1),
Range32.init(0x118e0, 0x118e9, 1),
Range32.init(0x11c50, 0x11c59, 1),
Range32.init(0x11d50, 0x11d59, 1),
Range32.init(0x16a60, 0x16a69, 1),
Range32.init(0x16b50, 0x16b59, 1),
Range32.init(0x1d7ce, 0x1d7ff, 1),
Range32.init(0x1e950, 0x1e959, 1),
};
break :init r[0..];
},
.latin_offset = 1,
};
const _Nl = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x16ee, 0x16f0, 1),
Range16.init(0x2160, 0x2182, 1),
Range16.init(0x2185, 0x2188, 1),
Range16.init(0x3007, 0x3021, 26),
Range16.init(0x3022, 0x3029, 1),
Range16.init(0x3038, 0x303a, 1),
Range16.init(0xa6e6, 0xa6ef, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10140, 0x10174, 1),
Range32.init(0x10341, 0x1034a, 9),
Range32.init(0x103d1, 0x103d5, 1),
Range32.init(0x12400, 0x1246e, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _No = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00b2, 0x00b3, 1),
Range16.init(0x00b9, 0x00bc, 3),
Range16.init(0x00bd, 0x00be, 1),
Range16.init(0x09f4, 0x09f9, 1),
Range16.init(0x0b72, 0x0b77, 1),
Range16.init(0x0bf0, 0x0bf2, 1),
Range16.init(0x0c78, 0x0c7e, 1),
Range16.init(0x0d58, 0x0d5e, 1),
Range16.init(0x0d70, 0x0d78, 1),
Range16.init(0x0f2a, 0x0f33, 1),
Range16.init(0x1369, 0x137c, 1),
Range16.init(0x17f0, 0x17f9, 1),
Range16.init(0x19da, 0x2070, 1686),
Range16.init(0x2074, 0x2079, 1),
Range16.init(0x2080, 0x2089, 1),
Range16.init(0x2150, 0x215f, 1),
Range16.init(0x2189, 0x2460, 727),
Range16.init(0x2461, 0x249b, 1),
Range16.init(0x24ea, 0x24ff, 1),
Range16.init(0x2776, 0x2793, 1),
Range16.init(0x2cfd, 0x3192, 1173),
Range16.init(0x3193, 0x3195, 1),
Range16.init(0x3220, 0x3229, 1),
Range16.init(0x3248, 0x324f, 1),
Range16.init(0x3251, 0x325f, 1),
Range16.init(0x3280, 0x3289, 1),
Range16.init(0x32b1, 0x32bf, 1),
Range16.init(0xa830, 0xa835, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10107, 0x10133, 1),
Range32.init(0x10175, 0x10178, 1),
Range32.init(0x1018a, 0x1018b, 1),
Range32.init(0x102e1, 0x102fb, 1),
Range32.init(0x10320, 0x10323, 1),
Range32.init(0x10858, 0x1085f, 1),
Range32.init(0x10879, 0x1087f, 1),
Range32.init(0x108a7, 0x108af, 1),
Range32.init(0x108fb, 0x108ff, 1),
Range32.init(0x10916, 0x1091b, 1),
Range32.init(0x109bc, 0x109bd, 1),
Range32.init(0x109c0, 0x109cf, 1),
Range32.init(0x109d2, 0x109ff, 1),
Range32.init(0x10a40, 0x10a47, 1),
Range32.init(0x10a7d, 0x10a7e, 1),
Range32.init(0x10a9d, 0x10a9f, 1),
Range32.init(0x10aeb, 0x10aef, 1),
Range32.init(0x10b58, 0x10b5f, 1),
Range32.init(0x10b78, 0x10b7f, 1),
Range32.init(0x10ba9, 0x10baf, 1),
Range32.init(0x10cfa, 0x10cff, 1),
Range32.init(0x10e60, 0x10e7e, 1),
Range32.init(0x11052, 0x11065, 1),
Range32.init(0x111e1, 0x111f4, 1),
Range32.init(0x1173a, 0x1173b, 1),
Range32.init(0x118ea, 0x118f2, 1),
Range32.init(0x11c5a, 0x11c6c, 1),
Range32.init(0x16b5b, 0x16b61, 1),
Range32.init(0x1d360, 0x1d371, 1),
Range32.init(0x1e8c7, 0x1e8cf, 1),
Range32.init(0x1f100, 0x1f10c, 1),
};
break :init r[0..];
},
.latin_offset = 3,
};
const _P = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0021, 0x0023, 1),
Range16.init(0x0025, 0x002a, 1),
Range16.init(0x002c, 0x002f, 1),
Range16.init(0x003a, 0x003b, 1),
Range16.init(0x003f, 0x0040, 1),
Range16.init(0x005b, 0x005d, 1),
Range16.init(0x005f, 0x007b, 28),
Range16.init(0x007d, 0x00a1, 36),
Range16.init(0x00a7, 0x00ab, 4),
Range16.init(0x00b6, 0x00b7, 1),
Range16.init(0x00bb, 0x00bf, 4),
Range16.init(0x037e, 0x0387, 9),
Range16.init(0x055a, 0x055f, 1),
Range16.init(0x0589, 0x058a, 1),
Range16.init(0x05be, 0x05c0, 2),
Range16.init(0x05c3, 0x05c6, 3),
Range16.init(0x05f3, 0x05f4, 1),
Range16.init(0x0609, 0x060a, 1),
Range16.init(0x060c, 0x060d, 1),
Range16.init(0x061b, 0x061e, 3),
Range16.init(0x061f, 0x066a, 75),
Range16.init(0x066b, 0x066d, 1),
Range16.init(0x06d4, 0x0700, 44),
Range16.init(0x0701, 0x070d, 1),
Range16.init(0x07f7, 0x07f9, 1),
Range16.init(0x0830, 0x083e, 1),
Range16.init(0x085e, 0x0964, 262),
Range16.init(0x0965, 0x0970, 11),
Range16.init(0x09fd, 0x0af0, 243),
Range16.init(0x0df4, 0x0e4f, 91),
Range16.init(0x0e5a, 0x0e5b, 1),
Range16.init(0x0f04, 0x0f12, 1),
Range16.init(0x0f14, 0x0f3a, 38),
Range16.init(0x0f3b, 0x0f3d, 1),
Range16.init(0x0f85, 0x0fd0, 75),
Range16.init(0x0fd1, 0x0fd4, 1),
Range16.init(0x0fd9, 0x0fda, 1),
Range16.init(0x104a, 0x104f, 1),
Range16.init(0x10fb, 0x1360, 613),
Range16.init(0x1361, 0x1368, 1),
Range16.init(0x1400, 0x166d, 621),
Range16.init(0x166e, 0x169b, 45),
Range16.init(0x169c, 0x16eb, 79),
Range16.init(0x16ec, 0x16ed, 1),
Range16.init(0x1735, 0x1736, 1),
Range16.init(0x17d4, 0x17d6, 1),
Range16.init(0x17d8, 0x17da, 1),
Range16.init(0x1800, 0x180a, 1),
Range16.init(0x1944, 0x1945, 1),
Range16.init(0x1a1e, 0x1a1f, 1),
Range16.init(0x1aa0, 0x1aa6, 1),
Range16.init(0x1aa8, 0x1aad, 1),
Range16.init(0x1b5a, 0x1b60, 1),
Range16.init(0x1bfc, 0x1bff, 1),
Range16.init(0x1c3b, 0x1c3f, 1),
Range16.init(0x1c7e, 0x1c7f, 1),
Range16.init(0x1cc0, 0x1cc7, 1),
Range16.init(0x1cd3, 0x2010, 829),
Range16.init(0x2011, 0x2027, 1),
Range16.init(0x2030, 0x2043, 1),
Range16.init(0x2045, 0x2051, 1),
Range16.init(0x2053, 0x205e, 1),
Range16.init(0x207d, 0x207e, 1),
Range16.init(0x208d, 0x208e, 1),
Range16.init(0x2308, 0x230b, 1),
Range16.init(0x2329, 0x232a, 1),
Range16.init(0x2768, 0x2775, 1),
Range16.init(0x27c5, 0x27c6, 1),
Range16.init(0x27e6, 0x27ef, 1),
Range16.init(0x2983, 0x2998, 1),
Range16.init(0x29d8, 0x29db, 1),
Range16.init(0x29fc, 0x29fd, 1),
Range16.init(0x2cf9, 0x2cfc, 1),
Range16.init(0x2cfe, 0x2cff, 1),
Range16.init(0x2d70, 0x2e00, 144),
Range16.init(0x2e01, 0x2e2e, 1),
Range16.init(0x2e30, 0x2e49, 1),
Range16.init(0x3001, 0x3003, 1),
Range16.init(0x3008, 0x3011, 1),
Range16.init(0x3014, 0x301f, 1),
Range16.init(0x3030, 0x303d, 13),
Range16.init(0x30a0, 0x30fb, 91),
Range16.init(0xa4fe, 0xa4ff, 1),
Range16.init(0xa60d, 0xa60f, 1),
Range16.init(0xa673, 0xa67e, 11),
Range16.init(0xa6f2, 0xa6f7, 1),
Range16.init(0xa874, 0xa877, 1),
Range16.init(0xa8ce, 0xa8cf, 1),
Range16.init(0xa8f8, 0xa8fa, 1),
Range16.init(0xa8fc, 0xa92e, 50),
Range16.init(0xa92f, 0xa95f, 48),
Range16.init(0xa9c1, 0xa9cd, 1),
Range16.init(0xa9de, 0xa9df, 1),
Range16.init(0xaa5c, 0xaa5f, 1),
Range16.init(0xaade, 0xaadf, 1),
Range16.init(0xaaf0, 0xaaf1, 1),
Range16.init(0xabeb, 0xfd3e, 20819),
Range16.init(0xfd3f, 0xfe10, 209),
Range16.init(0xfe11, 0xfe19, 1),
Range16.init(0xfe30, 0xfe52, 1),
Range16.init(0xfe54, 0xfe61, 1),
Range16.init(0xfe63, 0xfe68, 5),
Range16.init(0xfe6a, 0xfe6b, 1),
Range16.init(0xff01, 0xff03, 1),
Range16.init(0xff05, 0xff0a, 1),
Range16.init(0xff0c, 0xff0f, 1),
Range16.init(0xff1a, 0xff1b, 1),
Range16.init(0xff1f, 0xff20, 1),
Range16.init(0xff3b, 0xff3d, 1),
Range16.init(0xff3f, 0xff5b, 28),
Range16.init(0xff5d, 0xff5f, 2),
Range16.init(0xff60, 0xff65, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10100, 0x10102, 1),
Range32.init(0x1039f, 0x103d0, 49),
Range32.init(0x1056f, 0x10857, 744),
Range32.init(0x1091f, 0x1093f, 32),
Range32.init(0x10a50, 0x10a58, 1),
Range32.init(0x10a7f, 0x10af0, 113),
Range32.init(0x10af1, 0x10af6, 1),
Range32.init(0x10b39, 0x10b3f, 1),
Range32.init(0x10b99, 0x10b9c, 1),
Range32.init(0x11047, 0x1104d, 1),
Range32.init(0x110bb, 0x110bc, 1),
Range32.init(0x110be, 0x110c1, 1),
Range32.init(0x11140, 0x11143, 1),
Range32.init(0x11174, 0x11175, 1),
Range32.init(0x111c5, 0x111c9, 1),
Range32.init(0x111cd, 0x111db, 14),
Range32.init(0x111dd, 0x111df, 1),
Range32.init(0x11238, 0x1123d, 1),
Range32.init(0x112a9, 0x1144b, 418),
Range32.init(0x1144c, 0x1144f, 1),
Range32.init(0x1145b, 0x1145d, 2),
Range32.init(0x114c6, 0x115c1, 251),
Range32.init(0x115c2, 0x115d7, 1),
Range32.init(0x11641, 0x11643, 1),
Range32.init(0x11660, 0x1166c, 1),
Range32.init(0x1173c, 0x1173e, 1),
Range32.init(0x11a3f, 0x11a46, 1),
Range32.init(0x11a9a, 0x11a9c, 1),
Range32.init(0x11a9e, 0x11aa2, 1),
Range32.init(0x11c41, 0x11c45, 1),
Range32.init(0x11c70, 0x11c71, 1),
Range32.init(0x12470, 0x12474, 1),
Range32.init(0x16a6e, 0x16a6f, 1),
Range32.init(0x16af5, 0x16b37, 66),
Range32.init(0x16b38, 0x16b3b, 1),
Range32.init(0x16b44, 0x1bc9f, 20827),
Range32.init(0x1da87, 0x1da8b, 1),
Range32.init(0x1e95e, 0x1e95f, 1),
};
break :init r[0..];
},
.latin_offset = 11,
};
const _Pc = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x005f, 0x203f, 8160),
Range16.init(0x2040, 0x2054, 20),
Range16.init(0xfe33, 0xfe34, 1),
Range16.init(0xfe4d, 0xfe4f, 1),
Range16.init(0xff3f, 0xff3f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Pd = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x002d, 0x058a, 1373),
Range16.init(0x05be, 0x1400, 3650),
Range16.init(0x1806, 0x2010, 2058),
Range16.init(0x2011, 0x2015, 1),
Range16.init(0x2e17, 0x2e1a, 3),
Range16.init(0x2e3a, 0x2e3b, 1),
Range16.init(0x2e40, 0x301c, 476),
Range16.init(0x3030, 0x30a0, 112),
Range16.init(0xfe31, 0xfe32, 1),
Range16.init(0xfe58, 0xfe63, 11),
Range16.init(0xff0d, 0xff0d, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Pe = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0029, 0x005d, 52),
Range16.init(0x007d, 0x0f3b, 3774),
Range16.init(0x0f3d, 0x169c, 1887),
Range16.init(0x2046, 0x207e, 56),
Range16.init(0x208e, 0x2309, 635),
Range16.init(0x230b, 0x232a, 31),
Range16.init(0x2769, 0x2775, 2),
Range16.init(0x27c6, 0x27e7, 33),
Range16.init(0x27e9, 0x27ef, 2),
Range16.init(0x2984, 0x2998, 2),
Range16.init(0x29d9, 0x29db, 2),
Range16.init(0x29fd, 0x2e23, 1062),
Range16.init(0x2e25, 0x2e29, 2),
Range16.init(0x3009, 0x3011, 2),
Range16.init(0x3015, 0x301b, 2),
Range16.init(0x301e, 0x301f, 1),
Range16.init(0xfd3e, 0xfe18, 218),
Range16.init(0xfe36, 0xfe44, 2),
Range16.init(0xfe48, 0xfe5a, 18),
Range16.init(0xfe5c, 0xfe5e, 2),
Range16.init(0xff09, 0xff3d, 52),
Range16.init(0xff5d, 0xff63, 3),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 1,
};
const _Pf = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00bb, 0x2019, 8030),
Range16.init(0x201d, 0x203a, 29),
Range16.init(0x2e03, 0x2e05, 2),
Range16.init(0x2e0a, 0x2e0d, 3),
Range16.init(0x2e1d, 0x2e21, 4),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Pi = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00ab, 0x2018, 8045),
Range16.init(0x201b, 0x201c, 1),
Range16.init(0x201f, 0x2039, 26),
Range16.init(0x2e02, 0x2e04, 2),
Range16.init(0x2e09, 0x2e0c, 3),
Range16.init(0x2e1c, 0x2e20, 4),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Po = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0021, 0x0023, 1),
Range16.init(0x0025, 0x0027, 1),
Range16.init(0x002a, 0x002e, 2),
Range16.init(0x002f, 0x003a, 11),
Range16.init(0x003b, 0x003f, 4),
Range16.init(0x0040, 0x005c, 28),
Range16.init(0x00a1, 0x00a7, 6),
Range16.init(0x00b6, 0x00b7, 1),
Range16.init(0x00bf, 0x037e, 703),
Range16.init(0x0387, 0x055a, 467),
Range16.init(0x055b, 0x055f, 1),
Range16.init(0x0589, 0x05c0, 55),
Range16.init(0x05c3, 0x05c6, 3),
Range16.init(0x05f3, 0x05f4, 1),
Range16.init(0x0609, 0x060a, 1),
Range16.init(0x060c, 0x060d, 1),
Range16.init(0x061b, 0x061e, 3),
Range16.init(0x061f, 0x066a, 75),
Range16.init(0x066b, 0x066d, 1),
Range16.init(0x06d4, 0x0700, 44),
Range16.init(0x0701, 0x070d, 1),
Range16.init(0x07f7, 0x07f9, 1),
Range16.init(0x0830, 0x083e, 1),
Range16.init(0x085e, 0x0964, 262),
Range16.init(0x0965, 0x0970, 11),
Range16.init(0x09fd, 0x0af0, 243),
Range16.init(0x0df4, 0x0e4f, 91),
Range16.init(0x0e5a, 0x0e5b, 1),
Range16.init(0x0f04, 0x0f12, 1),
Range16.init(0x0f14, 0x0f85, 113),
Range16.init(0x0fd0, 0x0fd4, 1),
Range16.init(0x0fd9, 0x0fda, 1),
Range16.init(0x104a, 0x104f, 1),
Range16.init(0x10fb, 0x1360, 613),
Range16.init(0x1361, 0x1368, 1),
Range16.init(0x166d, 0x166e, 1),
Range16.init(0x16eb, 0x16ed, 1),
Range16.init(0x1735, 0x1736, 1),
Range16.init(0x17d4, 0x17d6, 1),
Range16.init(0x17d8, 0x17da, 1),
Range16.init(0x1800, 0x1805, 1),
Range16.init(0x1807, 0x180a, 1),
Range16.init(0x1944, 0x1945, 1),
Range16.init(0x1a1e, 0x1a1f, 1),
Range16.init(0x1aa0, 0x1aa6, 1),
Range16.init(0x1aa8, 0x1aad, 1),
Range16.init(0x1b5a, 0x1b60, 1),
Range16.init(0x1bfc, 0x1bff, 1),
Range16.init(0x1c3b, 0x1c3f, 1),
Range16.init(0x1c7e, 0x1c7f, 1),
Range16.init(0x1cc0, 0x1cc7, 1),
Range16.init(0x1cd3, 0x2016, 835),
Range16.init(0x2017, 0x2020, 9),
Range16.init(0x2021, 0x2027, 1),
Range16.init(0x2030, 0x2038, 1),
Range16.init(0x203b, 0x203e, 1),
Range16.init(0x2041, 0x2043, 1),
Range16.init(0x2047, 0x2051, 1),
Range16.init(0x2053, 0x2055, 2),
Range16.init(0x2056, 0x205e, 1),
Range16.init(0x2cf9, 0x2cfc, 1),
Range16.init(0x2cfe, 0x2cff, 1),
Range16.init(0x2d70, 0x2e00, 144),
Range16.init(0x2e01, 0x2e06, 5),
Range16.init(0x2e07, 0x2e08, 1),
Range16.init(0x2e0b, 0x2e0e, 3),
Range16.init(0x2e0f, 0x2e16, 1),
Range16.init(0x2e18, 0x2e19, 1),
Range16.init(0x2e1b, 0x2e1e, 3),
Range16.init(0x2e1f, 0x2e2a, 11),
Range16.init(0x2e2b, 0x2e2e, 1),
Range16.init(0x2e30, 0x2e39, 1),
Range16.init(0x2e3c, 0x2e3f, 1),
Range16.init(0x2e41, 0x2e43, 2),
Range16.init(0x2e44, 0x2e49, 1),
Range16.init(0x3001, 0x3003, 1),
Range16.init(0x303d, 0x30fb, 190),
Range16.init(0xa4fe, 0xa4ff, 1),
Range16.init(0xa60d, 0xa60f, 1),
Range16.init(0xa673, 0xa67e, 11),
Range16.init(0xa6f2, 0xa6f7, 1),
Range16.init(0xa874, 0xa877, 1),
Range16.init(0xa8ce, 0xa8cf, 1),
Range16.init(0xa8f8, 0xa8fa, 1),
Range16.init(0xa8fc, 0xa92e, 50),
Range16.init(0xa92f, 0xa95f, 48),
Range16.init(0xa9c1, 0xa9cd, 1),
Range16.init(0xa9de, 0xa9df, 1),
Range16.init(0xaa5c, 0xaa5f, 1),
Range16.init(0xaade, 0xaadf, 1),
Range16.init(0xaaf0, 0xaaf1, 1),
Range16.init(0xabeb, 0xfe10, 21029),
Range16.init(0xfe11, 0xfe16, 1),
Range16.init(0xfe19, 0xfe30, 23),
Range16.init(0xfe45, 0xfe46, 1),
Range16.init(0xfe49, 0xfe4c, 1),
Range16.init(0xfe50, 0xfe52, 1),
Range16.init(0xfe54, 0xfe57, 1),
Range16.init(0xfe5f, 0xfe61, 1),
Range16.init(0xfe68, 0xfe6a, 2),
Range16.init(0xfe6b, 0xff01, 150),
Range16.init(0xff02, 0xff03, 1),
Range16.init(0xff05, 0xff07, 1),
Range16.init(0xff0a, 0xff0e, 2),
Range16.init(0xff0f, 0xff1a, 11),
Range16.init(0xff1b, 0xff1f, 4),
Range16.init(0xff20, 0xff3c, 28),
Range16.init(0xff61, 0xff64, 3),
Range16.init(0xff65, 0xff65, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10100, 0x10100, 1),
Range32.init(0x10101, 0x10102, 1),
Range32.init(0x1039f, 0x103d0, 49),
Range32.init(0x1056f, 0x10857, 744),
Range32.init(0x1091f, 0x1093f, 32),
Range32.init(0x10a50, 0x10a58, 1),
Range32.init(0x10a7f, 0x10af0, 113),
Range32.init(0x10af1, 0x10af6, 1),
Range32.init(0x10b39, 0x10b3f, 1),
Range32.init(0x10b99, 0x10b9c, 1),
Range32.init(0x11047, 0x1104d, 1),
Range32.init(0x110bb, 0x110bc, 1),
Range32.init(0x110be, 0x110c1, 1),
Range32.init(0x11140, 0x11143, 1),
Range32.init(0x11174, 0x11175, 1),
Range32.init(0x111c5, 0x111c9, 1),
Range32.init(0x111cd, 0x111db, 14),
Range32.init(0x111dd, 0x111df, 1),
Range32.init(0x11238, 0x1123d, 1),
Range32.init(0x112a9, 0x1144b, 418),
Range32.init(0x1144c, 0x1144f, 1),
Range32.init(0x1145b, 0x1145d, 2),
Range32.init(0x114c6, 0x115c1, 251),
Range32.init(0x115c2, 0x115d7, 1),
Range32.init(0x11641, 0x11643, 1),
Range32.init(0x11660, 0x1166c, 1),
Range32.init(0x1173c, 0x1173e, 1),
Range32.init(0x11a3f, 0x11a46, 1),
Range32.init(0x11a9a, 0x11a9c, 1),
Range32.init(0x11a9e, 0x11aa2, 1),
Range32.init(0x11c41, 0x11c45, 1),
Range32.init(0x11c70, 0x11c71, 1),
Range32.init(0x12470, 0x12474, 1),
Range32.init(0x16a6e, 0x16a6f, 1),
Range32.init(0x16af5, 0x16b37, 66),
Range32.init(0x16b38, 0x16b3b, 1),
Range32.init(0x16b44, 0x1bc9f, 20827),
Range32.init(0x1da87, 0x1da8b, 1),
Range32.init(0x1e95e, 0x1e95f, 1),
};
break :init r[0..];
},
.latin_offset = 8,
};
const _Ps = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0028, 0x005b, 51),
Range16.init(0x007b, 0x0f3a, 3775),
Range16.init(0x0f3c, 0x169b, 1887),
Range16.init(0x201a, 0x201e, 4),
Range16.init(0x2045, 0x207d, 56),
Range16.init(0x208d, 0x2308, 635),
Range16.init(0x230a, 0x2329, 31),
Range16.init(0x2768, 0x2774, 2),
Range16.init(0x27c5, 0x27e6, 33),
Range16.init(0x27e8, 0x27ee, 2),
Range16.init(0x2983, 0x2997, 2),
Range16.init(0x29d8, 0x29da, 2),
Range16.init(0x29fc, 0x2e22, 1062),
Range16.init(0x2e24, 0x2e28, 2),
Range16.init(0x2e42, 0x3008, 454),
Range16.init(0x300a, 0x3010, 2),
Range16.init(0x3014, 0x301a, 2),
Range16.init(0x301d, 0xfd3f, 52514),
Range16.init(0xfe17, 0xfe35, 30),
Range16.init(0xfe37, 0xfe43, 2),
Range16.init(0xfe47, 0xfe59, 18),
Range16.init(0xfe5b, 0xfe5d, 2),
Range16.init(0xff08, 0xff3b, 51),
Range16.init(0xff5b, 0xff5f, 4),
Range16.init(0xff62, 0xff62, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 1,
};
const _S = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0024, 0x002b, 7),
Range16.init(0x003c, 0x003e, 1),
Range16.init(0x005e, 0x0060, 2),
Range16.init(0x007c, 0x007e, 2),
Range16.init(0x00a2, 0x00a6, 1),
Range16.init(0x00a8, 0x00a9, 1),
Range16.init(0x00ac, 0x00ae, 2),
Range16.init(0x00af, 0x00b1, 1),
Range16.init(0x00b4, 0x00b8, 4),
Range16.init(0x00d7, 0x00f7, 32),
Range16.init(0x02c2, 0x02c5, 1),
Range16.init(0x02d2, 0x02df, 1),
Range16.init(0x02e5, 0x02eb, 1),
Range16.init(0x02ed, 0x02ef, 2),
Range16.init(0x02f0, 0x02ff, 1),
Range16.init(0x0375, 0x0384, 15),
Range16.init(0x0385, 0x03f6, 113),
Range16.init(0x0482, 0x058d, 267),
Range16.init(0x058e, 0x058f, 1),
Range16.init(0x0606, 0x0608, 1),
Range16.init(0x060b, 0x060e, 3),
Range16.init(0x060f, 0x06de, 207),
Range16.init(0x06e9, 0x06fd, 20),
Range16.init(0x06fe, 0x07f6, 248),
Range16.init(0x09f2, 0x09f3, 1),
Range16.init(0x09fa, 0x09fb, 1),
Range16.init(0x0af1, 0x0b70, 127),
Range16.init(0x0bf3, 0x0bfa, 1),
Range16.init(0x0c7f, 0x0d4f, 208),
Range16.init(0x0d79, 0x0e3f, 198),
Range16.init(0x0f01, 0x0f03, 1),
Range16.init(0x0f13, 0x0f15, 2),
Range16.init(0x0f16, 0x0f17, 1),
Range16.init(0x0f1a, 0x0f1f, 1),
Range16.init(0x0f34, 0x0f38, 2),
Range16.init(0x0fbe, 0x0fc5, 1),
Range16.init(0x0fc7, 0x0fcc, 1),
Range16.init(0x0fce, 0x0fcf, 1),
Range16.init(0x0fd5, 0x0fd8, 1),
Range16.init(0x109e, 0x109f, 1),
Range16.init(0x1390, 0x1399, 1),
Range16.init(0x17db, 0x1940, 357),
Range16.init(0x19de, 0x19ff, 1),
Range16.init(0x1b61, 0x1b6a, 1),
Range16.init(0x1b74, 0x1b7c, 1),
Range16.init(0x1fbd, 0x1fbf, 2),
Range16.init(0x1fc0, 0x1fc1, 1),
Range16.init(0x1fcd, 0x1fcf, 1),
Range16.init(0x1fdd, 0x1fdf, 1),
Range16.init(0x1fed, 0x1fef, 1),
Range16.init(0x1ffd, 0x1ffe, 1),
Range16.init(0x2044, 0x2052, 14),
Range16.init(0x207a, 0x207c, 1),
Range16.init(0x208a, 0x208c, 1),
Range16.init(0x20a0, 0x20bf, 1),
Range16.init(0x2100, 0x2101, 1),
Range16.init(0x2103, 0x2106, 1),
Range16.init(0x2108, 0x2109, 1),
Range16.init(0x2114, 0x2116, 2),
Range16.init(0x2117, 0x2118, 1),
Range16.init(0x211e, 0x2123, 1),
Range16.init(0x2125, 0x2129, 2),
Range16.init(0x212e, 0x213a, 12),
Range16.init(0x213b, 0x2140, 5),
Range16.init(0x2141, 0x2144, 1),
Range16.init(0x214a, 0x214d, 1),
Range16.init(0x214f, 0x218a, 59),
Range16.init(0x218b, 0x2190, 5),
Range16.init(0x2191, 0x2307, 1),
Range16.init(0x230c, 0x2328, 1),
Range16.init(0x232b, 0x2426, 1),
Range16.init(0x2440, 0x244a, 1),
Range16.init(0x249c, 0x24e9, 1),
Range16.init(0x2500, 0x2767, 1),
Range16.init(0x2794, 0x27c4, 1),
Range16.init(0x27c7, 0x27e5, 1),
Range16.init(0x27f0, 0x2982, 1),
Range16.init(0x2999, 0x29d7, 1),
Range16.init(0x29dc, 0x29fb, 1),
Range16.init(0x29fe, 0x2b73, 1),
Range16.init(0x2b76, 0x2b95, 1),
Range16.init(0x2b98, 0x2bb9, 1),
Range16.init(0x2bbd, 0x2bc8, 1),
Range16.init(0x2bca, 0x2bd2, 1),
Range16.init(0x2bec, 0x2bef, 1),
Range16.init(0x2ce5, 0x2cea, 1),
Range16.init(0x2e80, 0x2e99, 1),
Range16.init(0x2e9b, 0x2ef3, 1),
Range16.init(0x2f00, 0x2fd5, 1),
Range16.init(0x2ff0, 0x2ffb, 1),
Range16.init(0x3004, 0x3012, 14),
Range16.init(0x3013, 0x3020, 13),
Range16.init(0x3036, 0x3037, 1),
Range16.init(0x303e, 0x303f, 1),
Range16.init(0x309b, 0x309c, 1),
Range16.init(0x3190, 0x3191, 1),
Range16.init(0x3196, 0x319f, 1),
Range16.init(0x31c0, 0x31e3, 1),
Range16.init(0x3200, 0x321e, 1),
Range16.init(0x322a, 0x3247, 1),
Range16.init(0x3250, 0x3260, 16),
Range16.init(0x3261, 0x327f, 1),
Range16.init(0x328a, 0x32b0, 1),
Range16.init(0x32c0, 0x32fe, 1),
Range16.init(0x3300, 0x33ff, 1),
Range16.init(0x4dc0, 0x4dff, 1),
Range16.init(0xa490, 0xa4c6, 1),
Range16.init(0xa700, 0xa716, 1),
Range16.init(0xa720, 0xa721, 1),
Range16.init(0xa789, 0xa78a, 1),
Range16.init(0xa828, 0xa82b, 1),
Range16.init(0xa836, 0xa839, 1),
Range16.init(0xaa77, 0xaa79, 1),
Range16.init(0xab5b, 0xfb29, 20430),
Range16.init(0xfbb2, 0xfbc1, 1),
Range16.init(0xfdfc, 0xfdfd, 1),
Range16.init(0xfe62, 0xfe64, 2),
Range16.init(0xfe65, 0xfe66, 1),
Range16.init(0xfe69, 0xff04, 155),
Range16.init(0xff0b, 0xff1c, 17),
Range16.init(0xff1d, 0xff1e, 1),
Range16.init(0xff3e, 0xff40, 2),
Range16.init(0xff5c, 0xff5e, 2),
Range16.init(0xffe0, 0xffe6, 1),
Range16.init(0xffe8, 0xffee, 1),
Range16.init(0xfffc, 0xfffd, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10137, 0x1013f, 1),
Range32.init(0x10179, 0x10189, 1),
Range32.init(0x1018c, 0x1018e, 1),
Range32.init(0x10190, 0x1019b, 1),
Range32.init(0x101a0, 0x101d0, 48),
Range32.init(0x101d1, 0x101fc, 1),
Range32.init(0x10877, 0x10878, 1),
Range32.init(0x10ac8, 0x1173f, 3191),
Range32.init(0x16b3c, 0x16b3f, 1),
Range32.init(0x16b45, 0x1bc9c, 20823),
Range32.init(0x1d000, 0x1d0f5, 1),
Range32.init(0x1d100, 0x1d126, 1),
Range32.init(0x1d129, 0x1d164, 1),
Range32.init(0x1d16a, 0x1d16c, 1),
Range32.init(0x1d183, 0x1d184, 1),
Range32.init(0x1d18c, 0x1d1a9, 1),
Range32.init(0x1d1ae, 0x1d1e8, 1),
Range32.init(0x1d200, 0x1d241, 1),
Range32.init(0x1d245, 0x1d300, 187),
Range32.init(0x1d301, 0x1d356, 1),
Range32.init(0x1d6c1, 0x1d6db, 26),
Range32.init(0x1d6fb, 0x1d715, 26),
Range32.init(0x1d735, 0x1d74f, 26),
Range32.init(0x1d76f, 0x1d789, 26),
Range32.init(0x1d7a9, 0x1d7c3, 26),
Range32.init(0x1d800, 0x1d9ff, 1),
Range32.init(0x1da37, 0x1da3a, 1),
Range32.init(0x1da6d, 0x1da74, 1),
Range32.init(0x1da76, 0x1da83, 1),
Range32.init(0x1da85, 0x1da86, 1),
Range32.init(0x1eef0, 0x1eef1, 1),
Range32.init(0x1f000, 0x1f02b, 1),
Range32.init(0x1f030, 0x1f093, 1),
Range32.init(0x1f0a0, 0x1f0ae, 1),
Range32.init(0x1f0b1, 0x1f0bf, 1),
Range32.init(0x1f0c1, 0x1f0cf, 1),
Range32.init(0x1f0d1, 0x1f0f5, 1),
Range32.init(0x1f110, 0x1f12e, 1),
Range32.init(0x1f130, 0x1f16b, 1),
Range32.init(0x1f170, 0x1f1ac, 1),
Range32.init(0x1f1e6, 0x1f202, 1),
Range32.init(0x1f210, 0x1f23b, 1),
Range32.init(0x1f240, 0x1f248, 1),
Range32.init(0x1f250, 0x1f251, 1),
Range32.init(0x1f260, 0x1f265, 1),
Range32.init(0x1f300, 0x1f6d4, 1),
Range32.init(0x1f6e0, 0x1f6ec, 1),
Range32.init(0x1f6f0, 0x1f6f8, 1),
Range32.init(0x1f700, 0x1f773, 1),
Range32.init(0x1f780, 0x1f7d4, 1),
Range32.init(0x1f800, 0x1f80b, 1),
Range32.init(0x1f810, 0x1f847, 1),
Range32.init(0x1f850, 0x1f859, 1),
Range32.init(0x1f860, 0x1f887, 1),
Range32.init(0x1f890, 0x1f8ad, 1),
Range32.init(0x1f900, 0x1f90b, 1),
Range32.init(0x1f910, 0x1f93e, 1),
Range32.init(0x1f940, 0x1f94c, 1),
Range32.init(0x1f950, 0x1f96b, 1),
Range32.init(0x1f980, 0x1f997, 1),
Range32.init(0x1f9c0, 0x1f9d0, 16),
Range32.init(0x1f9d1, 0x1f9e6, 1),
};
break :init r[0..];
},
.latin_offset = 10,
};
const _Sc = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0024, 0x00a2, 126),
Range16.init(0x00a3, 0x00a5, 1),
Range16.init(0x058f, 0x060b, 124),
Range16.init(0x09f2, 0x09f3, 1),
Range16.init(0x09fb, 0x0af1, 246),
Range16.init(0x0bf9, 0x0e3f, 582),
Range16.init(0x17db, 0x20a0, 2245),
Range16.init(0x20a1, 0x20bf, 1),
Range16.init(0xa838, 0xfdfc, 21956),
Range16.init(0xfe69, 0xff04, 155),
Range16.init(0xffe0, 0xffe1, 1),
Range16.init(0xffe5, 0xffe6, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 2,
};
const _Sk = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x005e, 0x0060, 2),
Range16.init(0x00a8, 0x00af, 7),
Range16.init(0x00b4, 0x00b8, 4),
Range16.init(0x02c2, 0x02c5, 1),
Range16.init(0x02d2, 0x02df, 1),
Range16.init(0x02e5, 0x02eb, 1),
Range16.init(0x02ed, 0x02ef, 2),
Range16.init(0x02f0, 0x02ff, 1),
Range16.init(0x0375, 0x0384, 15),
Range16.init(0x0385, 0x1fbd, 7224),
Range16.init(0x1fbf, 0x1fc1, 1),
Range16.init(0x1fcd, 0x1fcf, 1),
Range16.init(0x1fdd, 0x1fdf, 1),
Range16.init(0x1fed, 0x1fef, 1),
Range16.init(0x1ffd, 0x1ffe, 1),
Range16.init(0x309b, 0x309c, 1),
Range16.init(0xa700, 0xa716, 1),
Range16.init(0xa720, 0xa721, 1),
Range16.init(0xa789, 0xa78a, 1),
Range16.init(0xab5b, 0xfbb2, 20567),
Range16.init(0xfbb3, 0xfbc1, 1),
Range16.init(0xff3e, 0xff40, 2),
Range16.init(0xffe3, 0xffe3, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1f3fb, 0x1f3fb, 1),
Range32.init(0x1f3fc, 0x1f3ff, 1),
};
break :init r[0..];
},
.latin_offset = 3,
};
const _Sm = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x002b, 0x003c, 17),
Range16.init(0x003d, 0x003e, 1),
Range16.init(0x007c, 0x007e, 2),
Range16.init(0x00ac, 0x00b1, 5),
Range16.init(0x00d7, 0x00f7, 32),
Range16.init(0x03f6, 0x0606, 528),
Range16.init(0x0607, 0x0608, 1),
Range16.init(0x2044, 0x2052, 14),
Range16.init(0x207a, 0x207c, 1),
Range16.init(0x208a, 0x208c, 1),
Range16.init(0x2118, 0x2140, 40),
Range16.init(0x2141, 0x2144, 1),
Range16.init(0x214b, 0x2190, 69),
Range16.init(0x2191, 0x2194, 1),
Range16.init(0x219a, 0x219b, 1),
Range16.init(0x21a0, 0x21a6, 3),
Range16.init(0x21ae, 0x21ce, 32),
Range16.init(0x21cf, 0x21d2, 3),
Range16.init(0x21d4, 0x21f4, 32),
Range16.init(0x21f5, 0x22ff, 1),
Range16.init(0x2320, 0x2321, 1),
Range16.init(0x237c, 0x239b, 31),
Range16.init(0x239c, 0x23b3, 1),
Range16.init(0x23dc, 0x23e1, 1),
Range16.init(0x25b7, 0x25c1, 10),
Range16.init(0x25f8, 0x25ff, 1),
Range16.init(0x266f, 0x27c0, 337),
Range16.init(0x27c1, 0x27c4, 1),
Range16.init(0x27c7, 0x27e5, 1),
Range16.init(0x27f0, 0x27ff, 1),
Range16.init(0x2900, 0x2982, 1),
Range16.init(0x2999, 0x29d7, 1),
Range16.init(0x29dc, 0x29fb, 1),
Range16.init(0x29fe, 0x2aff, 1),
Range16.init(0x2b30, 0x2b44, 1),
Range16.init(0x2b47, 0x2b4c, 1),
Range16.init(0xfb29, 0xfe62, 825),
Range16.init(0xfe64, 0xfe66, 1),
Range16.init(0xff0b, 0xff1c, 17),
Range16.init(0xff1d, 0xff1e, 1),
Range16.init(0xff5c, 0xff5e, 2),
Range16.init(0xffe2, 0xffe9, 7),
Range16.init(0xffea, 0xffec, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1d6c1, 0x1d6db, 26),
Range32.init(0x1d6fb, 0x1d715, 26),
Range32.init(0x1d735, 0x1d74f, 26),
Range32.init(0x1d76f, 0x1d789, 26),
Range32.init(0x1d7a9, 0x1d7c3, 26),
Range32.init(0x1eef0, 0x1eef1, 1),
};
break :init r[0..];
},
.latin_offset = 5,
};
const _So = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00a6, 0x00a9, 3),
Range16.init(0x00ae, 0x00b0, 2),
Range16.init(0x0482, 0x058d, 267),
Range16.init(0x058e, 0x060e, 128),
Range16.init(0x060f, 0x06de, 207),
Range16.init(0x06e9, 0x06fd, 20),
Range16.init(0x06fe, 0x07f6, 248),
Range16.init(0x09fa, 0x0b70, 374),
Range16.init(0x0bf3, 0x0bf8, 1),
Range16.init(0x0bfa, 0x0c7f, 133),
Range16.init(0x0d4f, 0x0d79, 42),
Range16.init(0x0f01, 0x0f03, 1),
Range16.init(0x0f13, 0x0f15, 2),
Range16.init(0x0f16, 0x0f17, 1),
Range16.init(0x0f1a, 0x0f1f, 1),
Range16.init(0x0f34, 0x0f38, 2),
Range16.init(0x0fbe, 0x0fc5, 1),
Range16.init(0x0fc7, 0x0fcc, 1),
Range16.init(0x0fce, 0x0fcf, 1),
Range16.init(0x0fd5, 0x0fd8, 1),
Range16.init(0x109e, 0x109f, 1),
Range16.init(0x1390, 0x1399, 1),
Range16.init(0x1940, 0x19de, 158),
Range16.init(0x19df, 0x19ff, 1),
Range16.init(0x1b61, 0x1b6a, 1),
Range16.init(0x1b74, 0x1b7c, 1),
Range16.init(0x2100, 0x2101, 1),
Range16.init(0x2103, 0x2106, 1),
Range16.init(0x2108, 0x2109, 1),
Range16.init(0x2114, 0x2116, 2),
Range16.init(0x2117, 0x211e, 7),
Range16.init(0x211f, 0x2123, 1),
Range16.init(0x2125, 0x2129, 2),
Range16.init(0x212e, 0x213a, 12),
Range16.init(0x213b, 0x214a, 15),
Range16.init(0x214c, 0x214d, 1),
Range16.init(0x214f, 0x218a, 59),
Range16.init(0x218b, 0x2195, 10),
Range16.init(0x2196, 0x2199, 1),
Range16.init(0x219c, 0x219f, 1),
Range16.init(0x21a1, 0x21a2, 1),
Range16.init(0x21a4, 0x21a5, 1),
Range16.init(0x21a7, 0x21ad, 1),
Range16.init(0x21af, 0x21cd, 1),
Range16.init(0x21d0, 0x21d1, 1),
Range16.init(0x21d3, 0x21d5, 2),
Range16.init(0x21d6, 0x21f3, 1),
Range16.init(0x2300, 0x2307, 1),
Range16.init(0x230c, 0x231f, 1),
Range16.init(0x2322, 0x2328, 1),
Range16.init(0x232b, 0x237b, 1),
Range16.init(0x237d, 0x239a, 1),
Range16.init(0x23b4, 0x23db, 1),
Range16.init(0x23e2, 0x2426, 1),
Range16.init(0x2440, 0x244a, 1),
Range16.init(0x249c, 0x24e9, 1),
Range16.init(0x2500, 0x25b6, 1),
Range16.init(0x25b8, 0x25c0, 1),
Range16.init(0x25c2, 0x25f7, 1),
Range16.init(0x2600, 0x266e, 1),
Range16.init(0x2670, 0x2767, 1),
Range16.init(0x2794, 0x27bf, 1),
Range16.init(0x2800, 0x28ff, 1),
Range16.init(0x2b00, 0x2b2f, 1),
Range16.init(0x2b45, 0x2b46, 1),
Range16.init(0x2b4d, 0x2b73, 1),
Range16.init(0x2b76, 0x2b95, 1),
Range16.init(0x2b98, 0x2bb9, 1),
Range16.init(0x2bbd, 0x2bc8, 1),
Range16.init(0x2bca, 0x2bd2, 1),
Range16.init(0x2bec, 0x2bef, 1),
Range16.init(0x2ce5, 0x2cea, 1),
Range16.init(0x2e80, 0x2e99, 1),
Range16.init(0x2e9b, 0x2ef3, 1),
Range16.init(0x2f00, 0x2fd5, 1),
Range16.init(0x2ff0, 0x2ffb, 1),
Range16.init(0x3004, 0x3012, 14),
Range16.init(0x3013, 0x3020, 13),
Range16.init(0x3036, 0x3037, 1),
Range16.init(0x303e, 0x303f, 1),
Range16.init(0x3190, 0x3191, 1),
Range16.init(0x3196, 0x319f, 1),
Range16.init(0x31c0, 0x31e3, 1),
Range16.init(0x3200, 0x321e, 1),
Range16.init(0x322a, 0x3247, 1),
Range16.init(0x3250, 0x3260, 16),
Range16.init(0x3261, 0x327f, 1),
Range16.init(0x328a, 0x32b0, 1),
Range16.init(0x32c0, 0x32fe, 1),
Range16.init(0x3300, 0x33ff, 1),
Range16.init(0x4dc0, 0x4dff, 1),
Range16.init(0xa490, 0xa4c6, 1),
Range16.init(0xa828, 0xa82b, 1),
Range16.init(0xa836, 0xa837, 1),
Range16.init(0xa839, 0xaa77, 574),
Range16.init(0xaa78, 0xaa79, 1),
Range16.init(0xfdfd, 0xffe4, 487),
Range16.init(0xffe8, 0xffed, 5),
Range16.init(0xffee, 0xfffc, 14),
Range16.init(0xfffd, 0xfffd, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10137, 0x10137, 1),
Range32.init(0x10138, 0x1013f, 1),
Range32.init(0x10179, 0x10189, 1),
Range32.init(0x1018c, 0x1018e, 1),
Range32.init(0x10190, 0x1019b, 1),
Range32.init(0x101a0, 0x101d0, 48),
Range32.init(0x101d1, 0x101fc, 1),
Range32.init(0x10877, 0x10878, 1),
Range32.init(0x10ac8, 0x1173f, 3191),
Range32.init(0x16b3c, 0x16b3f, 1),
Range32.init(0x16b45, 0x1bc9c, 20823),
Range32.init(0x1d000, 0x1d0f5, 1),
Range32.init(0x1d100, 0x1d126, 1),
Range32.init(0x1d129, 0x1d164, 1),
Range32.init(0x1d16a, 0x1d16c, 1),
Range32.init(0x1d183, 0x1d184, 1),
Range32.init(0x1d18c, 0x1d1a9, 1),
Range32.init(0x1d1ae, 0x1d1e8, 1),
Range32.init(0x1d200, 0x1d241, 1),
Range32.init(0x1d245, 0x1d300, 187),
Range32.init(0x1d301, 0x1d356, 1),
Range32.init(0x1d800, 0x1d9ff, 1),
Range32.init(0x1da37, 0x1da3a, 1),
Range32.init(0x1da6d, 0x1da74, 1),
Range32.init(0x1da76, 0x1da83, 1),
Range32.init(0x1da85, 0x1da86, 1),
Range32.init(0x1f000, 0x1f02b, 1),
Range32.init(0x1f030, 0x1f093, 1),
Range32.init(0x1f0a0, 0x1f0ae, 1),
Range32.init(0x1f0b1, 0x1f0bf, 1),
Range32.init(0x1f0c1, 0x1f0cf, 1),
Range32.init(0x1f0d1, 0x1f0f5, 1),
Range32.init(0x1f110, 0x1f12e, 1),
Range32.init(0x1f130, 0x1f16b, 1),
Range32.init(0x1f170, 0x1f1ac, 1),
Range32.init(0x1f1e6, 0x1f202, 1),
Range32.init(0x1f210, 0x1f23b, 1),
Range32.init(0x1f240, 0x1f248, 1),
Range32.init(0x1f250, 0x1f251, 1),
Range32.init(0x1f260, 0x1f265, 1),
Range32.init(0x1f300, 0x1f3fa, 1),
Range32.init(0x1f400, 0x1f6d4, 1),
Range32.init(0x1f6e0, 0x1f6ec, 1),
Range32.init(0x1f6f0, 0x1f6f8, 1),
Range32.init(0x1f700, 0x1f773, 1),
Range32.init(0x1f780, 0x1f7d4, 1),
Range32.init(0x1f800, 0x1f80b, 1),
Range32.init(0x1f810, 0x1f847, 1),
Range32.init(0x1f850, 0x1f859, 1),
Range32.init(0x1f860, 0x1f887, 1),
Range32.init(0x1f890, 0x1f8ad, 1),
Range32.init(0x1f900, 0x1f90b, 1),
Range32.init(0x1f910, 0x1f93e, 1),
Range32.init(0x1f940, 0x1f94c, 1),
Range32.init(0x1f950, 0x1f96b, 1),
Range32.init(0x1f980, 0x1f997, 1),
Range32.init(0x1f9c0, 0x1f9d0, 16),
Range32.init(0x1f9d1, 0x1f9e6, 1),
};
break :init r[0..];
},
.latin_offset = 2,
};
const _Z = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0020, 0x00a0, 128),
Range16.init(0x1680, 0x2000, 2432),
Range16.init(0x2001, 0x200a, 1),
Range16.init(0x2028, 0x2029, 1),
Range16.init(0x202f, 0x205f, 48),
Range16.init(0x3000, 0x3000, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 1,
};
const _Zl = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x2028, 0x2028, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Zp = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x2029, 0x2029, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Zs = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0020, 0x00a0, 128),
Range16.init(0x1680, 0x2000, 2432),
Range16.init(0x2001, 0x200a, 1),
Range16.init(0x202f, 0x205f, 48),
Range16.init(0x3000, 0x3000, 1),
};
break :init r[0..];
},
.r32 = &[_]Range32{},
.latin_offset = 1,
};
pub const Cc = &_Cc; // Cc is the set of Unicode characters in category Cc.
pub const Cf = &_Cf; // Cf is the set of Unicode characters in category Cf.
pub const Co = &_Co; // Co is the set of Unicode characters in category Co.
pub const Cs = &_Cs; // Cs is the set of Unicode characters in category Cs.
pub const Digit = &_Nd; // Digit is the set of Unicode characters with the "decimal digit" property.
pub const Nd = &_Nd; // Nd is the set of Unicode characters in category Nd.
pub const Letter = &_L; // Letter/L is the set of Unicode letters, category L.
pub const L = &_L;
pub const Lm = &_Lm; // Lm is the set of Unicode characters in category Lm.
pub const Lo = &_Lo; // Lo is the set of Unicode characters in category Lo.
pub const Lower = &_Ll; // Lower is the set of Unicode lower case letters.
pub const Ll = &_Ll; // Ll is the set of Unicode characters in category Ll.
pub const Mark = &_M; // Mark/M is the set of Unicode mark characters, category M.
pub const M = &_M;
pub const Mc = &_Mc; // Mc is the set of Unicode characters in category Mc.
pub const Me = &_Me; // Me is the set of Unicode characters in category Me.
pub const Mn = &_Mn; // Mn is the set of Unicode characters in category Mn.
pub const Nl = &_Nl; // Nl is the set of Unicode characters in category Nl.
pub const No = &_No; // No is the set of Unicode characters in category No.
pub const Number = &_N; // Number/N is the set of Unicode number characters, category N.
pub const N = &_N;
pub const Other = &_C; // Other/C is the set of Unicode control and special characters, category C.
pub const C = &_C;
pub const Pc = &_Pc; // Pc is the set of Unicode characters in category Pc.
pub const Pd = &_Pd; // Pd is the set of Unicode characters in category Pd.
pub const Pe = &_Pe; // Pe is the set of Unicode characters in category Pe.
pub const Pf = &_Pf; // Pf is the set of Unicode characters in category Pf.
pub const Pi = &_Pi; // Pi is the set of Unicode characters in category Pi.
pub const Po = &_Po; // Po is the set of Unicode characters in category Po.
pub const Ps = &_Ps; // Ps is the set of Unicode characters in category Ps.
pub const Punct = &_P; // Punct/P is the set of Unicode punctuation characters, category P.
pub const P = &_P;
pub const Sc = &_Sc; // Sc is the set of Unicode characters in category Sc.
pub const Sk = &_Sk; // Sk is the set of Unicode characters in category Sk.
pub const Sm = &_Sm; // Sm is the set of Unicode characters in category Sm.
pub const So = &_So; // So is the set of Unicode characters in category So.
pub const Space = &_Z; // Space/Z is the set of Unicode space characters, category Z.
pub const Z = &_Z;
pub const Symbol = &_S; // Symbol/S is the set of Unicode symbol characters, category S.
pub const S = &_S;
pub const Title = &_Lt; // Title is the set of Unicode title case letters.
pub const Lt = &_Lt; // Lt is the set of Unicode characters in category Lt.
pub const Upper = &_Lu; // Upper is the set of Unicode upper case letters.
pub const Lu = &_Lu; // Lu is the set of Unicode characters in category Lu.
pub const Zl = &_Zl; // Zl is the set of Unicode characters in category Zl.
pub const Zp = &_Zp; // Zp is the set of Unicode characters in category Zp.
pub const Zs = &_Zs; // Zs is the set of Unicode characters in category Zs.
// Generated by running
//maketables --scripts=all --url=http://www.unicode.org/Public/10.0.0/ucd/
//DO NOT EDIT
// Scripts is the set of Unicode script tables.
pub const Script = enum {
Adlam,
Ahom,
Anatolian_Hieroglyphs,
Arabic,
Armenian,
Avestan,
Balinese,
Bamum,
Bassa_Vah,
Batak,
Bengali,
Bhaiksuki,
Bopomofo,
Brahmi,
Braille,
Buginese,
Buhid,
Canadian_Aboriginal,
Carian,
Caucasian_Albanian,
Chakma,
Cham,
Cherokee,
Common,
Coptic,
Cuneiform,
Cypriot,
Cyrillic,
Deseret,
Devanagari,
Duployan,
Egyptian_Hieroglyphs,
Elbasan,
Ethiopic,
Georgian,
Glagolitic,
Gothic,
Grantha,
Greek,
Gujarati,
Gurmukhi,
Han,
Hangul,
Hanunoo,
Hatran,
Hebrew,
Hiragana,
Imperial_Aramaic,
Inherited,
Inscriptional_Pahlavi,
Inscriptional_Parthian,
Javanese,
Kaithi,
Kannada,
Katakana,
Kayah_Li,
Kharoshthi,
Khmer,
Khojki,
Khudawadi,
Lao,
Latin,
Lepcha,
Limbu,
Linear_A,
Linear_B,
Lisu,
Lycian,
Lydian,
Mahajani,
Malayalam,
Mandaic,
Manichaean,
Marchen,
Masaram_Gondi,
Meetei_Mayek,
Mende_Kikakui,
Meroitic_Cursive,
Meroitic_Hieroglyphs,
Miao,
Modi,
Mongolian,
Mro,
Multani,
Myanmar,
Nabataean,
New_Tai_Lue,
Newa,
Nko,
Nushu,
Ogham,
Ol_Chiki,
Old_Hungarian,
Old_Italic,
Old_North_Arabian,
Old_Permic,
Old_Persian,
Old_South_Arabian,
Old_Turkic,
Oriya,
Osage,
Osmanya,
Pahawh_Hmong,
Palmyrene,
Pau_Cin_Hau,
Phags_Pa,
Phoenician,
Psalter_Pahlavi,
Rejang,
Runic,
Samaritan,
Saurashtra,
Sharada,
Shavian,
Siddham,
SignWriting,
Sinhala,
Sora_Sompeng,
Soyombo,
Sundanese,
Syloti_Nagri,
Syriac,
Tagalog,
Tagbanwa,
Tai_Le,
Tai_Tham,
Tai_Viet,
Takri,
Tamil,
Tangut,
Telugu,
Thaana,
Thai,
Tibetan,
Tifinagh,
Tirhuta,
Ugaritic,
Vai,
Warang_Citi,
Yi,
Zanabazar_Square,
pub fn table(self: Script) *RangeTable {
return switch (self) {
Script.Adlam => Adlam,
Script.Ahom => Ahom,
Script.Anatolian_Hieroglyphs => Anatolian_Hieroglyphs,
Script.Arabic => Arabic,
Script.Armenian => Armenian,
Script.Avestan => Avestan,
Script.Balinese => Balinese,
Script.Bamum => Bamum,
Script.Bassa_Vah => Bassa_Vah,
Script.Batak => Batak,
Script.Bengali => Bengali,
Script.Bhaiksuki => Bhaiksuki,
Script.Bopomofo => Bopomofo,
Script.Brahmi => Brahmi,
Script.Braille => Braille,
Script.Buginese => Buginese,
Script.Buhid => Buhid,
Script.Canadian_Aboriginal => Canadian_Aboriginal,
Script.Carian => Carian,
Script.Caucasian_Albanian => Caucasian_Albanian,
Script.Chakma => Chakma,
Script.Cham => Cham,
Script.Cherokee => Cherokee,
Script.Common => Common,
Script.Coptic => Coptic,
Script.Cuneiform => Cuneiform,
Script.Cypriot => Cypriot,
Script.Cyrillic => Cyrillic,
Script.Deseret => Deseret,
Script.Devanagari => Devanagari,
Script.Duployan => Duployan,
Script.Egyptian_Hieroglyphs => Egyptian_Hieroglyphs,
Script.Elbasan => Elbasan,
Script.Ethiopic => Ethiopic,
Script.Georgian => Georgian,
Script.Glagolitic => Glagolitic,
Script.Gothic => Gothic,
Script.Grantha => Grantha,
Script.Greek => Greek,
Script.Gujarati => Gujarati,
Script.Gurmukhi => Gurmukhi,
Script.Han => Han,
Script.Hangul => Hangul,
Script.Hanunoo => Hanunoo,
Script.Hatran => Hatran,
Script.Hebrew => Hebrew,
Script.Hiragana => Hiragana,
Script.Imperial_Aramaic => Imperial_Aramaic,
Script.Inherited => Inherited,
Script.Inscriptional_Pahlavi => Inscriptional_Pahlavi,
Script.Inscriptional_Parthian => Inscriptional_Parthian,
Script.Javanese => Javanese,
Script.Kaithi => Kaithi,
Script.Kannada => Kannada,
Script.Katakana => Katakana,
Script.Kayah_Li => Kayah_Li,
Script.Kharoshthi => Kharoshthi,
Script.Khmer => Khmer,
Script.Khojki => Khojki,
Script.Khudawadi => Khudawadi,
Script.Lao => Lao,
Script.Latin => Latin,
Script.Lepcha => Lepcha,
Script.Limbu => Limbu,
Script.Linear_A => Linear_A,
Script.Linear_B => Linear_B,
Script.Lisu => Lisu,
Script.Lycian => Lycian,
Script.Lydian => Lydian,
Script.Mahajani => Mahajani,
Script.Malayalam => Malayalam,
Script.Mandaic => Mandaic,
Script.Manichaean => Manichaean,
Script.Marchen => Marchen,
Script.Masaram_Gondi => Masaram_Gondi,
Script.Meetei_Mayek => Meetei_Mayek,
Script.Mende_Kikakui => Mende_Kikakui,
Script.Meroitic_Cursive => Meroitic_Cursive,
Script.Meroitic_Hieroglyphs => Meroitic_Hieroglyphs,
Script.Miao => Miao,
Script.Modi => Modi,
Script.Mongolian => Mongolian,
Script.Mro => Mro,
Script.Multani => Multani,
Script.Myanmar => Myanmar,
Script.Nabataean => Nabataean,
Script.New_Tai_Lue => New_Tai_Lue,
Script.Newa => Newa,
Script.Nko => Nko,
Script.Nushu => Nushu,
Script.Ogham => Ogham,
Script.Ol_Chiki => Ol_Chiki,
Script.Old_Hungarian => Old_Hungarian,
Script.Old_Italic => Old_Italic,
Script.Old_North_Arabian => Old_North_Arabian,
Script.Old_Permic => Old_Permic,
Script.Old_Persian => Old_Persian,
Script.Old_South_Arabian => Old_South_Arabian,
Script.Old_Turkic => Old_Turkic,
Script.Oriya => Oriya,
Script.Osage => Osage,
Script.Osmanya => Osmanya,
Script.Pahawh_Hmong => Pahawh_Hmong,
Script.Palmyrene => Palmyrene,
Script.Pau_Cin_Hau => Pau_Cin_Hau,
Script.Phags_Pa => Phags_Pa,
Script.Phoenician => Phoenician,
Script.Psalter_Pahlavi => Psalter_Pahlavi,
Script.Rejang => Rejang,
Script.Runic => Runic,
Script.Samaritan => Samaritan,
Script.Saurashtra => Saurashtra,
Script.Sharada => Sharada,
Script.Shavian => Shavian,
Script.Siddham => Siddham,
Script.SignWriting => SignWriting,
Script.Sinhala => Sinhala,
Script.Sora_Sompeng => Sora_Sompeng,
Script.Soyombo => Soyombo,
Script.Sundanese => Sundanese,
Script.Syloti_Nagri => Syloti_Nagri,
Script.Syriac => Syriac,
Script.Tagalog => Tagalog,
Script.Tagbanwa => Tagbanwa,
Script.Tai_Le => Tai_Le,
Script.Tai_Tham => Tai_Tham,
Script.Tai_Viet => Tai_Viet,
Script.Takri => Takri,
Script.Tamil => Tamil,
Script.Tangut => Tangut,
Script.Telugu => Telugu,
Script.Thaana => Thaana,
Script.Thai => Thai,
Script.Tibetan => Tibetan,
Script.Tifinagh => Tifinagh,
Script.Tirhuta => Tirhuta,
Script.Ugaritic => Ugaritic,
Script.Vai => Vai,
Script.Warang_Citi => Warang_Citi,
Script.Yi => Yi,
Script.Zanabazar_Square => Zanabazar_Square,
else => unreachable,
};
}
pub fn list() []Script {
return []Script{
Script.Adlam, Script.Ahom, Script.Anatolian_Hieroglyphs, Script.Arabic, Script.Armenian, Script.Avestan, Script.Balinese, Script.Bamum, Script.Bassa_Vah, Script.Batak, Script.Bengali, Script.Bhaiksuki, Script.Bopomofo, Script.Brahmi, Script.Braille, Script.Buginese, Script.Buhid, Script.Canadian_Aboriginal, Script.Carian, Script.Caucasian_Albanian, Script.Chakma, Script.Cham, Script.Cherokee, Script.Common, Script.Coptic, Script.Cuneiform, Script.Cypriot, Script.Cyrillic, Script.Deseret, Script.Devanagari, Script.Duployan, Script.Egyptian_Hieroglyphs, Script.Elbasan, Script.Ethiopic, Script.Georgian, Script.Glagolitic, Script.Gothic, Script.Grantha, Script.Greek, Script.Gujarati, Script.Gurmukhi, Script.Han, Script.Hangul, Script.Hanunoo, Script.Hatran, Script.Hebrew, Script.Hiragana, Script.Imperial_Aramaic, Script.Inherited, Script.Inscriptional_Pahlavi, Script.Inscriptional_Parthian, Script.Javanese, Script.Kaithi, Script.Kannada, Script.Katakana, Script.Kayah_Li, Script.Kharoshthi, Script.Khmer, Script.Khojki, Script.Khudawadi, Script.Lao, Script.Latin, Script.Lepcha, Script.Limbu, Script.Linear_A, Script.Linear_B, Script.Lisu, Script.Lycian, Script.Lydian, Script.Mahajani, Script.Malayalam, Script.Mandaic, Script.Manichaean, Script.Marchen, Script.Masaram_Gondi, Script.Meetei_Mayek, Script.Mende_Kikakui, Script.Meroitic_Cursive, Script.Meroitic_Hieroglyphs, Script.Miao, Script.Modi, Script.Mongolian, Script.Mro, Script.Multani, Script.Myanmar, Script.Nabataean, Script.New_Tai_Lue, Script.Newa, Script.Nko, Script.Nushu, Script.Ogham, Script.Ol_Chiki, Script.Old_Hungarian, Script.Old_Italic, Script.Old_North_Arabian, Script.Old_Permic, Script.Old_Persian, Script.Old_South_Arabian, Script.Old_Turkic, Script.Oriya, Script.Osage, Script.Osmanya, Script.Pahawh_Hmong, Script.Palmyrene, Script.Pau_Cin_Hau, Script.Phags_Pa, Script.Phoenician, Script.Psalter_Pahlavi, Script.Rejang, Script.Runic, Script.Samaritan, Script.Saurashtra, Script.Sharada, Script.Shavian, Script.Siddham, Script.SignWriting, Script.Sinhala, Script.Sora_Sompeng, Script.Soyombo, Script.Sundanese, Script.Syloti_Nagri, Script.Syriac, Script.Tagalog, Script.Tagbanwa, Script.Tai_Le, Script.Tai_Tham, Script.Tai_Viet, Script.Takri, Script.Tamil, Script.Tangut, Script.Telugu, Script.Thaana, Script.Thai, Script.Tibetan, Script.Tifinagh, Script.Tirhuta, Script.Ugaritic, Script.Vai, Script.Warang_Citi, Script.Yi, Script.Zanabazar_Square,
};
}
};
const _Adlam = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1e900, 0x1e94a, 1),
Range32.init(0x1e950, 0x1e959, 1),
Range32.init(0x1e95e, 0x1e95f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Ahom = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11700, 0x11719, 1),
Range32.init(0x1171d, 0x1172b, 1),
Range32.init(0x11730, 0x1173f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Anatolian_Hieroglyphs = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x14400, 0x14646, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Arabic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0600, 0x0604, 1),
Range16.init(0x0606, 0x060b, 1),
Range16.init(0x060d, 0x061a, 1),
Range16.init(0x061c, 0x061c, 1),
Range16.init(0x061e, 0x061e, 1),
Range16.init(0x0620, 0x063f, 1),
Range16.init(0x0641, 0x064a, 1),
Range16.init(0x0656, 0x066f, 1),
Range16.init(0x0671, 0x06dc, 1),
Range16.init(0x06de, 0x06ff, 1),
Range16.init(0x0750, 0x077f, 1),
Range16.init(0x08a0, 0x08b4, 1),
Range16.init(0x08b6, 0x08bd, 1),
Range16.init(0x08d4, 0x08e1, 1),
Range16.init(0x08e3, 0x08ff, 1),
Range16.init(0xfb50, 0xfbc1, 1),
Range16.init(0xfbd3, 0xfd3d, 1),
Range16.init(0xfd50, 0xfd8f, 1),
Range16.init(0xfd92, 0xfdc7, 1),
Range16.init(0xfdf0, 0xfdfd, 1),
Range16.init(0xfe70, 0xfe74, 1),
Range16.init(0xfe76, 0xfefc, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10e60, 0x10e7e, 1),
Range32.init(0x1ee00, 0x1ee03, 1),
Range32.init(0x1ee05, 0x1ee1f, 1),
Range32.init(0x1ee21, 0x1ee22, 1),
Range32.init(0x1ee24, 0x1ee24, 1),
Range32.init(0x1ee27, 0x1ee27, 1),
Range32.init(0x1ee29, 0x1ee32, 1),
Range32.init(0x1ee34, 0x1ee37, 1),
Range32.init(0x1ee39, 0x1ee39, 1),
Range32.init(0x1ee3b, 0x1ee3b, 1),
Range32.init(0x1ee42, 0x1ee42, 1),
Range32.init(0x1ee47, 0x1ee47, 1),
Range32.init(0x1ee49, 0x1ee49, 1),
Range32.init(0x1ee4b, 0x1ee4b, 1),
Range32.init(0x1ee4d, 0x1ee4f, 1),
Range32.init(0x1ee51, 0x1ee52, 1),
Range32.init(0x1ee54, 0x1ee54, 1),
Range32.init(0x1ee57, 0x1ee57, 1),
Range32.init(0x1ee59, 0x1ee59, 1),
Range32.init(0x1ee5b, 0x1ee5b, 1),
Range32.init(0x1ee5d, 0x1ee5d, 1),
Range32.init(0x1ee5f, 0x1ee5f, 1),
Range32.init(0x1ee61, 0x1ee62, 1),
Range32.init(0x1ee64, 0x1ee64, 1),
Range32.init(0x1ee67, 0x1ee6a, 1),
Range32.init(0x1ee6c, 0x1ee72, 1),
Range32.init(0x1ee74, 0x1ee77, 1),
Range32.init(0x1ee79, 0x1ee7c, 1),
Range32.init(0x1ee7e, 0x1ee7e, 1),
Range32.init(0x1ee80, 0x1ee89, 1),
Range32.init(0x1ee8b, 0x1ee9b, 1),
Range32.init(0x1eea1, 0x1eea3, 1),
Range32.init(0x1eea5, 0x1eea9, 1),
Range32.init(0x1eeab, 0x1eebb, 1),
Range32.init(0x1eef0, 0x1eef1, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Armenian = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0531, 0x0556, 1),
Range16.init(0x0559, 0x055f, 1),
Range16.init(0x0561, 0x0587, 1),
Range16.init(0x058a, 0x058a, 1),
Range16.init(0x058d, 0x058f, 1),
Range16.init(0xfb13, 0xfb17, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Avestan = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10b00, 0x10b35, 1),
Range32.init(0x10b39, 0x10b3f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Balinese = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1b00, 0x1b4b, 1),
Range16.init(0x1b50, 0x1b7c, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Bamum = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xa6a0, 0xa6f7, 1)};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0x16800, 0x16a38, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Bassa_Vah = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16ad0, 0x16aed, 1),
Range32.init(0x16af0, 0x16af5, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Batak = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1bc0, 0x1bf3, 1),
Range16.init(0x1bfc, 0x1bff, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Bengali = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0980, 0x0983, 1),
Range16.init(0x0985, 0x098c, 1),
Range16.init(0x098f, 0x0990, 1),
Range16.init(0x0993, 0x09a8, 1),
Range16.init(0x09aa, 0x09b0, 1),
Range16.init(0x09b2, 0x09b2, 1),
Range16.init(0x09b6, 0x09b9, 1),
Range16.init(0x09bc, 0x09c4, 1),
Range16.init(0x09c7, 0x09c8, 1),
Range16.init(0x09cb, 0x09ce, 1),
Range16.init(0x09d7, 0x09d7, 1),
Range16.init(0x09dc, 0x09dd, 1),
Range16.init(0x09df, 0x09e3, 1),
Range16.init(0x09e6, 0x09fd, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Bhaiksuki = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11c00, 0x11c08, 1),
Range32.init(0x11c0a, 0x11c36, 1),
Range32.init(0x11c38, 0x11c45, 1),
Range32.init(0x11c50, 0x11c6c, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Bopomofo = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x02ea, 0x02eb, 1),
Range16.init(0x3105, 0x312e, 1),
Range16.init(0x31a0, 0x31ba, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Brahmi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11000, 0x1104d, 1),
Range32.init(0x11052, 0x1106f, 1),
Range32.init(0x1107f, 0x1107f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Braille = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x2800, 0x28ff, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Buginese = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1a00, 0x1a1b, 1),
Range16.init(0x1a1e, 0x1a1f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Buhid = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x1740, 0x1753, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Canadian_Aboriginal = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1400, 0x167f, 1),
Range16.init(0x18b0, 0x18f5, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Carian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x102a0, 0x102d0, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Caucasian_Albanian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10530, 0x10563, 1),
Range32.init(0x1056f, 0x1056f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Chakma = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11100, 0x11134, 1),
Range32.init(0x11136, 0x11143, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Cham = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xaa00, 0xaa36, 1),
Range16.init(0xaa40, 0xaa4d, 1),
Range16.init(0xaa50, 0xaa59, 1),
Range16.init(0xaa5c, 0xaa5f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Cherokee = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x13a0, 0x13f5, 1),
Range16.init(0x13f8, 0x13fd, 1),
Range16.init(0xab70, 0xabbf, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Common = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0000, 0x0040, 1),
Range16.init(0x005b, 0x0060, 1),
Range16.init(0x007b, 0x00a9, 1),
Range16.init(0x00ab, 0x00b9, 1),
Range16.init(0x00bb, 0x00bf, 1),
Range16.init(0x00d7, 0x00d7, 1),
Range16.init(0x00f7, 0x00f7, 1),
Range16.init(0x02b9, 0x02df, 1),
Range16.init(0x02e5, 0x02e9, 1),
Range16.init(0x02ec, 0x02ff, 1),
Range16.init(0x0374, 0x0374, 1),
Range16.init(0x037e, 0x037e, 1),
Range16.init(0x0385, 0x0385, 1),
Range16.init(0x0387, 0x0387, 1),
Range16.init(0x0589, 0x0589, 1),
Range16.init(0x0605, 0x0605, 1),
Range16.init(0x060c, 0x060c, 1),
Range16.init(0x061b, 0x061b, 1),
Range16.init(0x061f, 0x061f, 1),
Range16.init(0x0640, 0x0640, 1),
Range16.init(0x06dd, 0x06dd, 1),
Range16.init(0x08e2, 0x08e2, 1),
Range16.init(0x0964, 0x0965, 1),
Range16.init(0x0e3f, 0x0e3f, 1),
Range16.init(0x0fd5, 0x0fd8, 1),
Range16.init(0x10fb, 0x10fb, 1),
Range16.init(0x16eb, 0x16ed, 1),
Range16.init(0x1735, 0x1736, 1),
Range16.init(0x1802, 0x1803, 1),
Range16.init(0x1805, 0x1805, 1),
Range16.init(0x1cd3, 0x1cd3, 1),
Range16.init(0x1ce1, 0x1ce1, 1),
Range16.init(0x1ce9, 0x1cec, 1),
Range16.init(0x1cee, 0x1cf3, 1),
Range16.init(0x1cf5, 0x1cf7, 1),
Range16.init(0x2000, 0x200b, 1),
Range16.init(0x200e, 0x2064, 1),
Range16.init(0x2066, 0x2070, 1),
Range16.init(0x2074, 0x207e, 1),
Range16.init(0x2080, 0x208e, 1),
Range16.init(0x20a0, 0x20bf, 1),
Range16.init(0x2100, 0x2125, 1),
Range16.init(0x2127, 0x2129, 1),
Range16.init(0x212c, 0x2131, 1),
Range16.init(0x2133, 0x214d, 1),
Range16.init(0x214f, 0x215f, 1),
Range16.init(0x2189, 0x218b, 1),
Range16.init(0x2190, 0x2426, 1),
Range16.init(0x2440, 0x244a, 1),
Range16.init(0x2460, 0x27ff, 1),
Range16.init(0x2900, 0x2b73, 1),
Range16.init(0x2b76, 0x2b95, 1),
Range16.init(0x2b98, 0x2bb9, 1),
Range16.init(0x2bbd, 0x2bc8, 1),
Range16.init(0x2bca, 0x2bd2, 1),
Range16.init(0x2bec, 0x2bef, 1),
Range16.init(0x2e00, 0x2e49, 1),
Range16.init(0x2ff0, 0x2ffb, 1),
Range16.init(0x3000, 0x3004, 1),
Range16.init(0x3006, 0x3006, 1),
Range16.init(0x3008, 0x3020, 1),
Range16.init(0x3030, 0x3037, 1),
Range16.init(0x303c, 0x303f, 1),
Range16.init(0x309b, 0x309c, 1),
Range16.init(0x30a0, 0x30a0, 1),
Range16.init(0x30fb, 0x30fc, 1),
Range16.init(0x3190, 0x319f, 1),
Range16.init(0x31c0, 0x31e3, 1),
Range16.init(0x3220, 0x325f, 1),
Range16.init(0x327f, 0x32cf, 1),
Range16.init(0x3358, 0x33ff, 1),
Range16.init(0x4dc0, 0x4dff, 1),
Range16.init(0xa700, 0xa721, 1),
Range16.init(0xa788, 0xa78a, 1),
Range16.init(0xa830, 0xa839, 1),
Range16.init(0xa92e, 0xa92e, 1),
Range16.init(0xa9cf, 0xa9cf, 1),
Range16.init(0xab5b, 0xab5b, 1),
Range16.init(0xfd3e, 0xfd3f, 1),
Range16.init(0xfe10, 0xfe19, 1),
Range16.init(0xfe30, 0xfe52, 1),
Range16.init(0xfe54, 0xfe66, 1),
Range16.init(0xfe68, 0xfe6b, 1),
Range16.init(0xfeff, 0xfeff, 1),
Range16.init(0xff01, 0xff20, 1),
Range16.init(0xff3b, 0xff40, 1),
Range16.init(0xff5b, 0xff65, 1),
Range16.init(0xff70, 0xff70, 1),
Range16.init(0xff9e, 0xff9f, 1),
Range16.init(0xffe0, 0xffe6, 1),
Range16.init(0xffe8, 0xffee, 1),
Range16.init(0xfff9, 0xfffd, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10100, 0x10102, 1),
Range32.init(0x10107, 0x10133, 1),
Range32.init(0x10137, 0x1013f, 1),
Range32.init(0x10190, 0x1019b, 1),
Range32.init(0x101d0, 0x101fc, 1),
Range32.init(0x102e1, 0x102fb, 1),
Range32.init(0x1bca0, 0x1bca3, 1),
Range32.init(0x1d000, 0x1d0f5, 1),
Range32.init(0x1d100, 0x1d126, 1),
Range32.init(0x1d129, 0x1d166, 1),
Range32.init(0x1d16a, 0x1d17a, 1),
Range32.init(0x1d183, 0x1d184, 1),
Range32.init(0x1d18c, 0x1d1a9, 1),
Range32.init(0x1d1ae, 0x1d1e8, 1),
Range32.init(0x1d300, 0x1d356, 1),
Range32.init(0x1d360, 0x1d371, 1),
Range32.init(0x1d400, 0x1d454, 1),
Range32.init(0x1d456, 0x1d49c, 1),
Range32.init(0x1d49e, 0x1d49f, 1),
Range32.init(0x1d4a2, 0x1d4a2, 1),
Range32.init(0x1d4a5, 0x1d4a6, 1),
Range32.init(0x1d4a9, 0x1d4ac, 1),
Range32.init(0x1d4ae, 0x1d4b9, 1),
Range32.init(0x1d4bb, 0x1d4bb, 1),
Range32.init(0x1d4bd, 0x1d4c3, 1),
Range32.init(0x1d4c5, 0x1d505, 1),
Range32.init(0x1d507, 0x1d50a, 1),
Range32.init(0x1d50d, 0x1d514, 1),
Range32.init(0x1d516, 0x1d51c, 1),
Range32.init(0x1d51e, 0x1d539, 1),
Range32.init(0x1d53b, 0x1d53e, 1),
Range32.init(0x1d540, 0x1d544, 1),
Range32.init(0x1d546, 0x1d546, 1),
Range32.init(0x1d54a, 0x1d550, 1),
Range32.init(0x1d552, 0x1d6a5, 1),
Range32.init(0x1d6a8, 0x1d7cb, 1),
Range32.init(0x1d7ce, 0x1d7ff, 1),
Range32.init(0x1f000, 0x1f02b, 1),
Range32.init(0x1f030, 0x1f093, 1),
Range32.init(0x1f0a0, 0x1f0ae, 1),
Range32.init(0x1f0b1, 0x1f0bf, 1),
Range32.init(0x1f0c1, 0x1f0cf, 1),
Range32.init(0x1f0d1, 0x1f0f5, 1),
Range32.init(0x1f100, 0x1f10c, 1),
Range32.init(0x1f110, 0x1f12e, 1),
Range32.init(0x1f130, 0x1f16b, 1),
Range32.init(0x1f170, 0x1f1ac, 1),
Range32.init(0x1f1e6, 0x1f1ff, 1),
Range32.init(0x1f201, 0x1f202, 1),
Range32.init(0x1f210, 0x1f23b, 1),
Range32.init(0x1f240, 0x1f248, 1),
Range32.init(0x1f250, 0x1f251, 1),
Range32.init(0x1f260, 0x1f265, 1),
Range32.init(0x1f300, 0x1f6d4, 1),
Range32.init(0x1f6e0, 0x1f6ec, 1),
Range32.init(0x1f6f0, 0x1f6f8, 1),
Range32.init(0x1f700, 0x1f773, 1),
Range32.init(0x1f780, 0x1f7d4, 1),
Range32.init(0x1f800, 0x1f80b, 1),
Range32.init(0x1f810, 0x1f847, 1),
Range32.init(0x1f850, 0x1f859, 1),
Range32.init(0x1f860, 0x1f887, 1),
Range32.init(0x1f890, 0x1f8ad, 1),
Range32.init(0x1f900, 0x1f90b, 1),
Range32.init(0x1f910, 0x1f93e, 1),
Range32.init(0x1f940, 0x1f94c, 1),
Range32.init(0x1f950, 0x1f96b, 1),
Range32.init(0x1f980, 0x1f997, 1),
Range32.init(0x1f9c0, 0x1f9c0, 1),
Range32.init(0x1f9d0, 0x1f9e6, 1),
Range32.init(0xe0001, 0xe0001, 1),
Range32.init(0xe0020, 0xe007f, 1),
};
break :init r[0..];
},
.latin_offset = 7,
};
const _Coptic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x03e2, 0x03ef, 1),
Range16.init(0x2c80, 0x2cf3, 1),
Range16.init(0x2cf9, 0x2cff, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Cuneiform = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x12000, 0x12399, 1),
Range32.init(0x12400, 0x1246e, 1),
Range32.init(0x12470, 0x12474, 1),
Range32.init(0x12480, 0x12543, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Cypriot = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10800, 0x10805, 1),
Range32.init(0x10808, 0x10808, 1),
Range32.init(0x1080a, 0x10835, 1),
Range32.init(0x10837, 0x10838, 1),
Range32.init(0x1083c, 0x1083c, 1),
Range32.init(0x1083f, 0x1083f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Cyrillic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0400, 0x0484, 1),
Range16.init(0x0487, 0x052f, 1),
Range16.init(0x1c80, 0x1c88, 1),
Range16.init(0x1d2b, 0x1d2b, 1),
Range16.init(0x1d78, 0x1d78, 1),
Range16.init(0x2de0, 0x2dff, 1),
Range16.init(0xa640, 0xa69f, 1),
Range16.init(0xfe2e, 0xfe2f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Deseret = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10400, 0x1044f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Devanagari = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0900, 0x0950, 1),
Range16.init(0x0953, 0x0963, 1),
Range16.init(0x0966, 0x097f, 1),
Range16.init(0xa8e0, 0xa8fd, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Duployan = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1bc00, 0x1bc6a, 1),
Range32.init(0x1bc70, 0x1bc7c, 1),
Range32.init(0x1bc80, 0x1bc88, 1),
Range32.init(0x1bc90, 0x1bc99, 1),
Range32.init(0x1bc9c, 0x1bc9f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Egyptian_Hieroglyphs = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x13000, 0x1342e, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Elbasan = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10500, 0x10527, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Ethiopic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1200, 0x1248, 1),
Range16.init(0x124a, 0x124d, 1),
Range16.init(0x1250, 0x1256, 1),
Range16.init(0x1258, 0x1258, 1),
Range16.init(0x125a, 0x125d, 1),
Range16.init(0x1260, 0x1288, 1),
Range16.init(0x128a, 0x128d, 1),
Range16.init(0x1290, 0x12b0, 1),
Range16.init(0x12b2, 0x12b5, 1),
Range16.init(0x12b8, 0x12be, 1),
Range16.init(0x12c0, 0x12c0, 1),
Range16.init(0x12c2, 0x12c5, 1),
Range16.init(0x12c8, 0x12d6, 1),
Range16.init(0x12d8, 0x1310, 1),
Range16.init(0x1312, 0x1315, 1),
Range16.init(0x1318, 0x135a, 1),
Range16.init(0x135d, 0x137c, 1),
Range16.init(0x1380, 0x1399, 1),
Range16.init(0x2d80, 0x2d96, 1),
Range16.init(0x2da0, 0x2da6, 1),
Range16.init(0x2da8, 0x2dae, 1),
Range16.init(0x2db0, 0x2db6, 1),
Range16.init(0x2db8, 0x2dbe, 1),
Range16.init(0x2dc0, 0x2dc6, 1),
Range16.init(0x2dc8, 0x2dce, 1),
Range16.init(0x2dd0, 0x2dd6, 1),
Range16.init(0x2dd8, 0x2dde, 1),
Range16.init(0xab01, 0xab06, 1),
Range16.init(0xab09, 0xab0e, 1),
Range16.init(0xab11, 0xab16, 1),
Range16.init(0xab20, 0xab26, 1),
Range16.init(0xab28, 0xab2e, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Georgian = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x10a0, 0x10c5, 1),
Range16.init(0x10c7, 0x10c7, 1),
Range16.init(0x10cd, 0x10cd, 1),
Range16.init(0x10d0, 0x10fa, 1),
Range16.init(0x10fc, 0x10ff, 1),
Range16.init(0x2d00, 0x2d25, 1),
Range16.init(0x2d27, 0x2d27, 1),
Range16.init(0x2d2d, 0x2d2d, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Glagolitic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2c00, 0x2c2e, 1),
Range16.init(0x2c30, 0x2c5e, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1e000, 0x1e006, 1),
Range32.init(0x1e008, 0x1e018, 1),
Range32.init(0x1e01b, 0x1e021, 1),
Range32.init(0x1e023, 0x1e024, 1),
Range32.init(0x1e026, 0x1e02a, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Gothic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10330, 0x1034a, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Grantha = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11300, 0x11303, 1),
Range32.init(0x11305, 0x1130c, 1),
Range32.init(0x1130f, 0x11310, 1),
Range32.init(0x11313, 0x11328, 1),
Range32.init(0x1132a, 0x11330, 1),
Range32.init(0x11332, 0x11333, 1),
Range32.init(0x11335, 0x11339, 1),
Range32.init(0x1133c, 0x11344, 1),
Range32.init(0x11347, 0x11348, 1),
Range32.init(0x1134b, 0x1134d, 1),
Range32.init(0x11350, 0x11350, 1),
Range32.init(0x11357, 0x11357, 1),
Range32.init(0x1135d, 0x11363, 1),
Range32.init(0x11366, 0x1136c, 1),
Range32.init(0x11370, 0x11374, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Greek = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0370, 0x0373, 1),
Range16.init(0x0375, 0x0377, 1),
Range16.init(0x037a, 0x037d, 1),
Range16.init(0x037f, 0x037f, 1),
Range16.init(0x0384, 0x0384, 1),
Range16.init(0x0386, 0x0386, 1),
Range16.init(0x0388, 0x038a, 1),
Range16.init(0x038c, 0x038c, 1),
Range16.init(0x038e, 0x03a1, 1),
Range16.init(0x03a3, 0x03e1, 1),
Range16.init(0x03f0, 0x03ff, 1),
Range16.init(0x1d26, 0x1d2a, 1),
Range16.init(0x1d5d, 0x1d61, 1),
Range16.init(0x1d66, 0x1d6a, 1),
Range16.init(0x1dbf, 0x1dbf, 1),
Range16.init(0x1f00, 0x1f15, 1),
Range16.init(0x1f18, 0x1f1d, 1),
Range16.init(0x1f20, 0x1f45, 1),
Range16.init(0x1f48, 0x1f4d, 1),
Range16.init(0x1f50, 0x1f57, 1),
Range16.init(0x1f59, 0x1f59, 1),
Range16.init(0x1f5b, 0x1f5b, 1),
Range16.init(0x1f5d, 0x1f5d, 1),
Range16.init(0x1f5f, 0x1f7d, 1),
Range16.init(0x1f80, 0x1fb4, 1),
Range16.init(0x1fb6, 0x1fc4, 1),
Range16.init(0x1fc6, 0x1fd3, 1),
Range16.init(0x1fd6, 0x1fdb, 1),
Range16.init(0x1fdd, 0x1fef, 1),
Range16.init(0x1ff2, 0x1ff4, 1),
Range16.init(0x1ff6, 0x1ffe, 1),
Range16.init(0x2126, 0x2126, 1),
Range16.init(0xab65, 0xab65, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10140, 0x1018e, 1),
Range32.init(0x101a0, 0x101a0, 1),
Range32.init(0x1d200, 0x1d245, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Gujarati = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0a81, 0x0a83, 1),
Range16.init(0x0a85, 0x0a8d, 1),
Range16.init(0x0a8f, 0x0a91, 1),
Range16.init(0x0a93, 0x0aa8, 1),
Range16.init(0x0aaa, 0x0ab0, 1),
Range16.init(0x0ab2, 0x0ab3, 1),
Range16.init(0x0ab5, 0x0ab9, 1),
Range16.init(0x0abc, 0x0ac5, 1),
Range16.init(0x0ac7, 0x0ac9, 1),
Range16.init(0x0acb, 0x0acd, 1),
Range16.init(0x0ad0, 0x0ad0, 1),
Range16.init(0x0ae0, 0x0ae3, 1),
Range16.init(0x0ae6, 0x0af1, 1),
Range16.init(0x0af9, 0x0aff, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Gurmukhi = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0a01, 0x0a03, 1),
Range16.init(0x0a05, 0x0a0a, 1),
Range16.init(0x0a0f, 0x0a10, 1),
Range16.init(0x0a13, 0x0a28, 1),
Range16.init(0x0a2a, 0x0a30, 1),
Range16.init(0x0a32, 0x0a33, 1),
Range16.init(0x0a35, 0x0a36, 1),
Range16.init(0x0a38, 0x0a39, 1),
Range16.init(0x0a3c, 0x0a3c, 1),
Range16.init(0x0a3e, 0x0a42, 1),
Range16.init(0x0a47, 0x0a48, 1),
Range16.init(0x0a4b, 0x0a4d, 1),
Range16.init(0x0a51, 0x0a51, 1),
Range16.init(0x0a59, 0x0a5c, 1),
Range16.init(0x0a5e, 0x0a5e, 1),
Range16.init(0x0a66, 0x0a75, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Han = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2e80, 0x2e99, 1),
Range16.init(0x2e9b, 0x2ef3, 1),
Range16.init(0x2f00, 0x2fd5, 1),
Range16.init(0x3005, 0x3005, 1),
Range16.init(0x3007, 0x3007, 1),
Range16.init(0x3021, 0x3029, 1),
Range16.init(0x3038, 0x303b, 1),
Range16.init(0x3400, 0x4db5, 1),
Range16.init(0x4e00, 0x9fea, 1),
Range16.init(0xf900, 0xfa6d, 1),
Range16.init(0xfa70, 0xfad9, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x20000, 0x2a6d6, 1),
Range32.init(0x2a700, 0x2b734, 1),
Range32.init(0x2b740, 0x2b81d, 1),
Range32.init(0x2b820, 0x2cea1, 1),
Range32.init(0x2ceb0, 0x2ebe0, 1),
Range32.init(0x2f800, 0x2fa1d, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Hangul = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1100, 0x11ff, 1),
Range16.init(0x302e, 0x302f, 1),
Range16.init(0x3131, 0x318e, 1),
Range16.init(0x3200, 0x321e, 1),
Range16.init(0x3260, 0x327e, 1),
Range16.init(0xa960, 0xa97c, 1),
Range16.init(0xac00, 0xd7a3, 1),
Range16.init(0xd7b0, 0xd7c6, 1),
Range16.init(0xd7cb, 0xd7fb, 1),
Range16.init(0xffa0, 0xffbe, 1),
Range16.init(0xffc2, 0xffc7, 1),
Range16.init(0xffca, 0xffcf, 1),
Range16.init(0xffd2, 0xffd7, 1),
Range16.init(0xffda, 0xffdc, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Hanunoo = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x1720, 0x1734, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Hatran = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x108e0, 0x108f2, 1),
Range32.init(0x108f4, 0x108f5, 1),
Range32.init(0x108fb, 0x108ff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Hebrew = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0591, 0x05c7, 1),
Range16.init(0x05d0, 0x05ea, 1),
Range16.init(0x05f0, 0x05f4, 1),
Range16.init(0xfb1d, 0xfb36, 1),
Range16.init(0xfb38, 0xfb3c, 1),
Range16.init(0xfb3e, 0xfb3e, 1),
Range16.init(0xfb40, 0xfb41, 1),
Range16.init(0xfb43, 0xfb44, 1),
Range16.init(0xfb46, 0xfb4f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Hiragana = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x3041, 0x3096, 1),
Range16.init(0x309d, 0x309f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1b001, 0x1b11e, 1),
Range32.init(0x1f200, 0x1f200, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Imperial_Aramaic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10840, 0x10855, 1),
Range32.init(0x10857, 0x1085f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Inherited = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0300, 0x036f, 1),
Range16.init(0x0485, 0x0486, 1),
Range16.init(0x064b, 0x0655, 1),
Range16.init(0x0670, 0x0670, 1),
Range16.init(0x0951, 0x0952, 1),
Range16.init(0x1ab0, 0x1abe, 1),
Range16.init(0x1cd0, 0x1cd2, 1),
Range16.init(0x1cd4, 0x1ce0, 1),
Range16.init(0x1ce2, 0x1ce8, 1),
Range16.init(0x1ced, 0x1ced, 1),
Range16.init(0x1cf4, 0x1cf4, 1),
Range16.init(0x1cf8, 0x1cf9, 1),
Range16.init(0x1dc0, 0x1df9, 1),
Range16.init(0x1dfb, 0x1dff, 1),
Range16.init(0x200c, 0x200d, 1),
Range16.init(0x20d0, 0x20f0, 1),
Range16.init(0x302a, 0x302d, 1),
Range16.init(0x3099, 0x309a, 1),
Range16.init(0xfe00, 0xfe0f, 1),
Range16.init(0xfe20, 0xfe2d, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x101fd, 0x101fd, 1),
Range32.init(0x102e0, 0x102e0, 1),
Range32.init(0x1d167, 0x1d169, 1),
Range32.init(0x1d17b, 0x1d182, 1),
Range32.init(0x1d185, 0x1d18b, 1),
Range32.init(0x1d1aa, 0x1d1ad, 1),
Range32.init(0xe0100, 0xe01ef, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Inscriptional_Pahlavi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10b60, 0x10b72, 1),
Range32.init(0x10b78, 0x10b7f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Inscriptional_Parthian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10b40, 0x10b55, 1),
Range32.init(0x10b58, 0x10b5f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Javanese = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xa980, 0xa9cd, 1),
Range16.init(0xa9d0, 0xa9d9, 1),
Range16.init(0xa9de, 0xa9df, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Kaithi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x11080, 0x110c1, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Kannada = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0c80, 0x0c83, 1),
Range16.init(0x0c85, 0x0c8c, 1),
Range16.init(0x0c8e, 0x0c90, 1),
Range16.init(0x0c92, 0x0ca8, 1),
Range16.init(0x0caa, 0x0cb3, 1),
Range16.init(0x0cb5, 0x0cb9, 1),
Range16.init(0x0cbc, 0x0cc4, 1),
Range16.init(0x0cc6, 0x0cc8, 1),
Range16.init(0x0cca, 0x0ccd, 1),
Range16.init(0x0cd5, 0x0cd6, 1),
Range16.init(0x0cde, 0x0cde, 1),
Range16.init(0x0ce0, 0x0ce3, 1),
Range16.init(0x0ce6, 0x0cef, 1),
Range16.init(0x0cf1, 0x0cf2, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Katakana = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x30a1, 0x30fa, 1),
Range16.init(0x30fd, 0x30ff, 1),
Range16.init(0x31f0, 0x31ff, 1),
Range16.init(0x32d0, 0x32fe, 1),
Range16.init(0x3300, 0x3357, 1),
Range16.init(0xff66, 0xff6f, 1),
Range16.init(0xff71, 0xff9d, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0x1b000, 0x1b000, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Kayah_Li = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xa900, 0xa92d, 1),
Range16.init(0xa92f, 0xa92f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Kharoshthi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10a00, 0x10a03, 1),
Range32.init(0x10a05, 0x10a06, 1),
Range32.init(0x10a0c, 0x10a13, 1),
Range32.init(0x10a15, 0x10a17, 1),
Range32.init(0x10a19, 0x10a33, 1),
Range32.init(0x10a38, 0x10a3a, 1),
Range32.init(0x10a3f, 0x10a47, 1),
Range32.init(0x10a50, 0x10a58, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Khmer = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1780, 0x17dd, 1),
Range16.init(0x17e0, 0x17e9, 1),
Range16.init(0x17f0, 0x17f9, 1),
Range16.init(0x19e0, 0x19ff, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Khojki = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11200, 0x11211, 1),
Range32.init(0x11213, 0x1123e, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Khudawadi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x112b0, 0x112ea, 1),
Range32.init(0x112f0, 0x112f9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Lao = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0e81, 0x0e82, 1),
Range16.init(0x0e84, 0x0e84, 1),
Range16.init(0x0e87, 0x0e88, 1),
Range16.init(0x0e8a, 0x0e8a, 1),
Range16.init(0x0e8d, 0x0e8d, 1),
Range16.init(0x0e94, 0x0e97, 1),
Range16.init(0x0e99, 0x0e9f, 1),
Range16.init(0x0ea1, 0x0ea3, 1),
Range16.init(0x0ea5, 0x0ea5, 1),
Range16.init(0x0ea7, 0x0ea7, 1),
Range16.init(0x0eaa, 0x0eab, 1),
Range16.init(0x0ead, 0x0eb9, 1),
Range16.init(0x0ebb, 0x0ebd, 1),
Range16.init(0x0ec0, 0x0ec4, 1),
Range16.init(0x0ec6, 0x0ec6, 1),
Range16.init(0x0ec8, 0x0ecd, 1),
Range16.init(0x0ed0, 0x0ed9, 1),
Range16.init(0x0edc, 0x0edf, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Latin = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0041, 0x005a, 1),
Range16.init(0x0061, 0x007a, 1),
Range16.init(0x00aa, 0x00aa, 1),
Range16.init(0x00ba, 0x00ba, 1),
Range16.init(0x00c0, 0x00d6, 1),
Range16.init(0x00d8, 0x00f6, 1),
Range16.init(0x00f8, 0x02b8, 1),
Range16.init(0x02e0, 0x02e4, 1),
Range16.init(0x1d00, 0x1d25, 1),
Range16.init(0x1d2c, 0x1d5c, 1),
Range16.init(0x1d62, 0x1d65, 1),
Range16.init(0x1d6b, 0x1d77, 1),
Range16.init(0x1d79, 0x1dbe, 1),
Range16.init(0x1e00, 0x1eff, 1),
Range16.init(0x2071, 0x2071, 1),
Range16.init(0x207f, 0x207f, 1),
Range16.init(0x2090, 0x209c, 1),
Range16.init(0x212a, 0x212b, 1),
Range16.init(0x2132, 0x2132, 1),
Range16.init(0x214e, 0x214e, 1),
Range16.init(0x2160, 0x2188, 1),
Range16.init(0x2c60, 0x2c7f, 1),
Range16.init(0xa722, 0xa787, 1),
Range16.init(0xa78b, 0xa7ae, 1),
Range16.init(0xa7b0, 0xa7b7, 1),
Range16.init(0xa7f7, 0xa7ff, 1),
Range16.init(0xab30, 0xab5a, 1),
Range16.init(0xab5c, 0xab64, 1),
Range16.init(0xfb00, 0xfb06, 1),
Range16.init(0xff21, 0xff3a, 1),
Range16.init(0xff41, 0xff5a, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 6,
};
const _Lepcha = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1c00, 0x1c37, 1),
Range16.init(0x1c3b, 0x1c49, 1),
Range16.init(0x1c4d, 0x1c4f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Limbu = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1900, 0x191e, 1),
Range16.init(0x1920, 0x192b, 1),
Range16.init(0x1930, 0x193b, 1),
Range16.init(0x1940, 0x1940, 1),
Range16.init(0x1944, 0x194f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Linear_A = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10600, 0x10736, 1),
Range32.init(0x10740, 0x10755, 1),
Range32.init(0x10760, 0x10767, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Linear_B = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10000, 0x1000b, 1),
Range32.init(0x1000d, 0x10026, 1),
Range32.init(0x10028, 0x1003a, 1),
Range32.init(0x1003c, 0x1003d, 1),
Range32.init(0x1003f, 0x1004d, 1),
Range32.init(0x10050, 0x1005d, 1),
Range32.init(0x10080, 0x100fa, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Lisu = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xa4d0, 0xa4ff, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Lycian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10280, 0x1029c, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Lydian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10920, 0x10939, 1),
Range32.init(0x1093f, 0x1093f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Mahajani = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x11150, 0x11176, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Malayalam = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0d00, 0x0d03, 1),
Range16.init(0x0d05, 0x0d0c, 1),
Range16.init(0x0d0e, 0x0d10, 1),
Range16.init(0x0d12, 0x0d44, 1),
Range16.init(0x0d46, 0x0d48, 1),
Range16.init(0x0d4a, 0x0d4f, 1),
Range16.init(0x0d54, 0x0d63, 1),
Range16.init(0x0d66, 0x0d7f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Mandaic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0840, 0x085b, 1),
Range16.init(0x085e, 0x085e, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Manichaean = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10ac0, 0x10ae6, 1),
Range32.init(0x10aeb, 0x10af6, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Marchen = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11c70, 0x11c8f, 1),
Range32.init(0x11c92, 0x11ca7, 1),
Range32.init(0x11ca9, 0x11cb6, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Masaram_Gondi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11d00, 0x11d06, 1),
Range32.init(0x11d08, 0x11d09, 1),
Range32.init(0x11d0b, 0x11d36, 1),
Range32.init(0x11d3a, 0x11d3a, 1),
Range32.init(0x11d3c, 0x11d3d, 1),
Range32.init(0x11d3f, 0x11d47, 1),
Range32.init(0x11d50, 0x11d59, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Meetei_Mayek = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xaae0, 0xaaf6, 1),
Range16.init(0xabc0, 0xabed, 1),
Range16.init(0xabf0, 0xabf9, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Mende_Kikakui = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1e800, 0x1e8c4, 1),
Range32.init(0x1e8c7, 0x1e8d6, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Meroitic_Cursive = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x109a0, 0x109b7, 1),
Range32.init(0x109bc, 0x109cf, 1),
Range32.init(0x109d2, 0x109ff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Meroitic_Hieroglyphs = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10980, 0x1099f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Miao = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16f00, 0x16f44, 1),
Range32.init(0x16f50, 0x16f7e, 1),
Range32.init(0x16f8f, 0x16f9f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Modi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11600, 0x11644, 1),
Range32.init(0x11650, 0x11659, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Mongolian = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1800, 0x1801, 1),
Range16.init(0x1804, 0x1804, 1),
Range16.init(0x1806, 0x180e, 1),
Range16.init(0x1810, 0x1819, 1),
Range16.init(0x1820, 0x1877, 1),
Range16.init(0x1880, 0x18aa, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0x11660, 0x1166c, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Mro = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16a40, 0x16a5e, 1),
Range32.init(0x16a60, 0x16a69, 1),
Range32.init(0x16a6e, 0x16a6f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Multani = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11280, 0x11286, 1),
Range32.init(0x11288, 0x11288, 1),
Range32.init(0x1128a, 0x1128d, 1),
Range32.init(0x1128f, 0x1129d, 1),
Range32.init(0x1129f, 0x112a9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Myanmar = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1000, 0x109f, 1),
Range16.init(0xa9e0, 0xa9fe, 1),
Range16.init(0xaa60, 0xaa7f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Nabataean = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10880, 0x1089e, 1),
Range32.init(0x108a7, 0x108af, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _New_Tai_Lue = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1980, 0x19ab, 1),
Range16.init(0x19b0, 0x19c9, 1),
Range16.init(0x19d0, 0x19da, 1),
Range16.init(0x19de, 0x19df, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Newa = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11400, 0x11459, 1),
Range32.init(0x1145b, 0x1145b, 1),
Range32.init(0x1145d, 0x1145d, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Nko = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x07c0, 0x07fa, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Nushu = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16fe1, 0x16fe1, 1),
Range32.init(0x1b170, 0x1b2fb, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Ogham = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x1680, 0x169c, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Ol_Chiki = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x1c50, 0x1c7f, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Old_Hungarian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10c80, 0x10cb2, 1),
Range32.init(0x10cc0, 0x10cf2, 1),
Range32.init(0x10cfa, 0x10cff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_Italic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10300, 0x10323, 1),
Range32.init(0x1032d, 0x1032f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_North_Arabian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10a80, 0x10a9f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_Permic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10350, 0x1037a, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_Persian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x103a0, 0x103c3, 1),
Range32.init(0x103c8, 0x103d5, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_South_Arabian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10a60, 0x10a7f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Old_Turkic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10c00, 0x10c48, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Oriya = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0b01, 0x0b03, 1),
Range16.init(0x0b05, 0x0b0c, 1),
Range16.init(0x0b0f, 0x0b10, 1),
Range16.init(0x0b13, 0x0b28, 1),
Range16.init(0x0b2a, 0x0b30, 1),
Range16.init(0x0b32, 0x0b33, 1),
Range16.init(0x0b35, 0x0b39, 1),
Range16.init(0x0b3c, 0x0b44, 1),
Range16.init(0x0b47, 0x0b48, 1),
Range16.init(0x0b4b, 0x0b4d, 1),
Range16.init(0x0b56, 0x0b57, 1),
Range16.init(0x0b5c, 0x0b5d, 1),
Range16.init(0x0b5f, 0x0b63, 1),
Range16.init(0x0b66, 0x0b77, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Osage = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x104b0, 0x104d3, 1),
Range32.init(0x104d8, 0x104fb, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Osmanya = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10480, 0x1049d, 1),
Range32.init(0x104a0, 0x104a9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Pahawh_Hmong = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16b00, 0x16b45, 1),
Range32.init(0x16b50, 0x16b59, 1),
Range32.init(0x16b5b, 0x16b61, 1),
Range32.init(0x16b63, 0x16b77, 1),
Range32.init(0x16b7d, 0x16b8f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Palmyrene = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10860, 0x1087f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Pau_Cin_Hau = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x11ac0, 0x11af8, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Phags_Pa = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xa840, 0xa877, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Phoenician = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10900, 0x1091b, 1),
Range32.init(0x1091f, 0x1091f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Psalter_Pahlavi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10b80, 0x10b91, 1),
Range32.init(0x10b99, 0x10b9c, 1),
Range32.init(0x10ba9, 0x10baf, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Rejang = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xa930, 0xa953, 1),
Range16.init(0xa95f, 0xa95f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Runic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x16a0, 0x16ea, 1),
Range16.init(0x16ee, 0x16f8, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Samaritan = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0800, 0x082d, 1),
Range16.init(0x0830, 0x083e, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Saurashtra = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xa880, 0xa8c5, 1),
Range16.init(0xa8ce, 0xa8d9, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Sharada = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11180, 0x111cd, 1),
Range32.init(0x111d0, 0x111df, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Shavian = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x10450, 0x1047f, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Siddham = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11580, 0x115b5, 1),
Range32.init(0x115b8, 0x115dd, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _SignWriting = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1d800, 0x1da8b, 1),
Range32.init(0x1da9b, 0x1da9f, 1),
Range32.init(0x1daa1, 0x1daaf, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Sinhala = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0d82, 0x0d83, 1),
Range16.init(0x0d85, 0x0d96, 1),
Range16.init(0x0d9a, 0x0db1, 1),
Range16.init(0x0db3, 0x0dbb, 1),
Range16.init(0x0dbd, 0x0dbd, 1),
Range16.init(0x0dc0, 0x0dc6, 1),
Range16.init(0x0dca, 0x0dca, 1),
Range16.init(0x0dcf, 0x0dd4, 1),
Range16.init(0x0dd6, 0x0dd6, 1),
Range16.init(0x0dd8, 0x0ddf, 1),
Range16.init(0x0de6, 0x0def, 1),
Range16.init(0x0df2, 0x0df4, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0x111e1, 0x111f4, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Sora_Sompeng = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x110d0, 0x110e8, 1),
Range32.init(0x110f0, 0x110f9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Soyombo = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11a50, 0x11a83, 1),
Range32.init(0x11a86, 0x11a9c, 1),
Range32.init(0x11a9e, 0x11aa2, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Sundanese = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1b80, 0x1bbf, 1),
Range16.init(0x1cc0, 0x1cc7, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Syloti_Nagri = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xa800, 0xa82b, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Syriac = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0700, 0x070d, 1),
Range16.init(0x070f, 0x074a, 1),
Range16.init(0x074d, 0x074f, 1),
Range16.init(0x0860, 0x086a, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tagalog = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1700, 0x170c, 1),
Range16.init(0x170e, 0x1714, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tagbanwa = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1760, 0x176c, 1),
Range16.init(0x176e, 0x1770, 1),
Range16.init(0x1772, 0x1773, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tai_Le = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1950, 0x196d, 1),
Range16.init(0x1970, 0x1974, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tai_Tham = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1a20, 0x1a5e, 1),
Range16.init(0x1a60, 0x1a7c, 1),
Range16.init(0x1a7f, 0x1a89, 1),
Range16.init(0x1a90, 0x1a99, 1),
Range16.init(0x1aa0, 0x1aad, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tai_Viet = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xaa80, 0xaac2, 1),
Range16.init(0xaadb, 0xaadf, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Takri = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11680, 0x116b7, 1),
Range32.init(0x116c0, 0x116c9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Tamil = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0b82, 0x0b83, 1),
Range16.init(0x0b85, 0x0b8a, 1),
Range16.init(0x0b8e, 0x0b90, 1),
Range16.init(0x0b92, 0x0b95, 1),
Range16.init(0x0b99, 0x0b9a, 1),
Range16.init(0x0b9c, 0x0b9c, 1),
Range16.init(0x0b9e, 0x0b9f, 1),
Range16.init(0x0ba3, 0x0ba4, 1),
Range16.init(0x0ba8, 0x0baa, 1),
Range16.init(0x0bae, 0x0bb9, 1),
Range16.init(0x0bbe, 0x0bc2, 1),
Range16.init(0x0bc6, 0x0bc8, 1),
Range16.init(0x0bca, 0x0bcd, 1),
Range16.init(0x0bd0, 0x0bd0, 1),
Range16.init(0x0bd7, 0x0bd7, 1),
Range16.init(0x0be6, 0x0bfa, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tangut = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x16fe0, 0x16fe0, 1),
Range32.init(0x17000, 0x187ec, 1),
Range32.init(0x18800, 0x18af2, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Telugu = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0c00, 0x0c03, 1),
Range16.init(0x0c05, 0x0c0c, 1),
Range16.init(0x0c0e, 0x0c10, 1),
Range16.init(0x0c12, 0x0c28, 1),
Range16.init(0x0c2a, 0x0c39, 1),
Range16.init(0x0c3d, 0x0c44, 1),
Range16.init(0x0c46, 0x0c48, 1),
Range16.init(0x0c4a, 0x0c4d, 1),
Range16.init(0x0c55, 0x0c56, 1),
Range16.init(0x0c58, 0x0c5a, 1),
Range16.init(0x0c60, 0x0c63, 1),
Range16.init(0x0c66, 0x0c6f, 1),
Range16.init(0x0c78, 0x0c7f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Thaana = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x0780, 0x07b1, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Thai = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0e01, 0x0e3a, 1),
Range16.init(0x0e40, 0x0e5b, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tibetan = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0f00, 0x0f47, 1),
Range16.init(0x0f49, 0x0f6c, 1),
Range16.init(0x0f71, 0x0f97, 1),
Range16.init(0x0f99, 0x0fbc, 1),
Range16.init(0x0fbe, 0x0fcc, 1),
Range16.init(0x0fce, 0x0fd4, 1),
Range16.init(0x0fd9, 0x0fda, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tifinagh = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2d30, 0x2d67, 1),
Range16.init(0x2d6f, 0x2d70, 1),
Range16.init(0x2d7f, 0x2d7f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Tirhuta = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x11480, 0x114c7, 1),
Range32.init(0x114d0, 0x114d9, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Ugaritic = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10380, 0x1039d, 1),
Range32.init(0x1039f, 0x1039f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Vai = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0xa500, 0xa62b, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Warang_Citi = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x118a0, 0x118f2, 1),
Range32.init(0x118ff, 0x118ff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Yi = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xa000, 0xa48c, 1),
Range16.init(0xa490, 0xa4c6, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Zanabazar_Square = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x11a00, 0x11a47, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
// These variables have type *RangeTable.
pub const Adlam = &_Adlam; // Adlam is the set of Unicode characters in script Adlam.
pub const Ahom = &_Ahom; // Ahom is the set of Unicode characters in script Ahom.
pub const Anatolian_Hieroglyphs = &_Anatolian_Hieroglyphs; // Anatolian_Hieroglyphs is the set of Unicode characters in script Anatolian_Hieroglyphs.
pub const Arabic = &_Arabic; // Arabic is the set of Unicode characters in script Arabic.
pub const Armenian = &_Armenian; // Armenian is the set of Unicode characters in script Armenian.
pub const Avestan = &_Avestan; // Avestan is the set of Unicode characters in script Avestan.
pub const Balinese = &_Balinese; // Balinese is the set of Unicode characters in script Balinese.
pub const Bamum = &_Bamum; // Bamum is the set of Unicode characters in script Bamum.
pub const Bassa_Vah = &_Bassa_Vah; // Bassa_Vah is the set of Unicode characters in script Bassa_Vah.
pub const Batak = &_Batak; // Batak is the set of Unicode characters in script Batak.
pub const Bengali = &_Bengali; // Bengali is the set of Unicode characters in script Bengali.
pub const Bhaiksuki = &_Bhaiksuki; // Bhaiksuki is the set of Unicode characters in script Bhaiksuki.
pub const Bopomofo = &_Bopomofo; // Bopomofo is the set of Unicode characters in script Bopomofo.
pub const Brahmi = &_Brahmi; // Brahmi is the set of Unicode characters in script Brahmi.
pub const Braille = &_Braille; // Braille is the set of Unicode characters in script Braille.
pub const Buginese = &_Buginese; // Buginese is the set of Unicode characters in script Buginese.
pub const Buhid = &_Buhid; // Buhid is the set of Unicode characters in script Buhid.
pub const Canadian_Aboriginal = &_Canadian_Aboriginal; // Canadian_Aboriginal is the set of Unicode characters in script Canadian_Aboriginal.
pub const Carian = &_Carian; // Carian is the set of Unicode characters in script Carian.
pub const Caucasian_Albanian = &_Caucasian_Albanian; // Caucasian_Albanian is the set of Unicode characters in script Caucasian_Albanian.
pub const Chakma = &_Chakma; // Chakma is the set of Unicode characters in script Chakma.
pub const Cham = &_Cham; // Cham is the set of Unicode characters in script Cham.
pub const Cherokee = &_Cherokee; // Cherokee is the set of Unicode characters in script Cherokee.
pub const Common = &_Common; // Common is the set of Unicode characters in script Common.
pub const Coptic = &_Coptic; // Coptic is the set of Unicode characters in script Coptic.
pub const Cuneiform = &_Cuneiform; // Cuneiform is the set of Unicode characters in script Cuneiform.
pub const Cypriot = &_Cypriot; // Cypriot is the set of Unicode characters in script Cypriot.
pub const Cyrillic = &_Cyrillic; // Cyrillic is the set of Unicode characters in script Cyrillic.
pub const Deseret = &_Deseret; // Deseret is the set of Unicode characters in script Deseret.
pub const Devanagari = &_Devanagari; // Devanagari is the set of Unicode characters in script Devanagari.
pub const Duployan = &_Duployan; // Duployan is the set of Unicode characters in script Duployan.
pub const Egyptian_Hieroglyphs = &_Egyptian_Hieroglyphs; // Egyptian_Hieroglyphs is the set of Unicode characters in script Egyptian_Hieroglyphs.
pub const Elbasan = &_Elbasan; // Elbasan is the set of Unicode characters in script Elbasan.
pub const Ethiopic = &_Ethiopic; // Ethiopic is the set of Unicode characters in script Ethiopic.
pub const Georgian = &_Georgian; // Georgian is the set of Unicode characters in script Georgian.
pub const Glagolitic = &_Glagolitic; // Glagolitic is the set of Unicode characters in script Glagolitic.
pub const Gothic = &_Gothic; // Gothic is the set of Unicode characters in script Gothic.
pub const Grantha = &_Grantha; // Grantha is the set of Unicode characters in script Grantha.
pub const Greek = &_Greek; // Greek is the set of Unicode characters in script Greek.
pub const Gujarati = &_Gujarati; // Gujarati is the set of Unicode characters in script Gujarati.
pub const Gurmukhi = &_Gurmukhi; // Gurmukhi is the set of Unicode characters in script Gurmukhi.
pub const Han = &_Han; // Han is the set of Unicode characters in script Han.
pub const Hangul = &_Hangul; // Hangul is the set of Unicode characters in script Hangul.
pub const Hanunoo = &_Hanunoo; // Hanunoo is the set of Unicode characters in script Hanunoo.
pub const Hatran = &_Hatran; // Hatran is the set of Unicode characters in script Hatran.
pub const Hebrew = &_Hebrew; // Hebrew is the set of Unicode characters in script Hebrew.
pub const Hiragana = &_Hiragana; // Hiragana is the set of Unicode characters in script Hiragana.
pub const Imperial_Aramaic = &_Imperial_Aramaic; // Imperial_Aramaic is the set of Unicode characters in script Imperial_Aramaic.
pub const Inherited = &_Inherited; // Inherited is the set of Unicode characters in script Inherited.
pub const Inscriptional_Pahlavi = &_Inscriptional_Pahlavi; // Inscriptional_Pahlavi is the set of Unicode characters in script Inscriptional_Pahlavi.
pub const Inscriptional_Parthian = &_Inscriptional_Parthian; // Inscriptional_Parthian is the set of Unicode characters in script Inscriptional_Parthian.
pub const Javanese = &_Javanese; // Javanese is the set of Unicode characters in script Javanese.
pub const Kaithi = &_Kaithi; // Kaithi is the set of Unicode characters in script Kaithi.
pub const Kannada = &_Kannada; // Kannada is the set of Unicode characters in script Kannada.
pub const Katakana = &_Katakana; // Katakana is the set of Unicode characters in script Katakana.
pub const Kayah_Li = &_Kayah_Li; // Kayah_Li is the set of Unicode characters in script Kayah_Li.
pub const Kharoshthi = &_Kharoshthi; // Kharoshthi is the set of Unicode characters in script Kharoshthi.
pub const Khmer = &_Khmer; // Khmer is the set of Unicode characters in script Khmer.
pub const Khojki = &_Khojki; // Khojki is the set of Unicode characters in script Khojki.
pub const Khudawadi = &_Khudawadi; // Khudawadi is the set of Unicode characters in script Khudawadi.
pub const Lao = &_Lao; // Lao is the set of Unicode characters in script Lao.
pub const Latin = &_Latin; // Latin is the set of Unicode characters in script Latin.
pub const Lepcha = &_Lepcha; // Lepcha is the set of Unicode characters in script Lepcha.
pub const Limbu = &_Limbu; // Limbu is the set of Unicode characters in script Limbu.
pub const Linear_A = &_Linear_A; // Linear_A is the set of Unicode characters in script Linear_A.
pub const Linear_B = &_Linear_B; // Linear_B is the set of Unicode characters in script Linear_B.
pub const Lisu = &_Lisu; // Lisu is the set of Unicode characters in script Lisu.
pub const Lycian = &_Lycian; // Lycian is the set of Unicode characters in script Lycian.
pub const Lydian = &_Lydian; // Lydian is the set of Unicode characters in script Lydian.
pub const Mahajani = &_Mahajani; // Mahajani is the set of Unicode characters in script Mahajani.
pub const Malayalam = &_Malayalam; // Malayalam is the set of Unicode characters in script Malayalam.
pub const Mandaic = &_Mandaic; // Mandaic is the set of Unicode characters in script Mandaic.
pub const Manichaean = &_Manichaean; // Manichaean is the set of Unicode characters in script Manichaean.
pub const Marchen = &_Marchen; // Marchen is the set of Unicode characters in script Marchen.
pub const Masaram_Gondi = &_Masaram_Gondi; // Masaram_Gondi is the set of Unicode characters in script Masaram_Gondi.
pub const Meetei_Mayek = &_Meetei_Mayek; // Meetei_Mayek is the set of Unicode characters in script Meetei_Mayek.
pub const Mende_Kikakui = &_Mende_Kikakui; // Mende_Kikakui is the set of Unicode characters in script Mende_Kikakui.
pub const Meroitic_Cursive = &_Meroitic_Cursive; // Meroitic_Cursive is the set of Unicode characters in script Meroitic_Cursive.
pub const Meroitic_Hieroglyphs = &_Meroitic_Hieroglyphs; // Meroitic_Hieroglyphs is the set of Unicode characters in script Meroitic_Hieroglyphs.
pub const Miao = &_Miao; // Miao is the set of Unicode characters in script Miao.
pub const Modi = &_Modi; // Modi is the set of Unicode characters in script Modi.
pub const Mongolian = &_Mongolian; // Mongolian is the set of Unicode characters in script Mongolian.
pub const Mro = &_Mro; // Mro is the set of Unicode characters in script Mro.
pub const Multani = &_Multani; // Multani is the set of Unicode characters in script Multani.
pub const Myanmar = &_Myanmar; // Myanmar is the set of Unicode characters in script Myanmar.
pub const Nabataean = &_Nabataean; // Nabataean is the set of Unicode characters in script Nabataean.
pub const New_Tai_Lue = &_New_Tai_Lue; // New_Tai_Lue is the set of Unicode characters in script New_Tai_Lue.
pub const Newa = &_Newa; // Newa is the set of Unicode characters in script Newa.
pub const Nko = &_Nko; // Nko is the set of Unicode characters in script Nko.
pub const Nushu = &_Nushu; // Nushu is the set of Unicode characters in script Nushu.
pub const Ogham = &_Ogham; // Ogham is the set of Unicode characters in script Ogham.
pub const Ol_Chiki = &_Ol_Chiki; // Ol_Chiki is the set of Unicode characters in script Ol_Chiki.
pub const Old_Hungarian = &_Old_Hungarian; // Old_Hungarian is the set of Unicode characters in script Old_Hungarian.
pub const Old_Italic = &_Old_Italic; // Old_Italic is the set of Unicode characters in script Old_Italic.
pub const Old_North_Arabian = &_Old_North_Arabian; // Old_North_Arabian is the set of Unicode characters in script Old_North_Arabian.
pub const Old_Permic = &_Old_Permic; // Old_Permic is the set of Unicode characters in script Old_Permic.
pub const Old_Persian = &_Old_Persian; // Old_Persian is the set of Unicode characters in script Old_Persian.
pub const Old_South_Arabian = &_Old_South_Arabian; // Old_South_Arabian is the set of Unicode characters in script Old_South_Arabian.
pub const Old_Turkic = &_Old_Turkic; // Old_Turkic is the set of Unicode characters in script Old_Turkic.
pub const Oriya = &_Oriya; // Oriya is the set of Unicode characters in script Oriya.
pub const Osage = &_Osage; // Osage is the set of Unicode characters in script Osage.
pub const Osmanya = &_Osmanya; // Osmanya is the set of Unicode characters in script Osmanya.
pub const Pahawh_Hmong = &_Pahawh_Hmong; // Pahawh_Hmong is the set of Unicode characters in script Pahawh_Hmong.
pub const Palmyrene = &_Palmyrene; // Palmyrene is the set of Unicode characters in script Palmyrene.
pub const Pau_Cin_Hau = &_Pau_Cin_Hau; // Pau_Cin_Hau is the set of Unicode characters in script Pau_Cin_Hau.
pub const Phags_Pa = &_Phags_Pa; // Phags_Pa is the set of Unicode characters in script Phags_Pa.
pub const Phoenician = &_Phoenician; // Phoenician is the set of Unicode characters in script Phoenician.
pub const Psalter_Pahlavi = &_Psalter_Pahlavi; // Psalter_Pahlavi is the set of Unicode characters in script Psalter_Pahlavi.
pub const Rejang = &_Rejang; // Rejang is the set of Unicode characters in script Rejang.
pub const Runic = &_Runic; // Runic is the set of Unicode characters in script Runic.
pub const Samaritan = &_Samaritan; // Samaritan is the set of Unicode characters in script Samaritan.
pub const Saurashtra = &_Saurashtra; // Saurashtra is the set of Unicode characters in script Saurashtra.
pub const Sharada = &_Sharada; // Sharada is the set of Unicode characters in script Sharada.
pub const Shavian = &_Shavian; // Shavian is the set of Unicode characters in script Shavian.
pub const Siddham = &_Siddham; // Siddham is the set of Unicode characters in script Siddham.
pub const SignWriting = &_SignWriting; // SignWriting is the set of Unicode characters in script SignWriting.
pub const Sinhala = &_Sinhala; // Sinhala is the set of Unicode characters in script Sinhala.
pub const Sora_Sompeng = &_Sora_Sompeng; // Sora_Sompeng is the set of Unicode characters in script Sora_Sompeng.
pub const Soyombo = &_Soyombo; // Soyombo is the set of Unicode characters in script Soyombo.
pub const Sundanese = &_Sundanese; // Sundanese is the set of Unicode characters in script Sundanese.
pub const Syloti_Nagri = &_Syloti_Nagri; // Syloti_Nagri is the set of Unicode characters in script Syloti_Nagri.
pub const Syriac = &_Syriac; // Syriac is the set of Unicode characters in script Syriac.
pub const Tagalog = &_Tagalog; // Tagalog is the set of Unicode characters in script Tagalog.
pub const Tagbanwa = &_Tagbanwa; // Tagbanwa is the set of Unicode characters in script Tagbanwa.
pub const Tai_Le = &_Tai_Le; // Tai_Le is the set of Unicode characters in script Tai_Le.
pub const Tai_Tham = &_Tai_Tham; // Tai_Tham is the set of Unicode characters in script Tai_Tham.
pub const Tai_Viet = &_Tai_Viet; // Tai_Viet is the set of Unicode characters in script Tai_Viet.
pub const Takri = &_Takri; // Takri is the set of Unicode characters in script Takri.
pub const Tamil = &_Tamil; // Tamil is the set of Unicode characters in script Tamil.
pub const Tangut = &_Tangut; // Tangut is the set of Unicode characters in script Tangut.
pub const Telugu = &_Telugu; // Telugu is the set of Unicode characters in script Telugu.
pub const Thaana = &_Thaana; // Thaana is the set of Unicode characters in script Thaana.
pub const Thai = &_Thai; // Thai is the set of Unicode characters in script Thai.
pub const Tibetan = &_Tibetan; // Tibetan is the set of Unicode characters in script Tibetan.
pub const Tifinagh = &_Tifinagh; // Tifinagh is the set of Unicode characters in script Tifinagh.
pub const Tirhuta = &_Tirhuta; // Tirhuta is the set of Unicode characters in script Tirhuta.
pub const Ugaritic = &_Ugaritic; // Ugaritic is the set of Unicode characters in script Ugaritic.
pub const Vai = &_Vai; // Vai is the set of Unicode characters in script Vai.
pub const Warang_Citi = &_Warang_Citi; // Warang_Citi is the set of Unicode characters in script Warang_Citi.
pub const Yi = &_Yi; // Yi is the set of Unicode characters in script Yi.
pub const Zanabazar_Square = &_Zanabazar_Square; // Zanabazar_Square is the set of Unicode characters in script Zanabazar_Square.
// Generated by running
//maketables --props=all --url=http://www.unicode.org/Public/10.0.0/ucd/
//DO NOT EDIT
// Properties is the set of Unicode property tables.
pub const Property = enum {
ASCII_Hex_Digit,
Bidi_Control,
Dash,
Deprecated,
Diacritic,
Extender,
Hex_Digit,
Hyphen,
IDS_Binary_Operator,
IDS_Trinary_Operator,
Ideographic,
Join_Control,
Logical_Order_Exception,
Noncharacter_Code_Point,
Other_Alphabetic,
Other_Default_Ignorable_Code_Point,
Other_Grapheme_Extend,
Other_ID_Continue,
Other_ID_Start,
Other_Lowercase,
Other_Math,
Other_Uppercase,
Pattern_Syntax,
Pattern_White_Space,
Prepended_Concatenation_Mark,
Quotation_Mark,
Radical,
Regional_Indicator,
Sentence_Terminal,
STerm,
Soft_Dotted,
Terminal_Punctuation,
Unified_Ideograph,
Variation_Selector,
White_Space,
pub fn table(self: Property) *RangeTable {
return switch (self) {
Property.ASCII_Hex_Digit => ASCII_Hex_Digit,
Property.Bidi_Control => Bidi_Control,
Property.Dash => Dash,
Property.Deprecated => Deprecated,
Property.Diacritic => Diacritic,
Property.Extender => Extender,
Property.Hex_Digit => Hex_Digit,
Property.Hyphen => Hyphen,
Property.IDS_Binary_Operator => IDS_Binary_Operator,
Property.IDS_Trinary_Operator => IDS_Trinary_Operator,
Property.Ideographic => Ideographic,
Property.Join_Control => Join_Control,
Property.Logical_Order_Exception => Logical_Order_Exception,
Property.Noncharacter_Code_Point => Noncharacter_Code_Point,
Property.Other_Alphabetic => Other_Alphabetic,
Property.Other_Default_Ignorable_Code_Point => Other_Default_Ignorable_Code_Point,
Property.Other_Grapheme_Extend => Other_Grapheme_Extend,
Property.Other_ID_Continue => Other_ID_Continue,
Property.Other_ID_Start => Other_ID_Start,
Property.Other_Lowercase => Other_Lowercase,
Property.Other_Math => Other_Math,
Property.Other_Uppercase => Other_Uppercase,
Property.Pattern_Syntax => Pattern_Syntax,
Property.Pattern_White_Space => Pattern_White_Space,
Property.Prepended_Concatenation_Mark => Prepended_Concatenation_Mark,
Property.Quotation_Mark => Quotation_Mark,
Property.Radical => Radical,
Property.Regional_Indicator => Regional_Indicator,
Property.Sentence_Terminal => Sentence_Terminal,
Property.STerm => Sentence_Terminal,
Property.Soft_Dotted => Soft_Dotted,
Property.Terminal_Punctuation => Terminal_Punctuation,
Property.Unified_Ideograph => Unified_Ideograph,
Property.Variation_Selector => Variation_Selector,
Property.White_Space => White_Space,
else => unreachable,
};
}
pub fn list() []Property {
return []Property{
Property.ASCII_Hex_Digit, Property.Bidi_Control, Property.Dash, Property.Deprecated, Property.Diacritic, Property.Extender, Property.Hex_Digit, Property.Hyphen, Property.IDS_Binary_Operator, Property.IDS_Trinary_Operator, Property.Ideographic, Property.Join_Control, Property.Logical_Order_Exception, Property.Noncharacter_Code_Point, Property.Other_Alphabetic, Property.Other_Default_Ignorable_Code_Point, Property.Other_Grapheme_Extend, Property.Other_ID_Continue, Property.Other_ID_Start, Property.Other_Lowercase, Property.Other_Math, Property.Other_Uppercase, Property.Pattern_Syntax, Property.Pattern_White_Space, Property.Prepended_Concatenation_Mark, Property.Quotation_Mark, Property.Radical, Property.Regional_Indicator, Property.Sentence_Terminal, Property.STerm, Property.Soft_Dotted, Property.Terminal_Punctuation, Property.Unified_Ideograph, Property.Variation_Selector, Property.White_Space,
};
}
};
const _ASCII_Hex_Digit = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0030, 0x0039, 1),
Range16.init(0x0041, 0x0046, 1),
Range16.init(0x0061, 0x0066, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 3,
};
const _Bidi_Control = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x061c, 0x061c, 1),
Range16.init(0x200e, 0x200f, 1),
Range16.init(0x202a, 0x202e, 1),
Range16.init(0x2066, 0x2069, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Dash = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x002d, 0x002d, 1),
Range16.init(0x058a, 0x058a, 1),
Range16.init(0x05be, 0x05be, 1),
Range16.init(0x1400, 0x1400, 1),
Range16.init(0x1806, 0x1806, 1),
Range16.init(0x2010, 0x2015, 1),
Range16.init(0x2053, 0x2053, 1),
Range16.init(0x207b, 0x207b, 1),
Range16.init(0x208b, 0x208b, 1),
Range16.init(0x2212, 0x2212, 1),
Range16.init(0x2e17, 0x2e17, 1),
Range16.init(0x2e1a, 0x2e1a, 1),
Range16.init(0x2e3a, 0x2e3b, 1),
Range16.init(0x2e40, 0x2e40, 1),
Range16.init(0x301c, 0x301c, 1),
Range16.init(0x3030, 0x3030, 1),
Range16.init(0x30a0, 0x30a0, 1),
Range16.init(0xfe31, 0xfe32, 1),
Range16.init(0xfe58, 0xfe58, 1),
Range16.init(0xfe63, 0xfe63, 1),
Range16.init(0xff0d, 0xff0d, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 1,
};
const _Deprecated = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0149, 0x0149, 1),
Range16.init(0x0673, 0x0673, 1),
Range16.init(0x0f77, 0x0f77, 1),
Range16.init(0x0f79, 0x0f79, 1),
Range16.init(0x17a3, 0x17a4, 1),
Range16.init(0x206a, 0x206f, 1),
Range16.init(0x2329, 0x232a, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0xe0001, 0xe0001, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Diacritic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x005e, 0x005e, 1),
Range16.init(0x0060, 0x0060, 1),
Range16.init(0x00a8, 0x00a8, 1),
Range16.init(0x00af, 0x00af, 1),
Range16.init(0x00b4, 0x00b4, 1),
Range16.init(0x00b7, 0x00b8, 1),
Range16.init(0x02b0, 0x034e, 1),
Range16.init(0x0350, 0x0357, 1),
Range16.init(0x035d, 0x0362, 1),
Range16.init(0x0374, 0x0375, 1),
Range16.init(0x037a, 0x037a, 1),
Range16.init(0x0384, 0x0385, 1),
Range16.init(0x0483, 0x0487, 1),
Range16.init(0x0559, 0x0559, 1),
Range16.init(0x0591, 0x05a1, 1),
Range16.init(0x05a3, 0x05bd, 1),
Range16.init(0x05bf, 0x05bf, 1),
Range16.init(0x05c1, 0x05c2, 1),
Range16.init(0x05c4, 0x05c4, 1),
Range16.init(0x064b, 0x0652, 1),
Range16.init(0x0657, 0x0658, 1),
Range16.init(0x06df, 0x06e0, 1),
Range16.init(0x06e5, 0x06e6, 1),
Range16.init(0x06ea, 0x06ec, 1),
Range16.init(0x0730, 0x074a, 1),
Range16.init(0x07a6, 0x07b0, 1),
Range16.init(0x07eb, 0x07f5, 1),
Range16.init(0x0818, 0x0819, 1),
Range16.init(0x08e3, 0x08fe, 1),
Range16.init(0x093c, 0x093c, 1),
Range16.init(0x094d, 0x094d, 1),
Range16.init(0x0951, 0x0954, 1),
Range16.init(0x0971, 0x0971, 1),
Range16.init(0x09bc, 0x09bc, 1),
Range16.init(0x09cd, 0x09cd, 1),
Range16.init(0x0a3c, 0x0a3c, 1),
Range16.init(0x0a4d, 0x0a4d, 1),
Range16.init(0x0abc, 0x0abc, 1),
Range16.init(0x0acd, 0x0acd, 1),
Range16.init(0x0afd, 0x0aff, 1),
Range16.init(0x0b3c, 0x0b3c, 1),
Range16.init(0x0b4d, 0x0b4d, 1),
Range16.init(0x0bcd, 0x0bcd, 1),
Range16.init(0x0c4d, 0x0c4d, 1),
Range16.init(0x0cbc, 0x0cbc, 1),
Range16.init(0x0ccd, 0x0ccd, 1),
Range16.init(0x0d3b, 0x0d3c, 1),
Range16.init(0x0d4d, 0x0d4d, 1),
Range16.init(0x0dca, 0x0dca, 1),
Range16.init(0x0e47, 0x0e4c, 1),
Range16.init(0x0e4e, 0x0e4e, 1),
Range16.init(0x0ec8, 0x0ecc, 1),
Range16.init(0x0f18, 0x0f19, 1),
Range16.init(0x0f35, 0x0f35, 1),
Range16.init(0x0f37, 0x0f37, 1),
Range16.init(0x0f39, 0x0f39, 1),
Range16.init(0x0f3e, 0x0f3f, 1),
Range16.init(0x0f82, 0x0f84, 1),
Range16.init(0x0f86, 0x0f87, 1),
Range16.init(0x0fc6, 0x0fc6, 1),
Range16.init(0x1037, 0x1037, 1),
Range16.init(0x1039, 0x103a, 1),
Range16.init(0x1087, 0x108d, 1),
Range16.init(0x108f, 0x108f, 1),
Range16.init(0x109a, 0x109b, 1),
Range16.init(0x17c9, 0x17d3, 1),
Range16.init(0x17dd, 0x17dd, 1),
Range16.init(0x1939, 0x193b, 1),
Range16.init(0x1a75, 0x1a7c, 1),
Range16.init(0x1a7f, 0x1a7f, 1),
Range16.init(0x1ab0, 0x1abd, 1),
Range16.init(0x1b34, 0x1b34, 1),
Range16.init(0x1b44, 0x1b44, 1),
Range16.init(0x1b6b, 0x1b73, 1),
Range16.init(0x1baa, 0x1bab, 1),
Range16.init(0x1c36, 0x1c37, 1),
Range16.init(0x1c78, 0x1c7d, 1),
Range16.init(0x1cd0, 0x1ce8, 1),
Range16.init(0x1ced, 0x1ced, 1),
Range16.init(0x1cf4, 0x1cf4, 1),
Range16.init(0x1cf7, 0x1cf9, 1),
Range16.init(0x1d2c, 0x1d6a, 1),
Range16.init(0x1dc4, 0x1dcf, 1),
Range16.init(0x1df5, 0x1df9, 1),
Range16.init(0x1dfd, 0x1dff, 1),
Range16.init(0x1fbd, 0x1fbd, 1),
Range16.init(0x1fbf, 0x1fc1, 1),
Range16.init(0x1fcd, 0x1fcf, 1),
Range16.init(0x1fdd, 0x1fdf, 1),
Range16.init(0x1fed, 0x1fef, 1),
Range16.init(0x1ffd, 0x1ffe, 1),
Range16.init(0x2cef, 0x2cf1, 1),
Range16.init(0x2e2f, 0x2e2f, 1),
Range16.init(0x302a, 0x302f, 1),
Range16.init(0x3099, 0x309c, 1),
Range16.init(0x30fc, 0x30fc, 1),
Range16.init(0xa66f, 0xa66f, 1),
Range16.init(0xa67c, 0xa67d, 1),
Range16.init(0xa67f, 0xa67f, 1),
Range16.init(0xa69c, 0xa69d, 1),
Range16.init(0xa6f0, 0xa6f1, 1),
Range16.init(0xa717, 0xa721, 1),
Range16.init(0xa788, 0xa788, 1),
Range16.init(0xa7f8, 0xa7f9, 1),
Range16.init(0xa8c4, 0xa8c4, 1),
Range16.init(0xa8e0, 0xa8f1, 1),
Range16.init(0xa92b, 0xa92e, 1),
Range16.init(0xa953, 0xa953, 1),
Range16.init(0xa9b3, 0xa9b3, 1),
Range16.init(0xa9c0, 0xa9c0, 1),
Range16.init(0xa9e5, 0xa9e5, 1),
Range16.init(0xaa7b, 0xaa7d, 1),
Range16.init(0xaabf, 0xaac2, 1),
Range16.init(0xaaf6, 0xaaf6, 1),
Range16.init(0xab5b, 0xab5f, 1),
Range16.init(0xabec, 0xabed, 1),
Range16.init(0xfb1e, 0xfb1e, 1),
Range16.init(0xfe20, 0xfe2f, 1),
Range16.init(0xff3e, 0xff3e, 1),
Range16.init(0xff40, 0xff40, 1),
Range16.init(0xff70, 0xff70, 1),
Range16.init(0xff9e, 0xff9f, 1),
Range16.init(0xffe3, 0xffe3, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x102e0, 0x102e0, 1),
Range32.init(0x10ae5, 0x10ae6, 1),
Range32.init(0x110b9, 0x110ba, 1),
Range32.init(0x11133, 0x11134, 1),
Range32.init(0x11173, 0x11173, 1),
Range32.init(0x111c0, 0x111c0, 1),
Range32.init(0x111ca, 0x111cc, 1),
Range32.init(0x11235, 0x11236, 1),
Range32.init(0x112e9, 0x112ea, 1),
Range32.init(0x1133c, 0x1133c, 1),
Range32.init(0x1134d, 0x1134d, 1),
Range32.init(0x11366, 0x1136c, 1),
Range32.init(0x11370, 0x11374, 1),
Range32.init(0x11442, 0x11442, 1),
Range32.init(0x11446, 0x11446, 1),
Range32.init(0x114c2, 0x114c3, 1),
Range32.init(0x115bf, 0x115c0, 1),
Range32.init(0x1163f, 0x1163f, 1),
Range32.init(0x116b6, 0x116b7, 1),
Range32.init(0x1172b, 0x1172b, 1),
Range32.init(0x11a34, 0x11a34, 1),
Range32.init(0x11a47, 0x11a47, 1),
Range32.init(0x11a99, 0x11a99, 1),
Range32.init(0x11c3f, 0x11c3f, 1),
Range32.init(0x11d42, 0x11d42, 1),
Range32.init(0x11d44, 0x11d45, 1),
Range32.init(0x16af0, 0x16af4, 1),
Range32.init(0x16f8f, 0x16f9f, 1),
Range32.init(0x1d167, 0x1d169, 1),
Range32.init(0x1d16d, 0x1d172, 1),
Range32.init(0x1d17b, 0x1d182, 1),
Range32.init(0x1d185, 0x1d18b, 1),
Range32.init(0x1d1aa, 0x1d1ad, 1),
Range32.init(0x1e8d0, 0x1e8d6, 1),
Range32.init(0x1e944, 0x1e946, 1),
Range32.init(0x1e948, 0x1e94a, 1),
};
break :init r[0..];
},
.latin_offset = 6,
};
const _Extender = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00b7, 0x00b7, 1),
Range16.init(0x02d0, 0x02d1, 1),
Range16.init(0x0640, 0x0640, 1),
Range16.init(0x07fa, 0x07fa, 1),
Range16.init(0x0e46, 0x0e46, 1),
Range16.init(0x0ec6, 0x0ec6, 1),
Range16.init(0x180a, 0x180a, 1),
Range16.init(0x1843, 0x1843, 1),
Range16.init(0x1aa7, 0x1aa7, 1),
Range16.init(0x1c36, 0x1c36, 1),
Range16.init(0x1c7b, 0x1c7b, 1),
Range16.init(0x3005, 0x3005, 1),
Range16.init(0x3031, 0x3035, 1),
Range16.init(0x309d, 0x309e, 1),
Range16.init(0x30fc, 0x30fe, 1),
Range16.init(0xa015, 0xa015, 1),
Range16.init(0xa60c, 0xa60c, 1),
Range16.init(0xa9cf, 0xa9cf, 1),
Range16.init(0xa9e6, 0xa9e6, 1),
Range16.init(0xaa70, 0xaa70, 1),
Range16.init(0xaadd, 0xaadd, 1),
Range16.init(0xaaf3, 0xaaf4, 1),
Range16.init(0xff70, 0xff70, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1135d, 0x1135d, 1),
Range32.init(0x115c6, 0x115c8, 1),
Range32.init(0x11a98, 0x11a98, 1),
Range32.init(0x16b42, 0x16b43, 1),
Range32.init(0x16fe0, 0x16fe1, 1),
Range32.init(0x1e944, 0x1e946, 1),
};
break :init r[0..];
},
.latin_offset = 1,
};
const _Hex_Digit = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0030, 0x0039, 1),
Range16.init(0x0041, 0x0046, 1),
Range16.init(0x0061, 0x0066, 1),
Range16.init(0xff10, 0xff19, 1),
Range16.init(0xff21, 0xff26, 1),
Range16.init(0xff41, 0xff46, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 3,
};
const _Hyphen = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x002d, 0x002d, 1),
Range16.init(0x00ad, 0x00ad, 1),
Range16.init(0x058a, 0x058a, 1),
Range16.init(0x1806, 0x1806, 1),
Range16.init(0x2010, 0x2011, 1),
Range16.init(0x2e17, 0x2e17, 1),
Range16.init(0x30fb, 0x30fb, 1),
Range16.init(0xfe63, 0xfe63, 1),
Range16.init(0xff0d, 0xff0d, 1),
Range16.init(0xff65, 0xff65, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 2,
};
const _IDS_Binary_Operator = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2ff0, 0x2ff1, 1),
Range16.init(0x2ff4, 0x2ffb, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _IDS_Trinary_Operator = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x2ff2, 0x2ff3, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Ideographic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x3006, 0x3007, 1),
Range16.init(0x3021, 0x3029, 1),
Range16.init(0x3038, 0x303a, 1),
Range16.init(0x3400, 0x4db5, 1),
Range16.init(0x4e00, 0x9fea, 1),
Range16.init(0xf900, 0xfa6d, 1),
Range16.init(0xfa70, 0xfad9, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x17000, 0x187ec, 1),
Range32.init(0x18800, 0x18af2, 1),
Range32.init(0x1b170, 0x1b2fb, 1),
Range32.init(0x20000, 0x2a6d6, 1),
Range32.init(0x2a700, 0x2b734, 1),
Range32.init(0x2b740, 0x2b81d, 1),
Range32.init(0x2b820, 0x2cea1, 1),
Range32.init(0x2ceb0, 0x2ebe0, 1),
Range32.init(0x2f800, 0x2fa1d, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Join_Control = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x200c, 0x200d, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Logical_Order_Exception = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0e40, 0x0e44, 1),
Range16.init(0x0ec0, 0x0ec4, 1),
Range16.init(0x19b5, 0x19b7, 1),
Range16.init(0x19ba, 0x19ba, 1),
Range16.init(0xaab5, 0xaab6, 1),
Range16.init(0xaab9, 0xaab9, 1),
Range16.init(0xaabb, 0xaabc, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Noncharacter_Code_Point = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0xfdd0, 0xfdef, 1),
Range16.init(0xfffe, 0xffff, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1fffe, 0x1ffff, 1),
Range32.init(0x2fffe, 0x2ffff, 1),
Range32.init(0x3fffe, 0x3ffff, 1),
Range32.init(0x4fffe, 0x4ffff, 1),
Range32.init(0x5fffe, 0x5ffff, 1),
Range32.init(0x6fffe, 0x6ffff, 1),
Range32.init(0x7fffe, 0x7ffff, 1),
Range32.init(0x8fffe, 0x8ffff, 1),
Range32.init(0x9fffe, 0x9ffff, 1),
Range32.init(0xafffe, 0xaffff, 1),
Range32.init(0xbfffe, 0xbffff, 1),
Range32.init(0xcfffe, 0xcffff, 1),
Range32.init(0xdfffe, 0xdffff, 1),
Range32.init(0xefffe, 0xeffff, 1),
Range32.init(0xffffe, 0xfffff, 1),
Range32.init(0x10fffe, 0x10ffff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Other_Alphabetic = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0345, 0x0345, 1),
Range16.init(0x05b0, 0x05bd, 1),
Range16.init(0x05bf, 0x05bf, 1),
Range16.init(0x05c1, 0x05c2, 1),
Range16.init(0x05c4, 0x05c5, 1),
Range16.init(0x05c7, 0x05c7, 1),
Range16.init(0x0610, 0x061a, 1),
Range16.init(0x064b, 0x0657, 1),
Range16.init(0x0659, 0x065f, 1),
Range16.init(0x0670, 0x0670, 1),
Range16.init(0x06d6, 0x06dc, 1),
Range16.init(0x06e1, 0x06e4, 1),
Range16.init(0x06e7, 0x06e8, 1),
Range16.init(0x06ed, 0x06ed, 1),
Range16.init(0x0711, 0x0711, 1),
Range16.init(0x0730, 0x073f, 1),
Range16.init(0x07a6, 0x07b0, 1),
Range16.init(0x0816, 0x0817, 1),
Range16.init(0x081b, 0x0823, 1),
Range16.init(0x0825, 0x0827, 1),
Range16.init(0x0829, 0x082c, 1),
Range16.init(0x08d4, 0x08df, 1),
Range16.init(0x08e3, 0x08e9, 1),
Range16.init(0x08f0, 0x0903, 1),
Range16.init(0x093a, 0x093b, 1),
Range16.init(0x093e, 0x094c, 1),
Range16.init(0x094e, 0x094f, 1),
Range16.init(0x0955, 0x0957, 1),
Range16.init(0x0962, 0x0963, 1),
Range16.init(0x0981, 0x0983, 1),
Range16.init(0x09be, 0x09c4, 1),
Range16.init(0x09c7, 0x09c8, 1),
Range16.init(0x09cb, 0x09cc, 1),
Range16.init(0x09d7, 0x09d7, 1),
Range16.init(0x09e2, 0x09e3, 1),
Range16.init(0x0a01, 0x0a03, 1),
Range16.init(0x0a3e, 0x0a42, 1),
Range16.init(0x0a47, 0x0a48, 1),
Range16.init(0x0a4b, 0x0a4c, 1),
Range16.init(0x0a51, 0x0a51, 1),
Range16.init(0x0a70, 0x0a71, 1),
Range16.init(0x0a75, 0x0a75, 1),
Range16.init(0x0a81, 0x0a83, 1),
Range16.init(0x0abe, 0x0ac5, 1),
Range16.init(0x0ac7, 0x0ac9, 1),
Range16.init(0x0acb, 0x0acc, 1),
Range16.init(0x0ae2, 0x0ae3, 1),
Range16.init(0x0afa, 0x0afc, 1),
Range16.init(0x0b01, 0x0b03, 1),
Range16.init(0x0b3e, 0x0b44, 1),
Range16.init(0x0b47, 0x0b48, 1),
Range16.init(0x0b4b, 0x0b4c, 1),
Range16.init(0x0b56, 0x0b57, 1),
Range16.init(0x0b62, 0x0b63, 1),
Range16.init(0x0b82, 0x0b82, 1),
Range16.init(0x0bbe, 0x0bc2, 1),
Range16.init(0x0bc6, 0x0bc8, 1),
Range16.init(0x0bca, 0x0bcc, 1),
Range16.init(0x0bd7, 0x0bd7, 1),
Range16.init(0x0c00, 0x0c03, 1),
Range16.init(0x0c3e, 0x0c44, 1),
Range16.init(0x0c46, 0x0c48, 1),
Range16.init(0x0c4a, 0x0c4c, 1),
Range16.init(0x0c55, 0x0c56, 1),
Range16.init(0x0c62, 0x0c63, 1),
Range16.init(0x0c81, 0x0c83, 1),
Range16.init(0x0cbe, 0x0cc4, 1),
Range16.init(0x0cc6, 0x0cc8, 1),
Range16.init(0x0cca, 0x0ccc, 1),
Range16.init(0x0cd5, 0x0cd6, 1),
Range16.init(0x0ce2, 0x0ce3, 1),
Range16.init(0x0d00, 0x0d03, 1),
Range16.init(0x0d3e, 0x0d44, 1),
Range16.init(0x0d46, 0x0d48, 1),
Range16.init(0x0d4a, 0x0d4c, 1),
Range16.init(0x0d57, 0x0d57, 1),
Range16.init(0x0d62, 0x0d63, 1),
Range16.init(0x0d82, 0x0d83, 1),
Range16.init(0x0dcf, 0x0dd4, 1),
Range16.init(0x0dd6, 0x0dd6, 1),
Range16.init(0x0dd8, 0x0ddf, 1),
Range16.init(0x0df2, 0x0df3, 1),
Range16.init(0x0e31, 0x0e31, 1),
Range16.init(0x0e34, 0x0e3a, 1),
Range16.init(0x0e4d, 0x0e4d, 1),
Range16.init(0x0eb1, 0x0eb1, 1),
Range16.init(0x0eb4, 0x0eb9, 1),
Range16.init(0x0ebb, 0x0ebc, 1),
Range16.init(0x0ecd, 0x0ecd, 1),
Range16.init(0x0f71, 0x0f81, 1),
Range16.init(0x0f8d, 0x0f97, 1),
Range16.init(0x0f99, 0x0fbc, 1),
Range16.init(0x102b, 0x1036, 1),
Range16.init(0x1038, 0x1038, 1),
Range16.init(0x103b, 0x103e, 1),
Range16.init(0x1056, 0x1059, 1),
Range16.init(0x105e, 0x1060, 1),
Range16.init(0x1062, 0x1062, 1),
Range16.init(0x1067, 0x1068, 1),
Range16.init(0x1071, 0x1074, 1),
Range16.init(0x1082, 0x1086, 1),
Range16.init(0x109c, 0x109d, 1),
Range16.init(0x135f, 0x135f, 1),
Range16.init(0x1712, 0x1713, 1),
Range16.init(0x1732, 0x1733, 1),
Range16.init(0x1752, 0x1753, 1),
Range16.init(0x1772, 0x1773, 1),
Range16.init(0x17b6, 0x17c8, 1),
Range16.init(0x1885, 0x1886, 1),
Range16.init(0x18a9, 0x18a9, 1),
Range16.init(0x1920, 0x192b, 1),
Range16.init(0x1930, 0x1938, 1),
Range16.init(0x1a17, 0x1a1b, 1),
Range16.init(0x1a55, 0x1a5e, 1),
Range16.init(0x1a61, 0x1a74, 1),
Range16.init(0x1b00, 0x1b04, 1),
Range16.init(0x1b35, 0x1b43, 1),
Range16.init(0x1b80, 0x1b82, 1),
Range16.init(0x1ba1, 0x1ba9, 1),
Range16.init(0x1bac, 0x1bad, 1),
Range16.init(0x1be7, 0x1bf1, 1),
Range16.init(0x1c24, 0x1c35, 1),
Range16.init(0x1cf2, 0x1cf3, 1),
Range16.init(0x1de7, 0x1df4, 1),
Range16.init(0x24b6, 0x24e9, 1),
Range16.init(0x2de0, 0x2dff, 1),
Range16.init(0xa674, 0xa67b, 1),
Range16.init(0xa69e, 0xa69f, 1),
Range16.init(0xa823, 0xa827, 1),
Range16.init(0xa880, 0xa881, 1),
Range16.init(0xa8b4, 0xa8c3, 1),
Range16.init(0xa8c5, 0xa8c5, 1),
Range16.init(0xa926, 0xa92a, 1),
Range16.init(0xa947, 0xa952, 1),
Range16.init(0xa980, 0xa983, 1),
Range16.init(0xa9b4, 0xa9bf, 1),
Range16.init(0xaa29, 0xaa36, 1),
Range16.init(0xaa43, 0xaa43, 1),
Range16.init(0xaa4c, 0xaa4d, 1),
Range16.init(0xaab0, 0xaab0, 1),
Range16.init(0xaab2, 0xaab4, 1),
Range16.init(0xaab7, 0xaab8, 1),
Range16.init(0xaabe, 0xaabe, 1),
Range16.init(0xaaeb, 0xaaef, 1),
Range16.init(0xaaf5, 0xaaf5, 1),
Range16.init(0xabe3, 0xabea, 1),
Range16.init(0xfb1e, 0xfb1e, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10376, 0x1037a, 1),
Range32.init(0x10a01, 0x10a03, 1),
Range32.init(0x10a05, 0x10a06, 1),
Range32.init(0x10a0c, 0x10a0f, 1),
Range32.init(0x11000, 0x11002, 1),
Range32.init(0x11038, 0x11045, 1),
Range32.init(0x11082, 0x11082, 1),
Range32.init(0x110b0, 0x110b8, 1),
Range32.init(0x11100, 0x11102, 1),
Range32.init(0x11127, 0x11132, 1),
Range32.init(0x11180, 0x11182, 1),
Range32.init(0x111b3, 0x111bf, 1),
Range32.init(0x1122c, 0x11234, 1),
Range32.init(0x11237, 0x11237, 1),
Range32.init(0x1123e, 0x1123e, 1),
Range32.init(0x112df, 0x112e8, 1),
Range32.init(0x11300, 0x11303, 1),
Range32.init(0x1133e, 0x11344, 1),
Range32.init(0x11347, 0x11348, 1),
Range32.init(0x1134b, 0x1134c, 1),
Range32.init(0x11357, 0x11357, 1),
Range32.init(0x11362, 0x11363, 1),
Range32.init(0x11435, 0x11441, 1),
Range32.init(0x11443, 0x11445, 1),
Range32.init(0x114b0, 0x114c1, 1),
Range32.init(0x115af, 0x115b5, 1),
Range32.init(0x115b8, 0x115be, 1),
Range32.init(0x115dc, 0x115dd, 1),
Range32.init(0x11630, 0x1163e, 1),
Range32.init(0x11640, 0x11640, 1),
Range32.init(0x116ab, 0x116b5, 1),
Range32.init(0x1171d, 0x1172a, 1),
Range32.init(0x11a01, 0x11a0a, 1),
Range32.init(0x11a35, 0x11a39, 1),
Range32.init(0x11a3b, 0x11a3e, 1),
Range32.init(0x11a51, 0x11a5b, 1),
Range32.init(0x11a8a, 0x11a97, 1),
Range32.init(0x11c2f, 0x11c36, 1),
Range32.init(0x11c38, 0x11c3e, 1),
Range32.init(0x11c92, 0x11ca7, 1),
Range32.init(0x11ca9, 0x11cb6, 1),
Range32.init(0x11d31, 0x11d36, 1),
Range32.init(0x11d3a, 0x11d3a, 1),
Range32.init(0x11d3c, 0x11d3d, 1),
Range32.init(0x11d3f, 0x11d41, 1),
Range32.init(0x11d43, 0x11d43, 1),
Range32.init(0x11d47, 0x11d47, 1),
Range32.init(0x16b30, 0x16b36, 1),
Range32.init(0x16f51, 0x16f7e, 1),
Range32.init(0x1bc9e, 0x1bc9e, 1),
Range32.init(0x1e000, 0x1e006, 1),
Range32.init(0x1e008, 0x1e018, 1),
Range32.init(0x1e01b, 0x1e021, 1),
Range32.init(0x1e023, 0x1e024, 1),
Range32.init(0x1e026, 0x1e02a, 1),
Range32.init(0x1e947, 0x1e947, 1),
Range32.init(0x1f130, 0x1f149, 1),
Range32.init(0x1f150, 0x1f169, 1),
Range32.init(0x1f170, 0x1f189, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Other_Default_Ignorable_Code_Point = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x034f, 0x034f, 1),
Range16.init(0x115f, 0x1160, 1),
Range16.init(0x17b4, 0x17b5, 1),
Range16.init(0x2065, 0x2065, 1),
Range16.init(0x3164, 0x3164, 1),
Range16.init(0xffa0, 0xffa0, 1),
Range16.init(0xfff0, 0xfff8, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0xe0000, 0xe0000, 1),
Range32.init(0xe0002, 0xe001f, 1),
Range32.init(0xe0080, 0xe00ff, 1),
Range32.init(0xe01f0, 0xe0fff, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Other_Grapheme_Extend = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x09be, 0x09be, 1),
Range16.init(0x09d7, 0x09d7, 1),
Range16.init(0x0b3e, 0x0b3e, 1),
Range16.init(0x0b57, 0x0b57, 1),
Range16.init(0x0bbe, 0x0bbe, 1),
Range16.init(0x0bd7, 0x0bd7, 1),
Range16.init(0x0cc2, 0x0cc2, 1),
Range16.init(0x0cd5, 0x0cd6, 1),
Range16.init(0x0d3e, 0x0d3e, 1),
Range16.init(0x0d57, 0x0d57, 1),
Range16.init(0x0dcf, 0x0dcf, 1),
Range16.init(0x0ddf, 0x0ddf, 1),
Range16.init(0x200c, 0x200c, 1),
Range16.init(0x302e, 0x302f, 1),
Range16.init(0xff9e, 0xff9f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1133e, 0x1133e, 1),
Range32.init(0x11357, 0x11357, 1),
Range32.init(0x114b0, 0x114b0, 1),
Range32.init(0x114bd, 0x114bd, 1),
Range32.init(0x115af, 0x115af, 1),
Range32.init(0x1d165, 0x1d165, 1),
Range32.init(0x1d16e, 0x1d172, 1),
Range32.init(0xe0020, 0xe007f, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Other_ID_Continue = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00b7, 0x00b7, 1),
Range16.init(0x0387, 0x0387, 1),
Range16.init(0x1369, 0x1371, 1),
Range16.init(0x19da, 0x19da, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 1,
};
const _Other_ID_Start = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x1885, 0x1886, 1),
Range16.init(0x2118, 0x2118, 1),
Range16.init(0x212e, 0x212e, 1),
Range16.init(0x309b, 0x309c, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Other_Lowercase = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x00aa, 0x00aa, 1),
Range16.init(0x00ba, 0x00ba, 1),
Range16.init(0x02b0, 0x02b8, 1),
Range16.init(0x02c0, 0x02c1, 1),
Range16.init(0x02e0, 0x02e4, 1),
Range16.init(0x0345, 0x0345, 1),
Range16.init(0x037a, 0x037a, 1),
Range16.init(0x1d2c, 0x1d6a, 1),
Range16.init(0x1d78, 0x1d78, 1),
Range16.init(0x1d9b, 0x1dbf, 1),
Range16.init(0x2071, 0x2071, 1),
Range16.init(0x207f, 0x207f, 1),
Range16.init(0x2090, 0x209c, 1),
Range16.init(0x2170, 0x217f, 1),
Range16.init(0x24d0, 0x24e9, 1),
Range16.init(0x2c7c, 0x2c7d, 1),
Range16.init(0xa69c, 0xa69d, 1),
Range16.init(0xa770, 0xa770, 1),
Range16.init(0xa7f8, 0xa7f9, 1),
Range16.init(0xab5c, 0xab5f, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 2,
};
const _Other_Math = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x005e, 0x005e, 1),
Range16.init(0x03d0, 0x03d2, 1),
Range16.init(0x03d5, 0x03d5, 1),
Range16.init(0x03f0, 0x03f1, 1),
Range16.init(0x03f4, 0x03f5, 1),
Range16.init(0x2016, 0x2016, 1),
Range16.init(0x2032, 0x2034, 1),
Range16.init(0x2040, 0x2040, 1),
Range16.init(0x2061, 0x2064, 1),
Range16.init(0x207d, 0x207e, 1),
Range16.init(0x208d, 0x208e, 1),
Range16.init(0x20d0, 0x20dc, 1),
Range16.init(0x20e1, 0x20e1, 1),
Range16.init(0x20e5, 0x20e6, 1),
Range16.init(0x20eb, 0x20ef, 1),
Range16.init(0x2102, 0x2102, 1),
Range16.init(0x2107, 0x2107, 1),
Range16.init(0x210a, 0x2113, 1),
Range16.init(0x2115, 0x2115, 1),
Range16.init(0x2119, 0x211d, 1),
Range16.init(0x2124, 0x2124, 1),
Range16.init(0x2128, 0x2129, 1),
Range16.init(0x212c, 0x212d, 1),
Range16.init(0x212f, 0x2131, 1),
Range16.init(0x2133, 0x2138, 1),
Range16.init(0x213c, 0x213f, 1),
Range16.init(0x2145, 0x2149, 1),
Range16.init(0x2195, 0x2199, 1),
Range16.init(0x219c, 0x219f, 1),
Range16.init(0x21a1, 0x21a2, 1),
Range16.init(0x21a4, 0x21a5, 1),
Range16.init(0x21a7, 0x21a7, 1),
Range16.init(0x21a9, 0x21ad, 1),
Range16.init(0x21b0, 0x21b1, 1),
Range16.init(0x21b6, 0x21b7, 1),
Range16.init(0x21bc, 0x21cd, 1),
Range16.init(0x21d0, 0x21d1, 1),
Range16.init(0x21d3, 0x21d3, 1),
Range16.init(0x21d5, 0x21db, 1),
Range16.init(0x21dd, 0x21dd, 1),
Range16.init(0x21e4, 0x21e5, 1),
Range16.init(0x2308, 0x230b, 1),
Range16.init(0x23b4, 0x23b5, 1),
Range16.init(0x23b7, 0x23b7, 1),
Range16.init(0x23d0, 0x23d0, 1),
Range16.init(0x23e2, 0x23e2, 1),
Range16.init(0x25a0, 0x25a1, 1),
Range16.init(0x25ae, 0x25b6, 1),
Range16.init(0x25bc, 0x25c0, 1),
Range16.init(0x25c6, 0x25c7, 1),
Range16.init(0x25ca, 0x25cb, 1),
Range16.init(0x25cf, 0x25d3, 1),
Range16.init(0x25e2, 0x25e2, 1),
Range16.init(0x25e4, 0x25e4, 1),
Range16.init(0x25e7, 0x25ec, 1),
Range16.init(0x2605, 0x2606, 1),
Range16.init(0x2640, 0x2640, 1),
Range16.init(0x2642, 0x2642, 1),
Range16.init(0x2660, 0x2663, 1),
Range16.init(0x266d, 0x266e, 1),
Range16.init(0x27c5, 0x27c6, 1),
Range16.init(0x27e6, 0x27ef, 1),
Range16.init(0x2983, 0x2998, 1),
Range16.init(0x29d8, 0x29db, 1),
Range16.init(0x29fc, 0x29fd, 1),
Range16.init(0xfe61, 0xfe61, 1),
Range16.init(0xfe63, 0xfe63, 1),
Range16.init(0xfe68, 0xfe68, 1),
Range16.init(0xff3c, 0xff3c, 1),
Range16.init(0xff3e, 0xff3e, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1d400, 0x1d454, 1),
Range32.init(0x1d456, 0x1d49c, 1),
Range32.init(0x1d49e, 0x1d49f, 1),
Range32.init(0x1d4a2, 0x1d4a2, 1),
Range32.init(0x1d4a5, 0x1d4a6, 1),
Range32.init(0x1d4a9, 0x1d4ac, 1),
Range32.init(0x1d4ae, 0x1d4b9, 1),
Range32.init(0x1d4bb, 0x1d4bb, 1),
Range32.init(0x1d4bd, 0x1d4c3, 1),
Range32.init(0x1d4c5, 0x1d505, 1),
Range32.init(0x1d507, 0x1d50a, 1),
Range32.init(0x1d50d, 0x1d514, 1),
Range32.init(0x1d516, 0x1d51c, 1),
Range32.init(0x1d51e, 0x1d539, 1),
Range32.init(0x1d53b, 0x1d53e, 1),
Range32.init(0x1d540, 0x1d544, 1),
Range32.init(0x1d546, 0x1d546, 1),
Range32.init(0x1d54a, 0x1d550, 1),
Range32.init(0x1d552, 0x1d6a5, 1),
Range32.init(0x1d6a8, 0x1d6c0, 1),
Range32.init(0x1d6c2, 0x1d6da, 1),
Range32.init(0x1d6dc, 0x1d6fa, 1),
Range32.init(0x1d6fc, 0x1d714, 1),
Range32.init(0x1d716, 0x1d734, 1),
Range32.init(0x1d736, 0x1d74e, 1),
Range32.init(0x1d750, 0x1d76e, 1),
Range32.init(0x1d770, 0x1d788, 1),
Range32.init(0x1d78a, 0x1d7a8, 1),
Range32.init(0x1d7aa, 0x1d7c2, 1),
Range32.init(0x1d7c4, 0x1d7cb, 1),
Range32.init(0x1d7ce, 0x1d7ff, 1),
Range32.init(0x1ee00, 0x1ee03, 1),
Range32.init(0x1ee05, 0x1ee1f, 1),
Range32.init(0x1ee21, 0x1ee22, 1),
Range32.init(0x1ee24, 0x1ee24, 1),
Range32.init(0x1ee27, 0x1ee27, 1),
Range32.init(0x1ee29, 0x1ee32, 1),
Range32.init(0x1ee34, 0x1ee37, 1),
Range32.init(0x1ee39, 0x1ee39, 1),
Range32.init(0x1ee3b, 0x1ee3b, 1),
Range32.init(0x1ee42, 0x1ee42, 1),
Range32.init(0x1ee47, 0x1ee47, 1),
Range32.init(0x1ee49, 0x1ee49, 1),
Range32.init(0x1ee4b, 0x1ee4b, 1),
Range32.init(0x1ee4d, 0x1ee4f, 1),
Range32.init(0x1ee51, 0x1ee52, 1),
Range32.init(0x1ee54, 0x1ee54, 1),
Range32.init(0x1ee57, 0x1ee57, 1),
Range32.init(0x1ee59, 0x1ee59, 1),
Range32.init(0x1ee5b, 0x1ee5b, 1),
Range32.init(0x1ee5d, 0x1ee5d, 1),
Range32.init(0x1ee5f, 0x1ee5f, 1),
Range32.init(0x1ee61, 0x1ee62, 1),
Range32.init(0x1ee64, 0x1ee64, 1),
Range32.init(0x1ee67, 0x1ee6a, 1),
Range32.init(0x1ee6c, 0x1ee72, 1),
Range32.init(0x1ee74, 0x1ee77, 1),
Range32.init(0x1ee79, 0x1ee7c, 1),
Range32.init(0x1ee7e, 0x1ee7e, 1),
Range32.init(0x1ee80, 0x1ee89, 1),
Range32.init(0x1ee8b, 0x1ee9b, 1),
Range32.init(0x1eea1, 0x1eea3, 1),
Range32.init(0x1eea5, 0x1eea9, 1),
Range32.init(0x1eeab, 0x1eebb, 1),
};
break :init r[0..];
},
.latin_offset = 1,
};
const _Other_Uppercase = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2160, 0x216f, 1),
Range16.init(0x24b6, 0x24cf, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1f130, 0x1f149, 1),
Range32.init(0x1f150, 0x1f169, 1),
Range32.init(0x1f170, 0x1f189, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Pattern_Syntax = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0021, 0x002f, 1),
Range16.init(0x003a, 0x0040, 1),
Range16.init(0x005b, 0x005e, 1),
Range16.init(0x0060, 0x0060, 1),
Range16.init(0x007b, 0x007e, 1),
Range16.init(0x00a1, 0x00a7, 1),
Range16.init(0x00a9, 0x00a9, 1),
Range16.init(0x00ab, 0x00ac, 1),
Range16.init(0x00ae, 0x00ae, 1),
Range16.init(0x00b0, 0x00b1, 1),
Range16.init(0x00b6, 0x00b6, 1),
Range16.init(0x00bb, 0x00bb, 1),
Range16.init(0x00bf, 0x00bf, 1),
Range16.init(0x00d7, 0x00d7, 1),
Range16.init(0x00f7, 0x00f7, 1),
Range16.init(0x2010, 0x2027, 1),
Range16.init(0x2030, 0x203e, 1),
Range16.init(0x2041, 0x2053, 1),
Range16.init(0x2055, 0x205e, 1),
Range16.init(0x2190, 0x245f, 1),
Range16.init(0x2500, 0x2775, 1),
Range16.init(0x2794, 0x2bff, 1),
Range16.init(0x2e00, 0x2e7f, 1),
Range16.init(0x3001, 0x3003, 1),
Range16.init(0x3008, 0x3020, 1),
Range16.init(0x3030, 0x3030, 1),
Range16.init(0xfd3e, 0xfd3f, 1),
Range16.init(0xfe45, 0xfe46, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 15,
};
const _Pattern_White_Space = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0009, 0x000d, 1),
Range16.init(0x0020, 0x0020, 1),
Range16.init(0x0085, 0x0085, 1),
Range16.init(0x200e, 0x200f, 1),
Range16.init(0x2028, 0x2029, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 3,
};
const _Prepended_Concatenation_Mark = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0600, 0x0605, 1),
Range16.init(0x06dd, 0x06dd, 1),
Range16.init(0x070f, 0x070f, 1),
Range16.init(0x08e2, 0x08e2, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0x110bd, 0x110bd, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Quotation_Mark = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0022, 0x0022, 1),
Range16.init(0x0027, 0x0027, 1),
Range16.init(0x00ab, 0x00ab, 1),
Range16.init(0x00bb, 0x00bb, 1),
Range16.init(0x2018, 0x201f, 1),
Range16.init(0x2039, 0x203a, 1),
Range16.init(0x2e42, 0x2e42, 1),
Range16.init(0x300c, 0x300f, 1),
Range16.init(0x301d, 0x301f, 1),
Range16.init(0xfe41, 0xfe44, 1),
Range16.init(0xff02, 0xff02, 1),
Range16.init(0xff07, 0xff07, 1),
Range16.init(0xff62, 0xff63, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 4,
};
const _Radical = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x2e80, 0x2e99, 1),
Range16.init(0x2e9b, 0x2ef3, 1),
Range16.init(0x2f00, 0x2fd5, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const _Regional_Indicator = RangeTable{
.r16 = [_]Range16{},
.r32 = init: {
var r = [_]Range32{Range32.init(0x1f1e6, 0x1f1ff, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _Sentence_Terminal = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0021, 0x0021, 1),
Range16.init(0x002e, 0x002e, 1),
Range16.init(0x003f, 0x003f, 1),
Range16.init(0x0589, 0x0589, 1),
Range16.init(0x061f, 0x061f, 1),
Range16.init(0x06d4, 0x06d4, 1),
Range16.init(0x0700, 0x0702, 1),
Range16.init(0x07f9, 0x07f9, 1),
Range16.init(0x0964, 0x0965, 1),
Range16.init(0x104a, 0x104b, 1),
Range16.init(0x1362, 0x1362, 1),
Range16.init(0x1367, 0x1368, 1),
Range16.init(0x166e, 0x166e, 1),
Range16.init(0x1735, 0x1736, 1),
Range16.init(0x1803, 0x1803, 1),
Range16.init(0x1809, 0x1809, 1),
Range16.init(0x1944, 0x1945, 1),
Range16.init(0x1aa8, 0x1aab, 1),
Range16.init(0x1b5a, 0x1b5b, 1),
Range16.init(0x1b5e, 0x1b5f, 1),
Range16.init(0x1c3b, 0x1c3c, 1),
Range16.init(0x1c7e, 0x1c7f, 1),
Range16.init(0x203c, 0x203d, 1),
Range16.init(0x2047, 0x2049, 1),
Range16.init(0x2e2e, 0x2e2e, 1),
Range16.init(0x2e3c, 0x2e3c, 1),
Range16.init(0x3002, 0x3002, 1),
Range16.init(0xa4ff, 0xa4ff, 1),
Range16.init(0xa60e, 0xa60f, 1),
Range16.init(0xa6f3, 0xa6f3, 1),
Range16.init(0xa6f7, 0xa6f7, 1),
Range16.init(0xa876, 0xa877, 1),
Range16.init(0xa8ce, 0xa8cf, 1),
Range16.init(0xa92f, 0xa92f, 1),
Range16.init(0xa9c8, 0xa9c9, 1),
Range16.init(0xaa5d, 0xaa5f, 1),
Range16.init(0xaaf0, 0xaaf1, 1),
Range16.init(0xabeb, 0xabeb, 1),
Range16.init(0xfe52, 0xfe52, 1),
Range16.init(0xfe56, 0xfe57, 1),
Range16.init(0xff01, 0xff01, 1),
Range16.init(0xff0e, 0xff0e, 1),
Range16.init(0xff1f, 0xff1f, 1),
Range16.init(0xff61, 0xff61, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10a56, 0x10a57, 1),
Range32.init(0x11047, 0x11048, 1),
Range32.init(0x110be, 0x110c1, 1),
Range32.init(0x11141, 0x11143, 1),
Range32.init(0x111c5, 0x111c6, 1),
Range32.init(0x111cd, 0x111cd, 1),
Range32.init(0x111de, 0x111df, 1),
Range32.init(0x11238, 0x11239, 1),
Range32.init(0x1123b, 0x1123c, 1),
Range32.init(0x112a9, 0x112a9, 1),
Range32.init(0x1144b, 0x1144c, 1),
Range32.init(0x115c2, 0x115c3, 1),
Range32.init(0x115c9, 0x115d7, 1),
Range32.init(0x11641, 0x11642, 1),
Range32.init(0x1173c, 0x1173e, 1),
Range32.init(0x11a42, 0x11a43, 1),
Range32.init(0x11a9b, 0x11a9c, 1),
Range32.init(0x11c41, 0x11c42, 1),
Range32.init(0x16a6e, 0x16a6f, 1),
Range32.init(0x16af5, 0x16af5, 1),
Range32.init(0x16b37, 0x16b38, 1),
Range32.init(0x16b44, 0x16b44, 1),
Range32.init(0x1bc9f, 0x1bc9f, 1),
Range32.init(0x1da88, 0x1da88, 1),
};
break :init r[0..];
},
.latin_offset = 3,
};
const _Soft_Dotted = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0069, 0x006a, 1),
Range16.init(0x012f, 0x012f, 1),
Range16.init(0x0249, 0x0249, 1),
Range16.init(0x0268, 0x0268, 1),
Range16.init(0x029d, 0x029d, 1),
Range16.init(0x02b2, 0x02b2, 1),
Range16.init(0x03f3, 0x03f3, 1),
Range16.init(0x0456, 0x0456, 1),
Range16.init(0x0458, 0x0458, 1),
Range16.init(0x1d62, 0x1d62, 1),
Range16.init(0x1d96, 0x1d96, 1),
Range16.init(0x1da4, 0x1da4, 1),
Range16.init(0x1da8, 0x1da8, 1),
Range16.init(0x1e2d, 0x1e2d, 1),
Range16.init(0x1ecb, 0x1ecb, 1),
Range16.init(0x2071, 0x2071, 1),
Range16.init(0x2148, 0x2149, 1),
Range16.init(0x2c7c, 0x2c7c, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1d422, 0x1d423, 1),
Range32.init(0x1d456, 0x1d457, 1),
Range32.init(0x1d48a, 0x1d48b, 1),
Range32.init(0x1d4be, 0x1d4bf, 1),
Range32.init(0x1d4f2, 0x1d4f3, 1),
Range32.init(0x1d526, 0x1d527, 1),
Range32.init(0x1d55a, 0x1d55b, 1),
Range32.init(0x1d58e, 0x1d58f, 1),
Range32.init(0x1d5c2, 0x1d5c3, 1),
Range32.init(0x1d5f6, 0x1d5f7, 1),
Range32.init(0x1d62a, 0x1d62b, 1),
Range32.init(0x1d65e, 0x1d65f, 1),
Range32.init(0x1d692, 0x1d693, 1),
};
break :init r[0..];
},
.latin_offset = 1,
};
const _Terminal_Punctuation = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0021, 0x0021, 1),
Range16.init(0x002c, 0x002c, 1),
Range16.init(0x002e, 0x002e, 1),
Range16.init(0x003a, 0x003b, 1),
Range16.init(0x003f, 0x003f, 1),
Range16.init(0x037e, 0x037e, 1),
Range16.init(0x0387, 0x0387, 1),
Range16.init(0x0589, 0x0589, 1),
Range16.init(0x05c3, 0x05c3, 1),
Range16.init(0x060c, 0x060c, 1),
Range16.init(0x061b, 0x061b, 1),
Range16.init(0x061f, 0x061f, 1),
Range16.init(0x06d4, 0x06d4, 1),
Range16.init(0x0700, 0x070a, 1),
Range16.init(0x070c, 0x070c, 1),
Range16.init(0x07f8, 0x07f9, 1),
Range16.init(0x0830, 0x083e, 1),
Range16.init(0x085e, 0x085e, 1),
Range16.init(0x0964, 0x0965, 1),
Range16.init(0x0e5a, 0x0e5b, 1),
Range16.init(0x0f08, 0x0f08, 1),
Range16.init(0x0f0d, 0x0f12, 1),
Range16.init(0x104a, 0x104b, 1),
Range16.init(0x1361, 0x1368, 1),
Range16.init(0x166d, 0x166e, 1),
Range16.init(0x16eb, 0x16ed, 1),
Range16.init(0x1735, 0x1736, 1),
Range16.init(0x17d4, 0x17d6, 1),
Range16.init(0x17da, 0x17da, 1),
Range16.init(0x1802, 0x1805, 1),
Range16.init(0x1808, 0x1809, 1),
Range16.init(0x1944, 0x1945, 1),
Range16.init(0x1aa8, 0x1aab, 1),
Range16.init(0x1b5a, 0x1b5b, 1),
Range16.init(0x1b5d, 0x1b5f, 1),
Range16.init(0x1c3b, 0x1c3f, 1),
Range16.init(0x1c7e, 0x1c7f, 1),
Range16.init(0x203c, 0x203d, 1),
Range16.init(0x2047, 0x2049, 1),
Range16.init(0x2e2e, 0x2e2e, 1),
Range16.init(0x2e3c, 0x2e3c, 1),
Range16.init(0x2e41, 0x2e41, 1),
Range16.init(0x3001, 0x3002, 1),
Range16.init(0xa4fe, 0xa4ff, 1),
Range16.init(0xa60d, 0xa60f, 1),
Range16.init(0xa6f3, 0xa6f7, 1),
Range16.init(0xa876, 0xa877, 1),
Range16.init(0xa8ce, 0xa8cf, 1),
Range16.init(0xa92f, 0xa92f, 1),
Range16.init(0xa9c7, 0xa9c9, 1),
Range16.init(0xaa5d, 0xaa5f, 1),
Range16.init(0xaadf, 0xaadf, 1),
Range16.init(0xaaf0, 0xaaf1, 1),
Range16.init(0xabeb, 0xabeb, 1),
Range16.init(0xfe50, 0xfe52, 1),
Range16.init(0xfe54, 0xfe57, 1),
Range16.init(0xff01, 0xff01, 1),
Range16.init(0xff0c, 0xff0c, 1),
Range16.init(0xff0e, 0xff0e, 1),
Range16.init(0xff1a, 0xff1b, 1),
Range16.init(0xff1f, 0xff1f, 1),
Range16.init(0xff61, 0xff61, 1),
Range16.init(0xff64, 0xff64, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x1039f, 0x1039f, 1),
Range32.init(0x103d0, 0x103d0, 1),
Range32.init(0x10857, 0x10857, 1),
Range32.init(0x1091f, 0x1091f, 1),
Range32.init(0x10a56, 0x10a57, 1),
Range32.init(0x10af0, 0x10af5, 1),
Range32.init(0x10b3a, 0x10b3f, 1),
Range32.init(0x10b99, 0x10b9c, 1),
Range32.init(0x11047, 0x1104d, 1),
Range32.init(0x110be, 0x110c1, 1),
Range32.init(0x11141, 0x11143, 1),
Range32.init(0x111c5, 0x111c6, 1),
Range32.init(0x111cd, 0x111cd, 1),
Range32.init(0x111de, 0x111df, 1),
Range32.init(0x11238, 0x1123c, 1),
Range32.init(0x112a9, 0x112a9, 1),
Range32.init(0x1144b, 0x1144d, 1),
Range32.init(0x1145b, 0x1145b, 1),
Range32.init(0x115c2, 0x115c5, 1),
Range32.init(0x115c9, 0x115d7, 1),
Range32.init(0x11641, 0x11642, 1),
Range32.init(0x1173c, 0x1173e, 1),
Range32.init(0x11a42, 0x11a43, 1),
Range32.init(0x11a9b, 0x11a9c, 1),
Range32.init(0x11aa1, 0x11aa2, 1),
Range32.init(0x11c41, 0x11c43, 1),
Range32.init(0x11c71, 0x11c71, 1),
Range32.init(0x12470, 0x12474, 1),
Range32.init(0x16a6e, 0x16a6f, 1),
Range32.init(0x16af5, 0x16af5, 1),
Range32.init(0x16b37, 0x16b39, 1),
Range32.init(0x16b44, 0x16b44, 1),
Range32.init(0x1bc9f, 0x1bc9f, 1),
Range32.init(0x1da87, 0x1da8a, 1),
};
break :init r[0..];
},
.latin_offset = 5,
};
const _Unified_Ideograph = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x3400, 0x4db5, 1),
Range16.init(0x4e00, 0x9fea, 1),
Range16.init(0xfa0e, 0xfa0f, 1),
Range16.init(0xfa11, 0xfa11, 1),
Range16.init(0xfa13, 0xfa14, 1),
Range16.init(0xfa1f, 0xfa1f, 1),
Range16.init(0xfa21, 0xfa21, 1),
Range16.init(0xfa23, 0xfa24, 1),
Range16.init(0xfa27, 0xfa29, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x20000, 0x2a6d6, 1),
Range32.init(0x2a700, 0x2b734, 1),
Range32.init(0x2b740, 0x2b81d, 1),
Range32.init(0x2b820, 0x2cea1, 1),
Range32.init(0x2ceb0, 0x2ebe0, 1),
};
break :init r[0..];
},
.latin_offset = 0,
};
const _Variation_Selector = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x180b, 0x180d, 1),
Range16.init(0xfe00, 0xfe0f, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{Range32.init(0xe0100, 0xe01ef, 1)};
break :init r[0..];
},
.latin_offset = 0,
};
const _White_Space = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0009, 0x000d, 1),
Range16.init(0x0020, 0x0020, 1),
Range16.init(0x0085, 0x0085, 1),
Range16.init(0x00a0, 0x00a0, 1),
Range16.init(0x1680, 0x1680, 1),
Range16.init(0x2000, 0x200a, 1),
Range16.init(0x2028, 0x2029, 1),
Range16.init(0x202f, 0x202f, 1),
Range16.init(0x205f, 0x205f, 1),
Range16.init(0x3000, 0x3000, 1),
};
break :init r[0..];
},
.r32 = &[_]Range32{},
.latin_offset = 4,
};
// These variables have type *RangeTable.
pub const STerm = &_Sentence_Terminal; // STerm is an alias for Sentence_Terminal.
pub const ASCII_Hex_Digit = &_ASCII_Hex_Digit; // ASCII_Hex_Digit is the set of Unicode characters with property ASCII_Hex_Digit.
pub const Bidi_Control = &_Bidi_Control; // Bidi_Control is the set of Unicode characters with property Bidi_Control.
pub const Dash = &_Dash; // Dash is the set of Unicode characters with property Dash.
pub const Deprecated = &_Deprecated; // Deprecated is the set of Unicode characters with property Deprecated.
pub const Diacritic = &_Diacritic; // Diacritic is the set of Unicode characters with property Diacritic.
pub const Extender = &_Extender; // Extender is the set of Unicode characters with property Extender.
pub const Hex_Digit = &_Hex_Digit; // Hex_Digit is the set of Unicode characters with property Hex_Digit.
pub const Hyphen = &_Hyphen; // Hyphen is the set of Unicode characters with property Hyphen.
pub const IDS_Binary_Operator = &_IDS_Binary_Operator; // IDS_Binary_Operator is the set of Unicode characters with property IDS_Binary_Operator.
pub const IDS_Trinary_Operator = &_IDS_Trinary_Operator; // IDS_Trinary_Operator is the set of Unicode characters with property IDS_Trinary_Operator.
pub const Ideographic = &_Ideographic; // Ideographic is the set of Unicode characters with property Ideographic.
pub const Join_Control = &_Join_Control; // Join_Control is the set of Unicode characters with property Join_Control.
pub const Logical_Order_Exception = &_Logical_Order_Exception; // Logical_Order_Exception is the set of Unicode characters with property Logical_Order_Exception.
pub const Noncharacter_Code_Point = &_Noncharacter_Code_Point; // Noncharacter_Code_Point is the set of Unicode characters with property Noncharacter_Code_Point.
pub const Other_Alphabetic = &_Other_Alphabetic; // Other_Alphabetic is the set of Unicode characters with property Other_Alphabetic.
pub const Other_Default_Ignorable_Code_Point = &_Other_Default_Ignorable_Code_Point; // Other_Default_Ignorable_Code_Point is the set of Unicode characters with property Other_Default_Ignorable_Code_Point.
pub const Other_Grapheme_Extend = &_Other_Grapheme_Extend; // Other_Grapheme_Extend is the set of Unicode characters with property Other_Grapheme_Extend.
pub const Other_ID_Continue = &_Other_ID_Continue; // Other_ID_Continue is the set of Unicode characters with property Other_ID_Continue.
pub const Other_ID_Start = &_Other_ID_Start; // Other_ID_Start is the set of Unicode characters with property Other_ID_Start.
pub const Other_Lowercase = &_Other_Lowercase; // Other_Lowercase is the set of Unicode characters with property Other_Lowercase.
pub const Other_Math = &_Other_Math; // Other_Math is the set of Unicode characters with property Other_Math.
pub const Other_Uppercase = &_Other_Uppercase; // Other_Uppercase is the set of Unicode characters with property Other_Uppercase.
pub const Pattern_Syntax = &_Pattern_Syntax; // Pattern_Syntax is the set of Unicode characters with property Pattern_Syntax.
pub const Pattern_White_Space = &_Pattern_White_Space; // Pattern_White_Space is the set of Unicode characters with property Pattern_White_Space.
pub const Prepended_Concatenation_Mark = &_Prepended_Concatenation_Mark; // Prepended_Concatenation_Mark is the set of Unicode characters with property Prepended_Concatenation_Mark.
pub const Quotation_Mark = &_Quotation_Mark; // Quotation_Mark is the set of Unicode characters with property Quotation_Mark.
pub const Radical = &_Radical; // Radical is the set of Unicode characters with property Radical.
pub const Regional_Indicator = &_Regional_Indicator; // Regional_Indicator is the set of Unicode characters with property Regional_Indicator.
pub const Sentence_Terminal = &_Sentence_Terminal; // Sentence_Terminal is the set of Unicode characters with property Sentence_Terminal.
pub const Soft_Dotted = &_Soft_Dotted; // Soft_Dotted is the set of Unicode characters with property Soft_Dotted.
pub const Terminal_Punctuation = &_Terminal_Punctuation; // Terminal_Punctuation is the set of Unicode characters with property Terminal_Punctuation.
pub const Unified_Ideograph = &_Unified_Ideograph; // Unified_Ideograph is the set of Unicode characters with property Unified_Ideograph.
pub const Variation_Selector = &_Variation_Selector; // Variation_Selector is the set of Unicode characters with property Variation_Selector.
pub const White_Space = &_White_Space; // White_Space is the set of Unicode characters with property White_Space.
// Generated by running
//maketables --data=http://www.unicode.org/Public/10.0.0/ucd/UnicodeData.txt --casefolding=http://www.unicode.org/Public/10.0.0/ucd/CaseFolding.txt
// DO NOT EDIT
// CaseRanges is the table describing case mappings for all letters with
// non-self mappings.
pub const CaseRanges = _CaseRanges;
const _CaseRanges = init: {
var cs = [_]CaseRange{
CaseRange.init(0x0041, 0x005A, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x0061, 0x007A, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x00B5, 0x00B5, &[_]i32{ 743, 0, 743 }),
CaseRange.init(0x00C0, 0x00D6, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x00D8, 0x00DE, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x00E0, 0x00F6, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x00F8, 0x00FE, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x00FF, 0x00FF, &[_]i32{ 121, 0, 121 }),
CaseRange.init(0x0100, 0x012F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0130, 0x0130, &[_]i32{ 0, -199, 0 }),
CaseRange.init(0x0131, 0x0131, &[_]i32{ -232, 0, -232 }),
CaseRange.init(0x0132, 0x0137, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0139, 0x0148, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x014A, 0x0177, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0178, 0x0178, &[_]i32{ 0, -121, 0 }),
CaseRange.init(0x0179, 0x017E, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x017F, 0x017F, &[_]i32{ -300, 0, -300 }),
CaseRange.init(0x0180, 0x0180, &[_]i32{ 195, 0, 195 }),
CaseRange.init(0x0181, 0x0181, &[_]i32{ 0, 210, 0 }),
CaseRange.init(0x0182, 0x0185, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0186, 0x0186, &[_]i32{ 0, 206, 0 }),
CaseRange.init(0x0187, 0x0188, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0189, 0x018A, &[_]i32{ 0, 205, 0 }),
CaseRange.init(0x018B, 0x018C, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x018E, 0x018E, &[_]i32{ 0, 79, 0 }),
CaseRange.init(0x018F, 0x018F, &[_]i32{ 0, 202, 0 }),
CaseRange.init(0x0190, 0x0190, &[_]i32{ 0, 203, 0 }),
CaseRange.init(0x0191, 0x0192, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0193, 0x0193, &[_]i32{ 0, 205, 0 }),
CaseRange.init(0x0194, 0x0194, &[_]i32{ 0, 207, 0 }),
CaseRange.init(0x0195, 0x0195, &[_]i32{ 97, 0, 97 }),
CaseRange.init(0x0196, 0x0196, &[_]i32{ 0, 211, 0 }),
CaseRange.init(0x0197, 0x0197, &[_]i32{ 0, 209, 0 }),
CaseRange.init(0x0198, 0x0199, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x019A, 0x019A, &[_]i32{ 163, 0, 163 }),
CaseRange.init(0x019C, 0x019C, &[_]i32{ 0, 211, 0 }),
CaseRange.init(0x019D, 0x019D, &[_]i32{ 0, 213, 0 }),
CaseRange.init(0x019E, 0x019E, &[_]i32{ 130, 0, 130 }),
CaseRange.init(0x019F, 0x019F, &[_]i32{ 0, 214, 0 }),
CaseRange.init(0x01A0, 0x01A5, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01A6, 0x01A6, &[_]i32{ 0, 218, 0 }),
CaseRange.init(0x01A7, 0x01A8, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01A9, 0x01A9, &[_]i32{ 0, 218, 0 }),
CaseRange.init(0x01AC, 0x01AD, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01AE, 0x01AE, &[_]i32{ 0, 218, 0 }),
CaseRange.init(0x01AF, 0x01B0, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01B1, 0x01B2, &[_]i32{ 0, 217, 0 }),
CaseRange.init(0x01B3, 0x01B6, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01B7, 0x01B7, &[_]i32{ 0, 219, 0 }),
CaseRange.init(0x01B8, 0x01B9, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01BC, 0x01BD, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01BF, 0x01BF, &[_]i32{ 56, 0, 56 }),
CaseRange.init(0x01C4, 0x01C4, &[_]i32{ 0, 2, 1 }),
CaseRange.init(0x01C5, 0x01C5, &[_]i32{ -1, 1, 0 }),
CaseRange.init(0x01C6, 0x01C6, &[_]i32{ -2, 0, -1 }),
CaseRange.init(0x01C7, 0x01C7, &[_]i32{ 0, 2, 1 }),
CaseRange.init(0x01C8, 0x01C8, &[_]i32{ -1, 1, 0 }),
CaseRange.init(0x01C9, 0x01C9, &[_]i32{ -2, 0, -1 }),
CaseRange.init(0x01CA, 0x01CA, &[_]i32{ 0, 2, 1 }),
CaseRange.init(0x01CB, 0x01CB, &[_]i32{ -1, 1, 0 }),
CaseRange.init(0x01CC, 0x01CC, &[_]i32{ -2, 0, -1 }),
CaseRange.init(0x01CD, 0x01DC, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01DD, 0x01DD, &[_]i32{ -79, 0, -79 }),
CaseRange.init(0x01DE, 0x01EF, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01F1, 0x01F1, &[_]i32{ 0, 2, 1 }),
CaseRange.init(0x01F2, 0x01F2, &[_]i32{ -1, 1, 0 }),
CaseRange.init(0x01F3, 0x01F3, &[_]i32{ -2, 0, -1 }),
CaseRange.init(0x01F4, 0x01F5, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x01F6, 0x01F6, &[_]i32{ 0, -97, 0 }),
CaseRange.init(0x01F7, 0x01F7, &[_]i32{ 0, -56, 0 }),
CaseRange.init(0x01F8, 0x021F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0220, 0x0220, &[_]i32{ 0, -130, 0 }),
CaseRange.init(0x0222, 0x0233, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x023A, 0x023A, &[_]i32{ 0, 10795, 0 }),
CaseRange.init(0x023B, 0x023C, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x023D, 0x023D, &[_]i32{ 0, -163, 0 }),
CaseRange.init(0x023E, 0x023E, &[_]i32{ 0, 10792, 0 }),
CaseRange.init(0x023F, 0x0240, &[_]i32{ 10815, 0, 10815 }),
CaseRange.init(0x0241, 0x0242, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0243, 0x0243, &[_]i32{ 0, -195, 0 }),
CaseRange.init(0x0244, 0x0244, &[_]i32{ 0, 69, 0 }),
CaseRange.init(0x0245, 0x0245, &[_]i32{ 0, 71, 0 }),
CaseRange.init(0x0246, 0x024F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0250, 0x0250, &[_]i32{ 10783, 0, 10783 }),
CaseRange.init(0x0251, 0x0251, &[_]i32{ 10780, 0, 10780 }),
CaseRange.init(0x0252, 0x0252, &[_]i32{ 10782, 0, 10782 }),
CaseRange.init(0x0253, 0x0253, &[_]i32{ -210, 0, -210 }),
CaseRange.init(0x0254, 0x0254, &[_]i32{ -206, 0, -206 }),
CaseRange.init(0x0256, 0x0257, &[_]i32{ -205, 0, -205 }),
CaseRange.init(0x0259, 0x0259, &[_]i32{ -202, 0, -202 }),
CaseRange.init(0x025B, 0x025B, &[_]i32{ -203, 0, -203 }),
CaseRange.init(0x025C, 0x025C, &[_]i32{ 42319, 0, 42319 }),
CaseRange.init(0x0260, 0x0260, &[_]i32{ -205, 0, -205 }),
CaseRange.init(0x0261, 0x0261, &[_]i32{ 42315, 0, 42315 }),
CaseRange.init(0x0263, 0x0263, &[_]i32{ -207, 0, -207 }),
CaseRange.init(0x0265, 0x0265, &[_]i32{ 42280, 0, 42280 }),
CaseRange.init(0x0266, 0x0266, &[_]i32{ 42308, 0, 42308 }),
CaseRange.init(0x0268, 0x0268, &[_]i32{ -209, 0, -209 }),
CaseRange.init(0x0269, 0x0269, &[_]i32{ -211, 0, -211 }),
CaseRange.init(0x026A, 0x026A, &[_]i32{ 42308, 0, 42308 }),
CaseRange.init(0x026B, 0x026B, &[_]i32{ 10743, 0, 10743 }),
CaseRange.init(0x026C, 0x026C, &[_]i32{ 42305, 0, 42305 }),
CaseRange.init(0x026F, 0x026F, &[_]i32{ -211, 0, -211 }),
CaseRange.init(0x0271, 0x0271, &[_]i32{ 10749, 0, 10749 }),
CaseRange.init(0x0272, 0x0272, &[_]i32{ -213, 0, -213 }),
CaseRange.init(0x0275, 0x0275, &[_]i32{ -214, 0, -214 }),
CaseRange.init(0x027D, 0x027D, &[_]i32{ 10727, 0, 10727 }),
CaseRange.init(0x0280, 0x0280, &[_]i32{ -218, 0, -218 }),
CaseRange.init(0x0283, 0x0283, &[_]i32{ -218, 0, -218 }),
CaseRange.init(0x0287, 0x0287, &[_]i32{ 42282, 0, 42282 }),
CaseRange.init(0x0288, 0x0288, &[_]i32{ -218, 0, -218 }),
CaseRange.init(0x0289, 0x0289, &[_]i32{ -69, 0, -69 }),
CaseRange.init(0x028A, 0x028B, &[_]i32{ -217, 0, -217 }),
CaseRange.init(0x028C, 0x028C, &[_]i32{ -71, 0, -71 }),
CaseRange.init(0x0292, 0x0292, &[_]i32{ -219, 0, -219 }),
CaseRange.init(0x029D, 0x029D, &[_]i32{ 42261, 0, 42261 }),
CaseRange.init(0x029E, 0x029E, &[_]i32{ 42258, 0, 42258 }),
CaseRange.init(0x0345, 0x0345, &[_]i32{ 84, 0, 84 }),
CaseRange.init(0x0370, 0x0373, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0376, 0x0377, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x037B, 0x037D, &[_]i32{ 130, 0, 130 }),
CaseRange.init(0x037F, 0x037F, &[_]i32{ 0, 116, 0 }),
CaseRange.init(0x0386, 0x0386, &[_]i32{ 0, 38, 0 }),
CaseRange.init(0x0388, 0x038A, &[_]i32{ 0, 37, 0 }),
CaseRange.init(0x038C, 0x038C, &[_]i32{ 0, 64, 0 }),
CaseRange.init(0x038E, 0x038F, &[_]i32{ 0, 63, 0 }),
CaseRange.init(0x0391, 0x03A1, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x03A3, 0x03AB, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x03AC, 0x03AC, &[_]i32{ -38, 0, -38 }),
CaseRange.init(0x03AD, 0x03AF, &[_]i32{ -37, 0, -37 }),
CaseRange.init(0x03B1, 0x03C1, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x03C2, 0x03C2, &[_]i32{ -31, 0, -31 }),
CaseRange.init(0x03C3, 0x03CB, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x03CC, 0x03CC, &[_]i32{ -64, 0, -64 }),
CaseRange.init(0x03CD, 0x03CE, &[_]i32{ -63, 0, -63 }),
CaseRange.init(0x03CF, 0x03CF, &[_]i32{ 0, 8, 0 }),
CaseRange.init(0x03D0, 0x03D0, &[_]i32{ -62, 0, -62 }),
CaseRange.init(0x03D1, 0x03D1, &[_]i32{ -57, 0, -57 }),
CaseRange.init(0x03D5, 0x03D5, &[_]i32{ -47, 0, -47 }),
CaseRange.init(0x03D6, 0x03D6, &[_]i32{ -54, 0, -54 }),
CaseRange.init(0x03D7, 0x03D7, &[_]i32{ -8, 0, -8 }),
CaseRange.init(0x03D8, 0x03EF, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x03F0, 0x03F0, &[_]i32{ -86, 0, -86 }),
CaseRange.init(0x03F1, 0x03F1, &[_]i32{ -80, 0, -80 }),
CaseRange.init(0x03F2, 0x03F2, &[_]i32{ 7, 0, 7 }),
CaseRange.init(0x03F3, 0x03F3, &[_]i32{ -116, 0, -116 }),
CaseRange.init(0x03F4, 0x03F4, &[_]i32{ 0, -60, 0 }),
CaseRange.init(0x03F5, 0x03F5, &[_]i32{ -96, 0, -96 }),
CaseRange.init(0x03F7, 0x03F8, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x03F9, 0x03F9, &[_]i32{ 0, -7, 0 }),
CaseRange.init(0x03FA, 0x03FB, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x03FD, 0x03FF, &[_]i32{ 0, -130, 0 }),
CaseRange.init(0x0400, 0x040F, &[_]i32{ 0, 80, 0 }),
CaseRange.init(0x0410, 0x042F, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x0430, 0x044F, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x0450, 0x045F, &[_]i32{ -80, 0, -80 }),
CaseRange.init(0x0460, 0x0481, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x048A, 0x04BF, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x04C0, 0x04C0, &[_]i32{ 0, 15, 0 }),
CaseRange.init(0x04C1, 0x04CE, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x04CF, 0x04CF, &[_]i32{ -15, 0, -15 }),
CaseRange.init(0x04D0, 0x052F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x0531, 0x0556, &[_]i32{ 0, 48, 0 }),
CaseRange.init(0x0561, 0x0586, &[_]i32{ -48, 0, -48 }),
CaseRange.init(0x10A0, 0x10C5, &[_]i32{ 0, 7264, 0 }),
CaseRange.init(0x10C7, 0x10C7, &[_]i32{ 0, 7264, 0 }),
CaseRange.init(0x10CD, 0x10CD, &[_]i32{ 0, 7264, 0 }),
CaseRange.init(0x13A0, 0x13EF, &[_]i32{ 0, 38864, 0 }),
CaseRange.init(0x13F0, 0x13F5, &[_]i32{ 0, 8, 0 }),
CaseRange.init(0x13F8, 0x13FD, &[_]i32{ -8, 0, -8 }),
CaseRange.init(0x1C80, 0x1C80, &[_]i32{ -6254, 0, -6254 }),
CaseRange.init(0x1C81, 0x1C81, &[_]i32{ -6253, 0, -6253 }),
CaseRange.init(0x1C82, 0x1C82, &[_]i32{ -6244, 0, -6244 }),
CaseRange.init(0x1C83, 0x1C84, &[_]i32{ -6242, 0, -6242 }),
CaseRange.init(0x1C85, 0x1C85, &[_]i32{ -6243, 0, -6243 }),
CaseRange.init(0x1C86, 0x1C86, &[_]i32{ -6236, 0, -6236 }),
CaseRange.init(0x1C87, 0x1C87, &[_]i32{ -6181, 0, -6181 }),
CaseRange.init(0x1C88, 0x1C88, &[_]i32{ 35266, 0, 35266 }),
CaseRange.init(0x1D79, 0x1D79, &[_]i32{ 35332, 0, 35332 }),
CaseRange.init(0x1D7D, 0x1D7D, &[_]i32{ 3814, 0, 3814 }),
CaseRange.init(0x1E00, 0x1E95, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x1E9B, 0x1E9B, &[_]i32{ -59, 0, -59 }),
CaseRange.init(0x1E9E, 0x1E9E, &[_]i32{ 0, -7615, 0 }),
CaseRange.init(0x1EA0, 0x1EFF, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x1F00, 0x1F07, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F08, 0x1F0F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F10, 0x1F15, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F18, 0x1F1D, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F20, 0x1F27, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F28, 0x1F2F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F30, 0x1F37, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F38, 0x1F3F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F40, 0x1F45, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F48, 0x1F4D, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F51, 0x1F51, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F53, 0x1F53, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F55, 0x1F55, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F57, 0x1F57, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F59, 0x1F59, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F5B, 0x1F5B, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F5D, 0x1F5D, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F5F, 0x1F5F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F60, 0x1F67, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F68, 0x1F6F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F70, 0x1F71, &[_]i32{ 74, 0, 74 }),
CaseRange.init(0x1F72, 0x1F75, &[_]i32{ 86, 0, 86 }),
CaseRange.init(0x1F76, 0x1F77, &[_]i32{ 100, 0, 100 }),
CaseRange.init(0x1F78, 0x1F79, &[_]i32{ 128, 0, 128 }),
CaseRange.init(0x1F7A, 0x1F7B, &[_]i32{ 112, 0, 112 }),
CaseRange.init(0x1F7C, 0x1F7D, &[_]i32{ 126, 0, 126 }),
CaseRange.init(0x1F80, 0x1F87, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F88, 0x1F8F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1F90, 0x1F97, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1F98, 0x1F9F, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1FA0, 0x1FA7, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1FA8, 0x1FAF, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1FB0, 0x1FB1, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1FB3, 0x1FB3, &[_]i32{ 9, 0, 9 }),
CaseRange.init(0x1FB8, 0x1FB9, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1FBA, 0x1FBB, &[_]i32{ 0, -74, 0 }),
CaseRange.init(0x1FBC, 0x1FBC, &[_]i32{ 0, -9, 0 }),
CaseRange.init(0x1FBE, 0x1FBE, &[_]i32{ -7205, 0, -7205 }),
CaseRange.init(0x1FC3, 0x1FC3, &[_]i32{ 9, 0, 9 }),
CaseRange.init(0x1FC8, 0x1FCB, &[_]i32{ 0, -86, 0 }),
CaseRange.init(0x1FCC, 0x1FCC, &[_]i32{ 0, -9, 0 }),
CaseRange.init(0x1FD0, 0x1FD1, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1FD8, 0x1FD9, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1FDA, 0x1FDB, &[_]i32{ 0, -100, 0 }),
CaseRange.init(0x1FE0, 0x1FE1, &[_]i32{ 8, 0, 8 }),
CaseRange.init(0x1FE5, 0x1FE5, &[_]i32{ 7, 0, 7 }),
CaseRange.init(0x1FE8, 0x1FE9, &[_]i32{ 0, -8, 0 }),
CaseRange.init(0x1FEA, 0x1FEB, &[_]i32{ 0, -112, 0 }),
CaseRange.init(0x1FEC, 0x1FEC, &[_]i32{ 0, -7, 0 }),
CaseRange.init(0x1FF3, 0x1FF3, &[_]i32{ 9, 0, 9 }),
CaseRange.init(0x1FF8, 0x1FF9, &[_]i32{ 0, -128, 0 }),
CaseRange.init(0x1FFA, 0x1FFB, &[_]i32{ 0, -126, 0 }),
CaseRange.init(0x1FFC, 0x1FFC, &[_]i32{ 0, -9, 0 }),
CaseRange.init(0x2126, 0x2126, &[_]i32{ 0, -7517, 0 }),
CaseRange.init(0x212A, 0x212A, &[_]i32{ 0, -8383, 0 }),
CaseRange.init(0x212B, 0x212B, &[_]i32{ 0, -8262, 0 }),
CaseRange.init(0x2132, 0x2132, &[_]i32{ 0, 28, 0 }),
CaseRange.init(0x214E, 0x214E, &[_]i32{ -28, 0, -28 }),
CaseRange.init(0x2160, 0x216F, &[_]i32{ 0, 16, 0 }),
CaseRange.init(0x2170, 0x217F, &[_]i32{ -16, 0, -16 }),
CaseRange.init(0x2183, 0x2184, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x24B6, 0x24CF, &[_]i32{ 0, 26, 0 }),
CaseRange.init(0x24D0, 0x24E9, &[_]i32{ -26, 0, -26 }),
CaseRange.init(0x2C00, 0x2C2E, &[_]i32{ 0, 48, 0 }),
CaseRange.init(0x2C30, 0x2C5E, &[_]i32{ -48, 0, -48 }),
CaseRange.init(0x2C60, 0x2C61, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2C62, 0x2C62, &[_]i32{ 0, -10743, 0 }),
CaseRange.init(0x2C63, 0x2C63, &[_]i32{ 0, -3814, 0 }),
CaseRange.init(0x2C64, 0x2C64, &[_]i32{ 0, -10727, 0 }),
CaseRange.init(0x2C65, 0x2C65, &[_]i32{ -10795, 0, -10795 }),
CaseRange.init(0x2C66, 0x2C66, &[_]i32{ -10792, 0, -10792 }),
CaseRange.init(0x2C67, 0x2C6C, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2C6D, 0x2C6D, &[_]i32{ 0, -10780, 0 }),
CaseRange.init(0x2C6E, 0x2C6E, &[_]i32{ 0, -10749, 0 }),
CaseRange.init(0x2C6F, 0x2C6F, &[_]i32{ 0, -10783, 0 }),
CaseRange.init(0x2C70, 0x2C70, &[_]i32{ 0, -10782, 0 }),
CaseRange.init(0x2C72, 0x2C73, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2C75, 0x2C76, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2C7E, 0x2C7F, &[_]i32{ 0, -10815, 0 }),
CaseRange.init(0x2C80, 0x2CE3, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2CEB, 0x2CEE, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2CF2, 0x2CF3, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0x2D00, 0x2D25, &[_]i32{ -7264, 0, -7264 }),
CaseRange.init(0x2D27, 0x2D27, &[_]i32{ -7264, 0, -7264 }),
CaseRange.init(0x2D2D, 0x2D2D, &[_]i32{ -7264, 0, -7264 }),
CaseRange.init(0xA640, 0xA66D, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA680, 0xA69B, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA722, 0xA72F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA732, 0xA76F, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA779, 0xA77C, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA77D, 0xA77D, &[_]i32{ 0, -35332, 0 }),
CaseRange.init(0xA77E, 0xA787, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA78B, 0xA78C, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA78D, 0xA78D, &[_]i32{ 0, -42280, 0 }),
CaseRange.init(0xA790, 0xA793, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA796, 0xA7A9, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xA7AA, 0xA7AA, &[_]i32{ 0, -42308, 0 }),
CaseRange.init(0xA7AB, 0xA7AB, &[_]i32{ 0, -42319, 0 }),
CaseRange.init(0xA7AC, 0xA7AC, &[_]i32{ 0, -42315, 0 }),
CaseRange.init(0xA7AD, 0xA7AD, &[_]i32{ 0, -42305, 0 }),
CaseRange.init(0xA7AE, 0xA7AE, &[_]i32{ 0, -42308, 0 }),
CaseRange.init(0xA7B0, 0xA7B0, &[_]i32{ 0, -42258, 0 }),
CaseRange.init(0xA7B1, 0xA7B1, &[_]i32{ 0, -42282, 0 }),
CaseRange.init(0xA7B2, 0xA7B2, &[_]i32{ 0, -42261, 0 }),
CaseRange.init(0xA7B3, 0xA7B3, &[_]i32{ 0, 928, 0 }),
CaseRange.init(0xA7B4, 0xA7B7, &[_]i32{ upper_lower, upper_lower, upper_lower }),
CaseRange.init(0xAB53, 0xAB53, &[_]i32{ -928, 0, -928 }),
CaseRange.init(0xAB70, 0xABBF, &[_]i32{ -38864, 0, -38864 }),
CaseRange.init(0xFF21, 0xFF3A, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0xFF41, 0xFF5A, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x10400, 0x10427, &[_]i32{ 0, 40, 0 }),
CaseRange.init(0x10428, 0x1044F, &[_]i32{ -40, 0, -40 }),
CaseRange.init(0x104B0, 0x104D3, &[_]i32{ 0, 40, 0 }),
CaseRange.init(0x104D8, 0x104FB, &[_]i32{ -40, 0, -40 }),
CaseRange.init(0x10C80, 0x10CB2, &[_]i32{ 0, 64, 0 }),
CaseRange.init(0x10CC0, 0x10CF2, &[_]i32{ -64, 0, -64 }),
CaseRange.init(0x118A0, 0x118BF, &[_]i32{ 0, 32, 0 }),
CaseRange.init(0x118C0, 0x118DF, &[_]i32{ -32, 0, -32 }),
CaseRange.init(0x1E900, 0x1E921, &[_]i32{ 0, 34, 0 }),
CaseRange.init(0x1E922, 0x1E943, &[_]i32{ -34, 0, -34 }),
};
break :init cs[0..];
};
pub const properties = init: {
var s = [_]u8{0} ** 1114112;
s[0x00] = pC; // '\x00'
s[0x01] = pC; // '\x01'
s[0x02] = pC; // '\x02'
s[0x03] = pC; // '\x03'
s[0x04] = pC; // '\x04'
s[0x05] = pC; // '\x05'
s[0x06] = pC; // '\x06'
s[0x07] = pC; // '\a'
s[0x08] = pC; // '\b'
s[0x09] = pC; // '\t'
s[0x0A] = pC; // '\n'
s[0x0B] = pC; // '\v'
s[0x0C] = pC; // '\f'
s[0x0D] = pC; // '\r'
s[0x0E] = pC; // '\x0e'
s[0x0F] = pC; // '\x0f'
s[0x10] = pC; // '\x10'
s[0x11] = pC; // '\x11'
s[0x12] = pC; // '\x12'
s[0x13] = pC; // '\x13'
s[0x14] = pC; // '\x14'
s[0x15] = pC; // '\x15'
s[0x16] = pC; // '\x16'
s[0x17] = pC; // '\x17'
s[0x18] = pC; // '\x18'
s[0x19] = pC; // '\x19'
s[0x1A] = pC; // '\x1a'
s[0x1B] = pC; // '\x1b'
s[0x1C] = pC; // '\x1c'
s[0x1D] = pC; // '\x1d'
s[0x1E] = pC; // '\x1e'
s[0x1F] = pC; // '\x1f'
s[0x20] = pZ | pp; // ' '
s[0x21] = pP | pp; // '!'
s[0x22] = pP | pp; // '"'
s[0x23] = pP | pp; // '#'
s[0x24] = pS | pp; // '$'
s[0x25] = pP | pp; // '%'
s[0x26] = pP | pp; // '&'
s[0x27] = pP | pp; // '\''
s[0x28] = pP | pp; // '('
s[0x29] = pP | pp; // ')'
s[0x2A] = pP | pp; // '*'
s[0x2B] = pS | pp; // '+'
s[0x2C] = pP | pp; // ','
s[0x2D] = pP | pp; // '-'
s[0x2E] = pP | pp; // '.'
s[0x2F] = pP | pp; // '/'
s[0x30] = pN | pp; // '0'
s[0x31] = pN | pp; // '1'
s[0x32] = pN | pp; // '2'
s[0x33] = pN | pp; // '3'
s[0x34] = pN | pp; // '4'
s[0x35] = pN | pp; // '5'
s[0x36] = pN | pp; // '6'
s[0x37] = pN | pp; // '7'
s[0x38] = pN | pp; // '8'
s[0x39] = pN | pp; // '9'
s[0x3A] = pP | pp; // ':'
s[0x3B] = pP | pp; // ';'
s[0x3C] = pS | pp; // '<'
s[0x3D] = pS | pp; // '='
s[0x3E] = pS | pp; // '>'
s[0x3F] = pP | pp; // '?'
s[0x40] = pP | pp; // '@'
s[0x41] = pLu | pp; // 'A'
s[0x42] = pLu | pp; // 'B'
s[0x43] = pLu | pp; // 'C'
s[0x44] = pLu | pp; // 'D'
s[0x45] = pLu | pp; // 'E'
s[0x46] = pLu | pp; // 'F'
s[0x47] = pLu | pp; // 'G'
s[0x48] = pLu | pp; // 'H'
s[0x49] = pLu | pp; // 'I'
s[0x4A] = pLu | pp; // 'J'
s[0x4B] = pLu | pp; // 'K'
s[0x4C] = pLu | pp; // 'L'
s[0x4D] = pLu | pp; // 'M'
s[0x4E] = pLu | pp; // 'N'
s[0x4F] = pLu | pp; // 'O'
s[0x50] = pLu | pp; // 'P'
s[0x51] = pLu | pp; // 'Q'
s[0x52] = pLu | pp; // 'R'
s[0x53] = pLu | pp; // 'S'
s[0x54] = pLu | pp; // 'T'
s[0x55] = pLu | pp; // 'U'
s[0x56] = pLu | pp; // 'V'
s[0x57] = pLu | pp; // 'W'
s[0x58] = pLu | pp; // 'X'
s[0x59] = pLu | pp; // 'Y'
s[0x5A] = pLu | pp; // 'Z'
s[0x5B] = pP | pp; // '['
s[0x5C] = pP | pp; // '\\'
s[0x5D] = pP | pp; // ']'
s[0x5E] = pS | pp; // '^'
s[0x5F] = pP | pp; // '_'
s[0x60] = pS | pp; // '`'
s[0x61] = pLl | pp; // 'a'
s[0x62] = pLl | pp; // 'b'
s[0x63] = pLl | pp; // 'c'
s[0x64] = pLl | pp; // 'd'
s[0x65] = pLl | pp; // 'e'
s[0x66] = pLl | pp; // 'f'
s[0x67] = pLl | pp; // 'g'
s[0x68] = pLl | pp; // 'h'
s[0x69] = pLl | pp; // 'i'
s[0x6A] = pLl | pp; // 'j'
s[0x6B] = pLl | pp; // 'k'
s[0x6C] = pLl | pp; // 'l'
s[0x6D] = pLl | pp; // 'm'
s[0x6E] = pLl | pp; // 'n'
s[0x6F] = pLl | pp; // 'o'
s[0x70] = pLl | pp; // 'p'
s[0x71] = pLl | pp; // 'q'
s[0x72] = pLl | pp; // 'r'
s[0x73] = pLl | pp; // 's'
s[0x74] = pLl | pp; // 't'
s[0x75] = pLl | pp; // 'u'
s[0x76] = pLl | pp; // 'v'
s[0x77] = pLl | pp; // 'w'
s[0x78] = pLl | pp; // 'x'
s[0x79] = pLl | pp; // 'y'
s[0x7A] = pLl | pp; // 'z'
s[0x7B] = pP | pp; // '{'
s[0x7C] = pS | pp; // '|'
s[0x7D] = pP | pp; // '}'
s[0x7E] = pS | pp; // '~'
s[0x7F] = pC; // '\u007f'
s[0x80] = pC; // '\u0080'
s[0x81] = pC; // '\u0081'
s[0x82] = pC; // '\u0082'
s[0x83] = pC; // '\u0083'
s[0x84] = pC; // '\u0084'
s[0x85] = pC; // '\u0085'
s[0x86] = pC; // '\u0086'
s[0x87] = pC; // '\u0087'
s[0x88] = pC; // '\u0088'
s[0x89] = pC; // '\u0089'
s[0x8A] = pC; // '\u008a'
s[0x8B] = pC; // '\u008b'
s[0x8C] = pC; // '\u008c'
s[0x8D] = pC; // '\u008d'
s[0x8E] = pC; // '\u008e'
s[0x8F] = pC; // '\u008f'
s[0x90] = pC; // '\u0090'
s[0x91] = pC; // '\u0091'
s[0x92] = pC; // '\u0092'
s[0x93] = pC; // '\u0093'
s[0x94] = pC; // '\u0094'
s[0x95] = pC; // '\u0095'
s[0x96] = pC; // '\u0096'
s[0x97] = pC; // '\u0097'
s[0x98] = pC; // '\u0098'
s[0x99] = pC; // '\u0099'
s[0x9A] = pC; // '\u009a'
s[0x9B] = pC; // '\u009b'
s[0x9C] = pC; // '\u009c'
s[0x9D] = pC; // '\u009d'
s[0x9E] = pC; // '\u009e'
s[0x9F] = pC; // '\u009f'
s[0xA0] = pZ; // '\u00a0'
s[0xA1] = pP | pp; // '¡'
s[0xA2] = pS | pp; // '¢'
s[0xA3] = pS | pp; // '£'
s[0xA4] = pS | pp; // '¤'
s[0xA5] = pS | pp; // '¥'
s[0xA6] = pS | pp; // '¦'
s[0xA7] = pP | pp; // '§'
s[0xA8] = pS | pp; // '¨'
s[0xA9] = pS | pp; // '©'
s[0xAA] = pLo | pp; // 'ª'
s[0xAB] = pP | pp; // '«'
s[0xAC] = pS | pp; // '¬'
s[0xAD] = 0; // '\u00ad'
s[0xAE] = pS | pp; // '®'
s[0xAF] = pS | pp; // '¯'
s[0xB0] = pS | pp; // '°'
s[0xB1] = pS | pp; // '±'
s[0xB2] = pN | pp; // '²'
s[0xB3] = pN | pp; // '³'
s[0xB4] = pS | pp; // '´'
s[0xB5] = pLl | pp; // 'µ'
s[0xB6] = pP | pp; // '¶'
s[0xB7] = pP | pp; // '·'
s[0xB8] = pS | pp; // '¸'
s[0xB9] = pN | pp; // '¹'
s[0xBA] = pLo | pp; // 'º'
s[0xBB] = pP | pp; // '»'
s[0xBC] = pN | pp; // '¼'
s[0xBD] = pN | pp; // '½'
s[0xBE] = pN | pp; // '¾'
s[0xBF] = pP | pp; // '¿'
s[0xC0] = pLu | pp; // 'À'
s[0xC1] = pLu | pp; // 'Á'
s[0xC2] = pLu | pp; // 'Â'
s[0xC3] = pLu | pp; // 'Ã'
s[0xC4] = pLu | pp; // 'Ä'
s[0xC5] = pLu | pp; // 'Å'
s[0xC6] = pLu | pp; // 'Æ'
s[0xC7] = pLu | pp; // 'Ç'
s[0xC8] = pLu | pp; // 'È'
s[0xC9] = pLu | pp; // 'É'
s[0xCA] = pLu | pp; // 'Ê'
s[0xCB] = pLu | pp; // 'Ë'
s[0xCC] = pLu | pp; // 'Ì'
s[0xCD] = pLu | pp; // 'Í'
s[0xCE] = pLu | pp; // 'Î'
s[0xCF] = pLu | pp; // 'Ï'
s[0xD0] = pLu | pp; // 'Ð'
s[0xD1] = pLu | pp; // 'Ñ'
s[0xD2] = pLu | pp; // 'Ò'
s[0xD3] = pLu | pp; // 'Ó'
s[0xD4] = pLu | pp; // 'Ô'
s[0xD5] = pLu | pp; // 'Õ'
s[0xD6] = pLu | pp; // 'Ö'
s[0xD7] = pS | pp; // '×'
s[0xD8] = pLu | pp; // 'Ø'
s[0xD9] = pLu | pp; // 'Ù'
s[0xDA] = pLu | pp; // 'Ú'
s[0xDB] = pLu | pp; // 'Û'
s[0xDC] = pLu | pp; // 'Ü'
s[0xDD] = pLu | pp; // 'Ý'
s[0xDE] = pLu | pp; // 'Þ'
s[0xDF] = pLl | pp; // 'ß'
s[0xE0] = pLl | pp; // 'à'
s[0xE1] = pLl | pp; // 'á'
s[0xE2] = pLl | pp; // 'â'
s[0xE3] = pLl | pp; // 'ã'
s[0xE4] = pLl | pp; // 'ä'
s[0xE5] = pLl | pp; // 'å'
s[0xE6] = pLl | pp; // 'æ'
s[0xE7] = pLl | pp; // 'ç'
s[0xE8] = pLl | pp; // 'è'
s[0xE9] = pLl | pp; // 'é'
s[0xEA] = pLl | pp; // 'ê'
s[0xEB] = pLl | pp; // 'ë'
s[0xEC] = pLl | pp; // 'ì'
s[0xED] = pLl | pp; // 'í'
s[0xEE] = pLl | pp; // 'î'
s[0xEF] = pLl | pp; // 'ï'
s[0xF0] = pLl | pp; // 'ð'
s[0xF1] = pLl | pp; // 'ñ'
s[0xF2] = pLl | pp; // 'ò'
s[0xF3] = pLl | pp; // 'ó'
s[0xF4] = pLl | pp; // 'ô'
s[0xF5] = pLl | pp; // 'õ'
s[0xF6] = pLl | pp; // 'ö'
s[0xF7] = pS | pp; // '÷'
s[0xF8] = pLl | pp; // 'ø'
s[0xF9] = pLl | pp; // 'ù'
s[0xFA] = pLl | pp; // 'ú'
s[0xFB] = pLl | pp; // 'û'
s[0xFC] = pLl | pp; // 'ü'
s[0xFD] = pLl | pp; // 'ý'
s[0xFE] = pLl | pp; // 'þ'
s[0xFF] = pLl | pp; // 'ÿ'
break :init s;
};
pub const asciiFold = []u16{
0x0000,
0x0001,
0x0002,
0x0003,
0x0004,
0x0005,
0x0006,
0x0007,
0x0008,
0x0009,
0x000A,
0x000B,
0x000C,
0x000D,
0x000E,
0x000F,
0x0010,
0x0011,
0x0012,
0x0013,
0x0014,
0x0015,
0x0016,
0x0017,
0x0018,
0x0019,
0x001A,
0x001B,
0x001C,
0x001D,
0x001E,
0x001F,
0x0020,
0x0021,
0x0022,
0x0023,
0x0024,
0x0025,
0x0026,
0x0027,
0x0028,
0x0029,
0x002A,
0x002B,
0x002C,
0x002D,
0x002E,
0x002F,
0x0030,
0x0031,
0x0032,
0x0033,
0x0034,
0x0035,
0x0036,
0x0037,
0x0038,
0x0039,
0x003A,
0x003B,
0x003C,
0x003D,
0x003E,
0x003F,
0x0040,
0x0061,
0x0062,
0x0063,
0x0064,
0x0065,
0x0066,
0x0067,
0x0068,
0x0069,
0x006A,
0x006B,
0x006C,
0x006D,
0x006E,
0x006F,
0x0070,
0x0071,
0x0072,
0x0073,
0x0074,
0x0075,
0x0076,
0x0077,
0x0078,
0x0079,
0x007A,
0x005B,
0x005C,
0x005D,
0x005E,
0x005F,
0x0060,
0x0041,
0x0042,
0x0043,
0x0044,
0x0045,
0x0046,
0x0047,
0x0048,
0x0049,
0x004A,
0x212A,
0x004C,
0x004D,
0x004E,
0x004F,
0x0050,
0x0051,
0x0052,
0x017F,
0x0054,
0x0055,
0x0056,
0x0057,
0x0058,
0x0059,
0x005A,
0x007B,
0x007C,
0x007D,
0x007E,
0x007F,
};
pub const caseOrbit = []FoldPair{
FoldPair.init(0x004B, 0x006B),
FoldPair.init(0x0053, 0x0073),
FoldPair.init(0x006B, 0x212A),
FoldPair.init(0x0073, 0x017F),
FoldPair.init(0x00B5, 0x039C),
FoldPair.init(0x00C5, 0x00E5),
FoldPair.init(0x00DF, 0x1E9E),
FoldPair.init(0x00E5, 0x212B),
FoldPair.init(0x0130, 0x0130),
FoldPair.init(0x0131, 0x0131),
FoldPair.init(0x017F, 0x0053),
FoldPair.init(0x01C4, 0x01C5),
FoldPair.init(0x01C5, 0x01C6),
FoldPair.init(0x01C6, 0x01C4),
FoldPair.init(0x01C7, 0x01C8),
FoldPair.init(0x01C8, 0x01C9),
FoldPair.init(0x01C9, 0x01C7),
FoldPair.init(0x01CA, 0x01CB),
FoldPair.init(0x01CB, 0x01CC),
FoldPair.init(0x01CC, 0x01CA),
FoldPair.init(0x01F1, 0x01F2),
FoldPair.init(0x01F2, 0x01F3),
FoldPair.init(0x01F3, 0x01F1),
FoldPair.init(0x0345, 0x0399),
FoldPair.init(0x0392, 0x03B2),
FoldPair.init(0x0395, 0x03B5),
FoldPair.init(0x0398, 0x03B8),
FoldPair.init(0x0399, 0x03B9),
FoldPair.init(0x039A, 0x03BA),
FoldPair.init(0x039C, 0x03BC),
FoldPair.init(0x03A0, 0x03C0),
FoldPair.init(0x03A1, 0x03C1),
FoldPair.init(0x03A3, 0x03C2),
FoldPair.init(0x03A6, 0x03C6),
FoldPair.init(0x03A9, 0x03C9),
FoldPair.init(0x03B2, 0x03D0),
FoldPair.init(0x03B5, 0x03F5),
FoldPair.init(0x03B8, 0x03D1),
FoldPair.init(0x03B9, 0x1FBE),
FoldPair.init(0x03BA, 0x03F0),
FoldPair.init(0x03BC, 0x00B5),
FoldPair.init(0x03C0, 0x03D6),
FoldPair.init(0x03C1, 0x03F1),
FoldPair.init(0x03C2, 0x03C3),
FoldPair.init(0x03C3, 0x03A3),
FoldPair.init(0x03C6, 0x03D5),
FoldPair.init(0x03C9, 0x2126),
FoldPair.init(0x03D0, 0x0392),
FoldPair.init(0x03D1, 0x03F4),
FoldPair.init(0x03D5, 0x03A6),
FoldPair.init(0x03D6, 0x03A0),
FoldPair.init(0x03F0, 0x039A),
FoldPair.init(0x03F1, 0x03A1),
FoldPair.init(0x03F4, 0x0398),
FoldPair.init(0x03F5, 0x0395),
FoldPair.init(0x0412, 0x0432),
FoldPair.init(0x0414, 0x0434),
FoldPair.init(0x041E, 0x043E),
FoldPair.init(0x0421, 0x0441),
FoldPair.init(0x0422, 0x0442),
FoldPair.init(0x042A, 0x044A),
FoldPair.init(0x0432, 0x1C80),
FoldPair.init(0x0434, 0x1C81),
FoldPair.init(0x043E, 0x1C82),
FoldPair.init(0x0441, 0x1C83),
FoldPair.init(0x0442, 0x1C84),
FoldPair.init(0x044A, 0x1C86),
FoldPair.init(0x0462, 0x0463),
FoldPair.init(0x0463, 0x1C87),
FoldPair.init(0x1C80, 0x0412),
FoldPair.init(0x1C81, 0x0414),
FoldPair.init(0x1C82, 0x041E),
FoldPair.init(0x1C83, 0x0421),
FoldPair.init(0x1C84, 0x1C85),
FoldPair.init(0x1C85, 0x0422),
FoldPair.init(0x1C86, 0x042A),
FoldPair.init(0x1C87, 0x0462),
FoldPair.init(0x1C88, 0xA64A),
FoldPair.init(0x1E60, 0x1E61),
FoldPair.init(0x1E61, 0x1E9B),
FoldPair.init(0x1E9B, 0x1E60),
FoldPair.init(0x1E9E, 0x00DF),
FoldPair.init(0x1FBE, 0x0345),
FoldPair.init(0x2126, 0x03A9),
FoldPair.init(0x212A, 0x004B),
FoldPair.init(0x212B, 0x00C5),
FoldPair.init(0xA64A, 0xA64B),
FoldPair.init(0xA64B, 0x1C88),
};
// FoldCategory maps a category name to a table of
// code points outside the category that are equivalent under
// simple case folding to code points inside the category.
// If there is no entry for a category name, there are no such points.
pub const FoldCategory = enum {
L,
Ll,
Lt,
Lu,
M,
Mn,
pub fn list() []FoldCategory {
return []FoldCategory{ FoldCategory.L, FoldCategory.Ll, FoldCategory.Lt, FoldCategory.Lu, FoldCategory.M, FoldCategory.Mn };
}
pub fn table(self: FoldCategory) *RangeTable {
return switch (self) {
FoldCategory.L => foldL,
FoldCategory.Ll => foldLl,
FoldCategory.Lt => foldLt,
FoldCategory.Lu => foldLu,
FoldCategory.M => foldM,
FoldCategory.Mn => foldMn,
else => unreachable,
};
}
};
const foldL = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x0345, 0x0345, 1)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const foldLl = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0041, 0x005a, 1),
Range16.init(0x00c0, 0x00d6, 1),
Range16.init(0x00d8, 0x00de, 1),
Range16.init(0x0100, 0x012e, 2),
Range16.init(0x0132, 0x0136, 2),
Range16.init(0x0139, 0x0147, 2),
Range16.init(0x014a, 0x0178, 2),
Range16.init(0x0179, 0x017d, 2),
Range16.init(0x0181, 0x0182, 1),
Range16.init(0x0184, 0x0186, 2),
Range16.init(0x0187, 0x0189, 2),
Range16.init(0x018a, 0x018b, 1),
Range16.init(0x018e, 0x0191, 1),
Range16.init(0x0193, 0x0194, 1),
Range16.init(0x0196, 0x0198, 1),
Range16.init(0x019c, 0x019d, 1),
Range16.init(0x019f, 0x01a0, 1),
Range16.init(0x01a2, 0x01a6, 2),
Range16.init(0x01a7, 0x01a9, 2),
Range16.init(0x01ac, 0x01ae, 2),
Range16.init(0x01af, 0x01b1, 2),
Range16.init(0x01b2, 0x01b3, 1),
Range16.init(0x01b5, 0x01b7, 2),
Range16.init(0x01b8, 0x01bc, 4),
Range16.init(0x01c4, 0x01c5, 1),
Range16.init(0x01c7, 0x01c8, 1),
Range16.init(0x01ca, 0x01cb, 1),
Range16.init(0x01cd, 0x01db, 2),
Range16.init(0x01de, 0x01ee, 2),
Range16.init(0x01f1, 0x01f2, 1),
Range16.init(0x01f4, 0x01f6, 2),
Range16.init(0x01f7, 0x01f8, 1),
Range16.init(0x01fa, 0x0232, 2),
Range16.init(0x023a, 0x023b, 1),
Range16.init(0x023d, 0x023e, 1),
Range16.init(0x0241, 0x0243, 2),
Range16.init(0x0244, 0x0246, 1),
Range16.init(0x0248, 0x024e, 2),
Range16.init(0x0345, 0x0370, 43),
Range16.init(0x0372, 0x0376, 4),
Range16.init(0x037f, 0x0386, 7),
Range16.init(0x0388, 0x038a, 1),
Range16.init(0x038c, 0x038e, 2),
Range16.init(0x038f, 0x0391, 2),
Range16.init(0x0392, 0x03a1, 1),
Range16.init(0x03a3, 0x03ab, 1),
Range16.init(0x03cf, 0x03d8, 9),
Range16.init(0x03da, 0x03ee, 2),
Range16.init(0x03f4, 0x03f7, 3),
Range16.init(0x03f9, 0x03fa, 1),
Range16.init(0x03fd, 0x042f, 1),
Range16.init(0x0460, 0x0480, 2),
Range16.init(0x048a, 0x04c0, 2),
Range16.init(0x04c1, 0x04cd, 2),
Range16.init(0x04d0, 0x052e, 2),
Range16.init(0x0531, 0x0556, 1),
Range16.init(0x10a0, 0x10c5, 1),
Range16.init(0x10c7, 0x10cd, 6),
Range16.init(0x13a0, 0x13f5, 1),
Range16.init(0x1e00, 0x1e94, 2),
Range16.init(0x1e9e, 0x1efe, 2),
Range16.init(0x1f08, 0x1f0f, 1),
Range16.init(0x1f18, 0x1f1d, 1),
Range16.init(0x1f28, 0x1f2f, 1),
Range16.init(0x1f38, 0x1f3f, 1),
Range16.init(0x1f48, 0x1f4d, 1),
Range16.init(0x1f59, 0x1f5f, 2),
Range16.init(0x1f68, 0x1f6f, 1),
Range16.init(0x1f88, 0x1f8f, 1),
Range16.init(0x1f98, 0x1f9f, 1),
Range16.init(0x1fa8, 0x1faf, 1),
Range16.init(0x1fb8, 0x1fbc, 1),
Range16.init(0x1fc8, 0x1fcc, 1),
Range16.init(0x1fd8, 0x1fdb, 1),
Range16.init(0x1fe8, 0x1fec, 1),
Range16.init(0x1ff8, 0x1ffc, 1),
Range16.init(0x2126, 0x212a, 4),
Range16.init(0x212b, 0x2132, 7),
Range16.init(0x2183, 0x2c00, 2685),
Range16.init(0x2c01, 0x2c2e, 1),
Range16.init(0x2c60, 0x2c62, 2),
Range16.init(0x2c63, 0x2c64, 1),
Range16.init(0x2c67, 0x2c6d, 2),
Range16.init(0x2c6e, 0x2c70, 1),
Range16.init(0x2c72, 0x2c75, 3),
Range16.init(0x2c7e, 0x2c80, 1),
Range16.init(0x2c82, 0x2ce2, 2),
Range16.init(0x2ceb, 0x2ced, 2),
Range16.init(0x2cf2, 0xa640, 31054),
Range16.init(0xa642, 0xa66c, 2),
Range16.init(0xa680, 0xa69a, 2),
Range16.init(0xa722, 0xa72e, 2),
Range16.init(0xa732, 0xa76e, 2),
Range16.init(0xa779, 0xa77d, 2),
Range16.init(0xa77e, 0xa786, 2),
Range16.init(0xa78b, 0xa78d, 2),
Range16.init(0xa790, 0xa792, 2),
Range16.init(0xa796, 0xa7aa, 2),
Range16.init(0xa7ab, 0xa7ae, 1),
Range16.init(0xa7b0, 0xa7b4, 1),
Range16.init(0xa7b6, 0xff21, 22379),
Range16.init(0xff22, 0xff3a, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10400, 0x10427, 1),
Range32.init(0x104b0, 0x104d3, 1),
Range32.init(0x10c80, 0x10cb2, 1),
Range32.init(0x118a0, 0x118bf, 1),
Range32.init(0x1e900, 0x1e921, 1),
};
break :init r[0..];
},
.latin_offset = 3,
};
const foldLt = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x01c4, 0x01c6, 2),
Range16.init(0x01c7, 0x01c9, 2),
Range16.init(0x01ca, 0x01cc, 2),
Range16.init(0x01f1, 0x01f3, 2),
Range16.init(0x1f80, 0x1f87, 1),
Range16.init(0x1f90, 0x1f97, 1),
Range16.init(0x1fa0, 0x1fa7, 1),
Range16.init(0x1fb3, 0x1fc3, 16),
Range16.init(0x1ff3, 0x1ff3, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const foldLu = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0061, 0x007a, 1),
Range16.init(0x00b5, 0x00df, 42),
Range16.init(0x00e0, 0x00f6, 1),
Range16.init(0x00f8, 0x00ff, 1),
Range16.init(0x0101, 0x012f, 2),
Range16.init(0x0133, 0x0137, 2),
Range16.init(0x013a, 0x0148, 2),
Range16.init(0x014b, 0x0177, 2),
Range16.init(0x017a, 0x017e, 2),
Range16.init(0x017f, 0x0180, 1),
Range16.init(0x0183, 0x0185, 2),
Range16.init(0x0188, 0x018c, 4),
Range16.init(0x0192, 0x0195, 3),
Range16.init(0x0199, 0x019a, 1),
Range16.init(0x019e, 0x01a1, 3),
Range16.init(0x01a3, 0x01a5, 2),
Range16.init(0x01a8, 0x01ad, 5),
Range16.init(0x01b0, 0x01b4, 4),
Range16.init(0x01b6, 0x01b9, 3),
Range16.init(0x01bd, 0x01bf, 2),
Range16.init(0x01c5, 0x01c6, 1),
Range16.init(0x01c8, 0x01c9, 1),
Range16.init(0x01cb, 0x01cc, 1),
Range16.init(0x01ce, 0x01dc, 2),
Range16.init(0x01dd, 0x01ef, 2),
Range16.init(0x01f2, 0x01f3, 1),
Range16.init(0x01f5, 0x01f9, 4),
Range16.init(0x01fb, 0x021f, 2),
Range16.init(0x0223, 0x0233, 2),
Range16.init(0x023c, 0x023f, 3),
Range16.init(0x0240, 0x0242, 2),
Range16.init(0x0247, 0x024f, 2),
Range16.init(0x0250, 0x0254, 1),
Range16.init(0x0256, 0x0257, 1),
Range16.init(0x0259, 0x025b, 2),
Range16.init(0x025c, 0x0260, 4),
Range16.init(0x0261, 0x0265, 2),
Range16.init(0x0266, 0x0268, 2),
Range16.init(0x0269, 0x026c, 1),
Range16.init(0x026f, 0x0271, 2),
Range16.init(0x0272, 0x0275, 3),
Range16.init(0x027d, 0x0283, 3),
Range16.init(0x0287, 0x028c, 1),
Range16.init(0x0292, 0x029d, 11),
Range16.init(0x029e, 0x0345, 167),
Range16.init(0x0371, 0x0373, 2),
Range16.init(0x0377, 0x037b, 4),
Range16.init(0x037c, 0x037d, 1),
Range16.init(0x03ac, 0x03af, 1),
Range16.init(0x03b1, 0x03ce, 1),
Range16.init(0x03d0, 0x03d1, 1),
Range16.init(0x03d5, 0x03d7, 1),
Range16.init(0x03d9, 0x03ef, 2),
Range16.init(0x03f0, 0x03f3, 1),
Range16.init(0x03f5, 0x03fb, 3),
Range16.init(0x0430, 0x045f, 1),
Range16.init(0x0461, 0x0481, 2),
Range16.init(0x048b, 0x04bf, 2),
Range16.init(0x04c2, 0x04ce, 2),
Range16.init(0x04cf, 0x052f, 2),
Range16.init(0x0561, 0x0586, 1),
Range16.init(0x13f8, 0x13fd, 1),
Range16.init(0x1c80, 0x1c88, 1),
Range16.init(0x1d79, 0x1d7d, 4),
Range16.init(0x1e01, 0x1e95, 2),
Range16.init(0x1e9b, 0x1ea1, 6),
Range16.init(0x1ea3, 0x1eff, 2),
Range16.init(0x1f00, 0x1f07, 1),
Range16.init(0x1f10, 0x1f15, 1),
Range16.init(0x1f20, 0x1f27, 1),
Range16.init(0x1f30, 0x1f37, 1),
Range16.init(0x1f40, 0x1f45, 1),
Range16.init(0x1f51, 0x1f57, 2),
Range16.init(0x1f60, 0x1f67, 1),
Range16.init(0x1f70, 0x1f7d, 1),
Range16.init(0x1fb0, 0x1fb1, 1),
Range16.init(0x1fbe, 0x1fd0, 18),
Range16.init(0x1fd1, 0x1fe0, 15),
Range16.init(0x1fe1, 0x1fe5, 4),
Range16.init(0x214e, 0x2184, 54),
Range16.init(0x2c30, 0x2c5e, 1),
Range16.init(0x2c61, 0x2c65, 4),
Range16.init(0x2c66, 0x2c6c, 2),
Range16.init(0x2c73, 0x2c76, 3),
Range16.init(0x2c81, 0x2ce3, 2),
Range16.init(0x2cec, 0x2cee, 2),
Range16.init(0x2cf3, 0x2d00, 13),
Range16.init(0x2d01, 0x2d25, 1),
Range16.init(0x2d27, 0x2d2d, 6),
Range16.init(0xa641, 0xa66d, 2),
Range16.init(0xa681, 0xa69b, 2),
Range16.init(0xa723, 0xa72f, 2),
Range16.init(0xa733, 0xa76f, 2),
Range16.init(0xa77a, 0xa77c, 2),
Range16.init(0xa77f, 0xa787, 2),
Range16.init(0xa78c, 0xa791, 5),
Range16.init(0xa793, 0xa797, 4),
Range16.init(0xa799, 0xa7a9, 2),
Range16.init(0xa7b5, 0xa7b7, 2),
Range16.init(0xab53, 0xab70, 29),
Range16.init(0xab71, 0xabbf, 1),
Range16.init(0xff41, 0xff5a, 1),
};
break :init r[0..];
},
.r32 = init: {
var r = [_]Range32{
Range32.init(0x10428, 0x1044f, 1),
Range32.init(0x104d8, 0x104fb, 1),
Range32.init(0x10cc0, 0x10cf2, 1),
Range32.init(0x118c0, 0x118df, 1),
Range32.init(0x1e922, 0x1e943, 1),
};
break :init r[0..];
},
.latin_offset = 4,
};
const foldM = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0399, 0x03b9, 32),
Range16.init(0x1fbe, 0x1fbe, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const foldMn = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0399, 0x03b9, 32),
Range16.init(0x1fbe, 0x1fbe, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
// FoldScript maps a script name to a table of
// code points outside the script that are equivalent under
// simple case folding to code points inside the script.
// If there is no entry for a script name, there are no such points.
pub const FoldScript = enum {
Common,
Greek,
Inherited,
pub fn list() []FoldScript {
return []FoldScript{ FoldScript.Common, FoldScript.Greek, FoldScript.Inherited };
}
pub fn table(self: FoldScript) *RangeTable {
return switch (self) {
FoldScript.Common => foldCommon,
FoldScript.Greek => foldGreek,
FoldScript.Inherited => foldInherited,
else => unreachable,
};
}
};
const foldCommon = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x039c, 0x03bc, 32)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const foldGreek = RangeTable{
.r16 = init: {
var r = [_]Range16{Range16.init(0x00b5, 0x0345, 656)};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
const foldInherited = RangeTable{
.r16 = init: {
var r = [_]Range16{
Range16.init(0x0399, 0x03b9, 32),
Range16.init(0x1fbe, 0x1fbe, 1),
};
break :init r[0..];
},
.r32 = [_]Range32{},
.latin_offset = 0,
};
// Range entries: 3587 16-bit, 1554 32-bit, 5141 total.
// Range bytes: 21522 16-bit, 18648 32-bit, 40170 total.
// Fold orbit bytes: 88 pairs, 352 bytes
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/zunicode.zig | pub const tables = @import("tables.zig");
const warn = @import("std").debug.warn;
pub const utf8 = @import("utf8.zig");
pub const utf16 = @import("utf16.zig");
pub fn is16(ranges: []const tables.Range16, r: u16) bool {
if (ranges.len <= tables.linear_max or r <= tables.linear_max) {
for (ranges) |*range| {
if (r < range.lo) {
return false;
}
if (r <= range.hi) {
return range.stride == 1 or (r - range.lo) % range.stride == 0;
}
}
return false;
}
var lo: usize = 0;
var hi: usize = ranges.len;
while (lo < hi) {
const m: usize = lo + ((hi - lo) / 2);
const range = &ranges[m];
if (range.lo <= r and r <= range.hi) {
return range.stride == 1 or (r - range.lo) % range.stride == 0;
}
if (r < range.lo) {
hi = m;
} else {
lo = m + 1;
}
}
return false;
}
pub fn is32(ranges: []tables.Range32, r: u32) bool {
if (ranges.len <= tables.linear_max) {
for (ranges) |*range| {
if (r < range.lo) {
return false;
}
if (r <= range.hi) {
return range.stride == 1 or (r - range.lo) % range.stride == 0;
}
}
return false;
}
var lo: usize = 0;
var hi: usize = ranges.len;
while (lo < hi) {
const m: usize = lo + (hi - lo) / 2;
const range = &ranges[m];
if (range.lo <= r and r <= range.hi) {
return range.stride == 1 or (r - range.lo) % range.stride == 0;
}
if (r < range.lo) {
hi = m;
} else {
lo = m + 1;
}
}
return false;
}
pub fn is(range_tab: *const tables.RangeTable, r: i32) bool {
if (range_tab.r16.len > 0 and r <= @intCast(i32, range_tab.r16[range_tab.r16.len - 1].hi)) {
return is16(range_tab.r16, @intCast(u16, r));
}
if (range_tab.r32.len > 0 and r > @intCast(i32, range_tab.r32[0].lo)) {
return is32(range_tab.r32, @intCast(u32, r));
}
return false;
}
pub fn isExcludingLatin(range_tab: *const tables.RangeTable, r: i32) bool {
const off = range_tab.latin_offset;
const r16_len = range_tab.r16.len;
if (r16_len > off and r <= @intCast(i32, range_tab.r16[r16_len - 1].hi)) {
return is16(range_tab.r16[off..], @intCast(u16, r));
}
if (range_tab.r32.len > 0 and r >= @intCast(i32, range_tab.r32[0].lo)) {
return is32(range_tab.r32, @intCast(u32, r));
}
return false;
}
/// isUpper reports whether the rune is an upper case
pub fn isUpper(rune: i32) bool {
if (rune <= tables.max_latin1) {
const p = tables.properties[@intCast(usize, rune)];
return (p & tables.pLmask) == tables.pLu;
}
return isExcludingLatin(tables.Upper, rune);
}
// isLower reports whether the rune is a lower case
pub fn isLower(rune: i32) bool {
if (rune <= tables.max_latin1) {
const p = tables.properties[@intCast(usize, rune)];
return (p & tables.pLmask) == tables.pLl;
}
return isExcludingLatin(tables.Lower, rune);
}
// IsTitle reports whether the rune is a title case
pub fn isTitle(rune: i32) bool {
if (rune <= tables.max_latin1) {
return false;
}
return isExcludingLatin(tables.Title, rune);
}
const toResult = struct {
mapped: i32,
found_mapping: bool,
};
fn to_case(_case: tables.Case, rune: i32, case_range: []tables.CaseRange) toResult {
if (_case.rune() < 0 or tables.Case.Max.rune() <= _case.rune()) {
return toResult{
.mapped = tables.replacement_char,
.found_mapping = false,
};
}
var lo: usize = 0;
var hi = case_range.len;
while (lo < hi) {
const m = lo + (hi - lo) / 2;
const cr = case_range[m];
if (@intCast(i32, cr.lo) <= rune and rune <= @intCast(i32, cr.hi)) {
const delta = cr.delta[@intCast(usize, _case.rune())];
if (delta > @intCast(i32, tables.max_rune)) {
// In an Upper-Lower sequence, which always starts with
// an UpperCase letter, the real deltas always look like:
//{0, 1, 0} UpperCase (Lower is next)
//{-1, 0, -1} LowerCase (Upper, Title are previous)
// The characters at even offsets from the beginning of the
// sequence are upper case; the ones at odd offsets are lower.
// The correct mapping can be done by clearing or setting the low
// bit in the sequence offset.
// The constants UpperCase and TitleCase are even while LowerCase
// is odd so we take the low bit from _case.
var i: i32 = 1;
return toResult{
.mapped = @intCast(i32, cr.lo) + ((rune - @intCast(i32, cr.lo)) & ~i | (_case.rune() & 1)),
.found_mapping = true,
};
}
return toResult{
.mapped = @intCast(i32, @intCast(i32, rune) + delta),
.found_mapping = true,
};
}
if (rune < @intCast(i32, cr.lo)) {
hi = m;
} else {
lo = m + 1;
}
}
return toResult{
.mapped = rune,
.found_mapping = false,
};
}
// to maps the rune to the specified case: UpperCase, LowerCase, or TitleCase.
pub fn to(case: tables.Case, rune: i32) i32 {
const v = to_case(case, rune, tables.CaseRanges);
return v.mapped;
}
pub fn toUpper(rune: i32) i32 {
if (rune <= tables.max_ascii) {
if ('a' <= rune and rune <= 'z') {
return rune - ('a' - 'A');
}
return rune;
}
return to(tables.Case.Upper, rune);
}
pub fn toLower(rune: i32) i32 {
if (rune <= tables.max_ascii) {
if ('A' <= rune and rune <= 'Z') {
return rune + ('a' - 'A');
}
return rune;
}
return to(tables.Case.Lower, rune);
}
pub fn toTitle(rune: i32) i32 {
if (rune <= tables.max_ascii) {
if ('a' <= rune and rune <= 'z') {
return rune - ('a' - 'A');
}
return rune;
}
return to(tables.Case.Title, rune);
}
// SimpleFold iterates over Unicode code points equivalent under
// the Unicode-defined simple case folding. Among the code points
// equivalent to rune (including rune itself), SimpleFold returns the
// smallest rune > r if one exists, or else the smallest rune >= 0.
// If r is not a valid Unicode code point, SimpleFold(r) returns r.
//
// For example:
// SimpleFold('A') = 'a'
// SimpleFold('a') = 'A'
//
// SimpleFold('K') = 'k'
// SimpleFold('k') = '\u212A' (Kelvin symbol, K)
// SimpleFold('\u212A') = 'K'
//
// SimpleFold('1') = '1'
//
// SimpleFold(-2) = -2
//
pub fn simpleFold(r: u32) u32 {
if (r < 0 or r > tables.max_rune) {
return r;
}
const idx = @intCast(usize, r);
if (idx < tables.asciiFold.len) {
return @intCast(u32, tables.asciiFold[idx]);
}
var lo: usize = 0;
var hi = caseOrbit.len;
while (lo < hi) {
const m = lo + (hi - lo) / 2;
if (@intCast(u32, tables.caseOrbit[m].from) < r) {
lo = m + 1;
} else {
hi = m;
}
}
if (lo < tables.caseOrbit.len and @intCast(tables.caseOrbit[lo].from) == r) {
return @intCast(u32, tables.caseOrbit[lo].to);
}
// No folding specified. This is a one- or two-element
// equivalence class containing rune and ToLower(rune)
// and ToUpper(rune) if they are different from rune
const l = toLower(r);
if (l != r) {
return l;
}
return toUpper(r);
}
pub const graphic_ranges = [_]*const tables.RangeTable{
tables.L, tables.M, tables.N, tables.P, tables.S, tables.Zs,
};
pub const print_ranges = [_]*const tables.RangeTable{
tables.L, tables.M, tables.N, tables.P, tables.S,
};
pub fn in(r: i32, ranges: []const *const tables.RangeTable) bool {
for (ranges) |inside| {
if (is(inside, r)) {
return true;
}
}
return false;
}
// IsGraphic reports whether the rune is defined as a Graphic by Unicode.
// Such characters include letters, marks, numbers, punctuation, symbols, and
// spaces, from categories L, M, N, P, S, Zs.
pub fn isGraphic(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pg != 0;
}
return in(r, graphic_ranges[0..]);
}
// IsPrint reports whether the rune is defined as printable by Go. Such
// characters include letters, marks, numbers, punctuation, symbols, and the
// ASCII space character, from categories L, M, N, P, S and the ASCII space
// character. This categorization is the same as IsGraphic except that the
// only spacing character is ASCII space, U+0020
pub fn isPrint(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pp != 0;
}
return in(r, print_ranges[0..]);
}
pub fn isOneOf(ranges: []*tables.RangeTable, r: u32) bool {
return in(r, ranges);
}
// IsControl reports whether the rune is a control character.
// The C (Other) Unicode category includes more code points
// such as surrogates; use Is(C, r) to test for them.
pub fn isControl(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pC != 0;
}
return false;
}
// IsLetter reports whether the rune is a letter (category L).
pub fn isLetter(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pLmask != 0;
}
return isExcludingLatin(tables.Letter, r);
}
// IsMark reports whether the rune is a mark character (category M).
pub fn isMark(r: i32) bool {
// There are no mark characters in Latin-1.
return isExcludingLatin(tables.Mark, r);
}
// IsNumber reports whether the rune is a number (category N).
pub fn isNumber(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pN != 0;
}
return isExcludingLatin(tables.Number, r);
}
// IsPunct reports whether the rune is a Unicode punctuation character
// (category P).
pub fn isPunct(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pP != 0;
}
return is(tables.Punct, r);
}
// IsSpace reports whether the rune is a space character as defined
// by Unicode's White Space property; in the Latin-1 space
// this is
// '\t', '\n', '\v', '\f', '\r', ' ', U+0085 (NEL), U+00A0 (NBSP).
// Other definitions of spacing characters are set by category
// Z and property Pattern_White_Space.
pub fn isSpace(r: i32) bool {
if (r <= tables.max_latin1) {
switch (r) {
'\t', '\n', 0x0B, 0x0C, '\r', ' ', 0x85, 0xA0 => return true,
else => return false,
}
}
return isExcludingLatin(tables.White_Space, r);
}
// IsSymbol reports whether the rune is a symbolic character.
pub fn isSymbol(r: i32) bool {
if (r <= tables.max_latin1) {
return tables.properties[@intCast(usize, r)] & tables.pS != 0;
}
return isExcludingLatin(tables.Symbol, r);
}
// isDigit reports whether the rune is a decimal digit.
pub fn isDigit(r: i32) bool {
if (r <= tables.max_latin1) {
return '0' <= r and r <= '9';
}
return isExcludingLatin(tables.Digit, r);
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/zunicode_test.zig | const std = @import("std");
const tables = @import("tables.zig");
const unicode = @import("zunicode.zig");
const testing = std.testing;
const test_failed = error.TestFailed;
const notletterTest = [_]i32{
0x20,
0x35,
0x375,
0x619,
0x700,
0x1885,
0xfffe,
0x1ffff,
0x10ffff,
};
const upper_test = [_]i32{
0x41,
0xc0,
0xd8,
0x100,
0x139,
0x14a,
0x178,
0x181,
0x376,
0x3cf,
0x13bd,
0x1f2a,
0x2102,
0x2c00,
0x2c10,
0x2c20,
0xa650,
0xa722,
0xff3a,
0x10400,
0x1d400,
0x1d7ca,
};
const notupperTest = [_]i32{
0x40,
0x5b,
0x61,
0x185,
0x1b0,
0x377,
0x387,
0x2150,
0xab7d,
0xffff,
0x10000,
};
test "isUpper" {
for (upper_test) |r, i| {
testing.expect(unicode.isUpper(r));
}
for (notupperTest) |r, i| {
testing.expect(!unicode.isUpper(r));
}
for (notletterTest) |r, i| {
testing.expect(!unicode.isUpper(r));
}
}
const caseT = struct {
case: tables.Case,
in: i32,
out: i32,
fn init(case: tables.Case, in: i32, out: i32) caseT {
return caseT{ .case = case, .in = in, .out = out };
}
};
const case_test = [_]caseT{
// ASCII (special-cased so test carefully)
caseT.init(tables.Case.Upper, '\n', '\n'),
caseT.init(tables.Case.Upper, 'a', 'A'),
caseT.init(tables.Case.Upper, 'A', 'A'),
caseT.init(tables.Case.Upper, '7', '7'),
caseT.init(tables.Case.Lower, '\n', '\n'),
caseT.init(tables.Case.Lower, 'a', 'a'),
caseT.init(tables.Case.Lower, 'A', 'a'),
caseT.init(tables.Case.Lower, '7', '7'),
caseT.init(tables.Case.Title, '\n', '\n'),
caseT.init(tables.Case.Title, 'a', 'A'),
caseT.init(tables.Case.Title, 'A', 'A'),
caseT.init(tables.Case.Title, '7', '7'),
// Latin-1: easy to read the tests!
caseT.init(tables.Case.Upper, 0x80, 0x80),
// caseT.init(tables.Case.Upper, 'Å', 'Å'),
// caseT.init(tables.Case.Upper, 'å', 'Å'),
caseT.init(tables.Case.Lower, 0x80, 0x80),
// caseT.init(tables.Case.Lower, 'Å', 'å'),
// caseT.init(tables.Case.Lower, 'å', 'å'),
caseT.init(tables.Case.Title, 0x80, 0x80),
// caseT.init(tables.Case.Title, 'Å', 'Å'),
// caseT.init(tables.Case.Title, 'å', 'Å'),
// 0131;LATIN SMALL LETTER DOTLESS I;Ll;0;L;;;;;N;;;0049;;0049
caseT.init(tables.Case.Upper, 0x0131, 'I'),
caseT.init(tables.Case.Lower, 0x0131, 0x0131),
caseT.init(tables.Case.Title, 0x0131, 'I'),
// 0133;LATIN SMALL LIGATURE IJ;Ll;0;L;<compat> 0069 006A;;;;N;LATIN SMALL LETTER I J;;0132;;0132
caseT.init(tables.Case.Upper, 0x0133, 0x0132),
caseT.init(tables.Case.Lower, 0x0133, 0x0133),
caseT.init(tables.Case.Title, 0x0133, 0x0132),
// 212A;KELVIN SIGN;Lu;0;L;004B;;;;N;DEGREES KELVIN;;;006B;
caseT.init(tables.Case.Upper, 0x212A, 0x212A),
caseT.init(tables.Case.Lower, 0x212A, 'k'),
caseT.init(tables.Case.Title, 0x212A, 0x212A),
// From an UpperLower sequence
// A640;CYRILLIC CAPITAL LETTER ZEMLYA;Lu;0;L;;;;;N;;;;A641;
caseT.init(tables.Case.Upper, 0xA640, 0xA640),
caseT.init(tables.Case.Lower, 0xA640, 0xA641),
caseT.init(tables.Case.Title, 0xA640, 0xA640),
// A641;CYRILLIC SMALL LETTER ZEMLYA;Ll;0;L;;;;;N;;;A640;;A640
caseT.init(tables.Case.Upper, 0xA641, 0xA640),
caseT.init(tables.Case.Lower, 0xA641, 0xA641),
caseT.init(tables.Case.Title, 0xA641, 0xA640),
// A64E;CYRILLIC CAPITAL LETTER NEUTRAL YER;Lu;0;L;;;;;N;;;;A64F;
caseT.init(tables.Case.Upper, 0xA64E, 0xA64E),
caseT.init(tables.Case.Lower, 0xA64E, 0xA64F),
caseT.init(tables.Case.Title, 0xA64E, 0xA64E),
// A65F;CYRILLIC SMALL LETTER YN;Ll;0;L;;;;;N;;;A65E;;A65E
caseT.init(tables.Case.Upper, 0xA65F, 0xA65E),
caseT.init(tables.Case.Lower, 0xA65F, 0xA65F),
caseT.init(tables.Case.Title, 0xA65F, 0xA65E),
// From another UpperLower sequence
// 0139;LATIN CAPITAL LETTER L WITH ACUTE;Lu;0;L;004C 0301;;;;N;LATIN CAPITAL LETTER L ACUTE;;;013A;
caseT.init(tables.Case.Upper, 0x0139, 0x0139),
caseT.init(tables.Case.Lower, 0x0139, 0x013A),
caseT.init(tables.Case.Title, 0x0139, 0x0139),
// 013F;LATIN CAPITAL LETTER L WITH MIDDLE DOT;Lu;0;L;<compat> 004C 00B7;;;;N;;;;0140;
caseT.init(tables.Case.Upper, 0x013f, 0x013f),
caseT.init(tables.Case.Lower, 0x013f, 0x0140),
caseT.init(tables.Case.Title, 0x013f, 0x013f),
// 0148;LATIN SMALL LETTER N WITH CARON;Ll;0;L;006E 030C;;;;N;LATIN SMALL LETTER N HACEK;;0147;;0147
caseT.init(tables.Case.Upper, 0x0148, 0x0147),
caseT.init(tables.Case.Lower, 0x0148, 0x0148),
caseT.init(tables.Case.Title, 0x0148, 0x0147),
// tables.Case.Lower lower than tables.Case.Upper.
// AB78;CHEROKEE SMALL LETTER GE;Ll;0;L;;;;;N;;;13A8;;13A8
caseT.init(tables.Case.Upper, 0xab78, 0x13a8),
caseT.init(tables.Case.Lower, 0xab78, 0xab78),
caseT.init(tables.Case.Title, 0xab78, 0x13a8),
caseT.init(tables.Case.Upper, 0x13a8, 0x13a8),
caseT.init(tables.Case.Lower, 0x13a8, 0xab78),
caseT.init(tables.Case.Title, 0x13a8, 0x13a8),
// Last block in the 5.1.0 table
// 10400;DESERET CAPITAL LETTER LONG I;Lu;0;L;;;;;N;;;;10428;
caseT.init(tables.Case.Upper, 0x10400, 0x10400),
caseT.init(tables.Case.Lower, 0x10400, 0x10428),
caseT.init(tables.Case.Title, 0x10400, 0x10400),
// 10427;DESERET CAPITAL LETTER EW;Lu;0;L;;;;;N;;;;1044F;
caseT.init(tables.Case.Upper, 0x10427, 0x10427),
caseT.init(tables.Case.Lower, 0x10427, 0x1044F),
caseT.init(tables.Case.Title, 0x10427, 0x10427),
// 10428;DESERET SMALL LETTER LONG I;Ll;0;L;;;;;N;;;10400;;10400
caseT.init(tables.Case.Upper, 0x10428, 0x10400),
caseT.init(tables.Case.Lower, 0x10428, 0x10428),
caseT.init(tables.Case.Title, 0x10428, 0x10400),
// 1044F;DESERET SMALL LETTER EW;Ll;0;L;;;;;N;;;10427;;10427
caseT.init(tables.Case.Upper, 0x1044F, 0x10427),
caseT.init(tables.Case.Lower, 0x1044F, 0x1044F),
caseT.init(tables.Case.Title, 0x1044F, 0x10427),
// First one not in the 5.1.0 table
// 10450;SHAVIAN LETTER PEEP;Lo;0;L;;;;;N;;;;;
caseT.init(tables.Case.Upper, 0x10450, 0x10450),
caseT.init(tables.Case.Lower, 0x10450, 0x10450),
caseT.init(tables.Case.Title, 0x10450, 0x10450),
// Non-letters with case.
caseT.init(tables.Case.Lower, 0x2161, 0x2171),
caseT.init(tables.Case.Upper, 0x0345, 0x0399),
};
test "toUpper" {
for (case_test) |c, idx| {
switch (c.case) {
tables.Case.Upper => {
const r = unicode.toUpper(c.in);
testing.expectEqual(c.out, r);
},
else => {},
}
}
}
test "toLower" {
for (case_test) |c, idx| {
switch (c.case) {
tables.Case.Lower => {
const r = unicode.toLower(c.in);
testing.expectEqual(c.out, r);
},
else => {},
}
}
}
test "toLower" {
for (case_test) |c, idx| {
switch (c.case) {
tables.Case.Title => {
const r = unicode.toTitle(c.in);
testing.expectEqual(c.out, r);
},
else => {},
}
}
}
test "to" {
for (case_test) |c| {
const r = unicode.to(c.case, c.in);
testing.expectEqual(c.out, r);
}
}
test "isControlLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isControl(i);
var want: bool = false;
if (0x00 <= i and i <= 0x1F) {
want = true;
} else if (0x7F <= i and i <= 0x9F) {
want = true;
}
testing.expectEqual(want, got);
}
}
test "isLetterLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isLetter(i);
const want = unicode.is(tables.Letter, i);
testing.expectEqual(want, got);
}
}
test "isUpperLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isUpper(i);
const want = unicode.is(tables.Upper, i);
testing.expectEqual(want, got);
}
}
test "isLowerLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isLower(i);
const want = unicode.is(tables.Lower, i);
testing.expectEqual(want, got);
}
}
test "isNumberLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isNumber(i);
const want = unicode.is(tables.Number, i);
testing.expectEqual(want, got);
}
}
test "isPrintLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isPrint(i);
var want = unicode.in(i, unicode.print_ranges[0..]);
if (i == ' ') {
want = true;
}
testing.expectEqual(want, got);
}
}
test "isGraphicLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isGraphic(i);
var want = unicode.in(i, unicode.graphic_ranges[0..]);
testing.expectEqual(want, got);
}
}
test "isPunctLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isPunct(i);
const want = unicode.is(tables.Punct, i);
testing.expectEqual(want, got);
}
}
test "isSpaceLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isSpace(i);
const want = unicode.is(tables.White_Space, i);
testing.expectEqual(want, got);
}
}
test "isSymbolLatin1" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isSymbol(i);
const want = unicode.is(tables.Symbol, i);
testing.expectEqual(want, got);
}
}
const test_digit = [_]i32{
0x0030,
0x0039,
0x0661,
0x06F1,
0x07C9,
0x0966,
0x09EF,
0x0A66,
0x0AEF,
0x0B66,
0x0B6F,
0x0BE6,
0x0BEF,
0x0C66,
0x0CEF,
0x0D66,
0x0D6F,
0x0E50,
0x0E59,
0x0ED0,
0x0ED9,
0x0F20,
0x0F29,
0x1040,
0x1049,
0x1090,
0x1091,
0x1099,
0x17E0,
0x17E9,
0x1810,
0x1819,
0x1946,
0x194F,
0x19D0,
0x19D9,
0x1B50,
0x1B59,
0x1BB0,
0x1BB9,
0x1C40,
0x1C49,
0x1C50,
0x1C59,
0xA620,
0xA629,
0xA8D0,
0xA8D9,
0xA900,
0xA909,
0xAA50,
0xAA59,
0xFF10,
0xFF19,
0x104A1,
0x1D7CE,
};
const test_letter = [_]i32{
0x0041,
0x0061,
0x00AA,
0x00BA,
0x00C8,
0x00DB,
0x00F9,
0x02EC,
0x0535,
0x06E6,
0x093D,
0x0A15,
0x0B99,
0x0DC0,
0x0EDD,
0x1000,
0x1200,
0x1312,
0x1401,
0x1885,
0x2C00,
0xA800,
0xF900,
0xFA30,
0xFFDA,
0xFFDC,
0x10000,
0x10300,
0x10400,
0x20000,
0x2F800,
0x2FA1D,
};
test "isDigit" {
for (test_digit) |r| {
testing.expect(unicode.isDigit(r));
}
for (test_letter) |r| {
testing.expect(!unicode.isDigit(r));
}
}
test "DigitOptimization" {
var i: i32 = 0;
while (i <= tables.max_latin1) : (i += 1) {
const got = unicode.isDigit(i);
const want = unicode.is(tables.Digit, i);
testing.expectEqual(want, got);
}
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/zunicode/src/utf8.zig | const assert = @import("std").debug.assert;
pub const rune_error: i32 = 0xfffd;
pub const max_rune: i32 = 0x10ffff;
pub const rune_self: i32 = 0x80;
pub const utf_max: usize = 4;
const surrogate_min: i32 = 0xD800;
const surrogate_max: i32 = 0xDFFF;
const t1: i32 = 0x00; // 0000 0000
const tx: i32 = 0x80; // 1000 0000
const t2: i32 = 0xC0; // 1100 0000
const t3: i32 = 0xE0; // 1110 0000
const t4: i32 = 0xF0; // 1111 0000
const t5: i32 = 0xF8; // 1111 1000
const maskx: i32 = 0x3F; // 0011 1111
const mask2: i32 = 0x1F; // 0001 1111
const mask3: i32 = 0x0F; // 0000 1111
const mask4: i32 = 0x07; // 0000 0111
const rune1Max = (1 << 7) - 1;
const rune2Max = (1 << 11) - 1;
const rune3Max = (1 << 16) - 1;
// The default lowest and highest continuation byte.
const locb: u8 = 0x80; // 1000 0000
const hicb: u8 = 0xBF; // 1011 1111
// These names of these constants are chosen to give nice alignment in the
// table below. The first nibble is an index into acceptRanges or F for
// special one-byte cases. The second nibble is the Rune length or the
// Status for the special one-byte case.
const xx: u8 = 0xF1; // invalid: size 1
const as: u8 = 0xF0; // ASCII: size 1
const s1: u8 = 0x02; // accept 0, size 2
const s2: u8 = 0x13; // accept 1, size 3
const s3: u8 = 0x03; // accept 0, size 3
const s4: u8 = 0x23; // accept 2, size 3
const s5: u8 = 0x34; // accept 3, size 4
const s6: u8 = 0x04; // accept 0, size 4
const s7: u8 = 0x44; // accept 4, size 4
// first is information about the first byte in a UTF-8 sequence.
const first = [_]u8{
// 1 2 3 4 5 6 7 8 9 A B C D E F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x00-0x0F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x10-0x1F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x20-0x2F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x30-0x3F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x40-0x4F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x50-0x5F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x60-0x6F
as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x70-0x7F
// 1 2 3 4 5 6 7 8 9 A B C D E F
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x80-0x8F
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x90-0x9F
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xA0-0xAF
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xB0-0xBF
xx, xx, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xC0-0xCF
s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xD0-0xDF
s2, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s4, s3, s3, // 0xE0-0xEF
s5, s6, s6, s6, s7, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xF0-0xFF
};
const acceptRange = struct {
lo: u8,
hi: u8,
fn init(lo: u8, hi: u8) acceptRange {
return acceptRange{ .lo = lo, .hi = hi };
}
};
const accept_ranges = [_]acceptRange{
acceptRange.init(locb, hicb),
acceptRange.init(0xA0, hicb),
acceptRange.init(locb, 0x9F),
acceptRange.init(0x90, hicb),
acceptRange.init(locb, 0x8F),
};
pub fn fullRune(p: []const u8) bool {
const n = p.len;
if (n == 0) {
return false;
}
const x = first[p[0]];
if (n >= @intCast(usize, x & 7)) {
return true; // ASCII, invalid or valid.
}
// Must be short or invalid
const accept = accept_ranges[@intCast(usize, x >> 4)];
if (n > 1 and (p[1] < accept.lo or accept.hi < p[1])) {
return true;
} else if (n > 2 and (p[0] < locb or hicb < p[2])) {
return true;
}
return false;
}
pub const Rune = struct {
value: i32,
size: usize,
};
/// decodeRune unpacks the first UTF-8 encoding in p and returns the rune and
/// its width in bytes. If p is empty it returns RuneError. Otherwise, if
/// the encoding is invalid, it returns RuneError. Both are impossible
/// results for correct, non-empty UTF-8.
///
/// An encoding is invalid if it is incorrect UTF-8, encodes a rune that is
/// out of range, or is not the shortest possible UTF-8 encoding for the
/// value. No other validation is performed.
pub fn decodeRune(p: []const u8) !Rune {
const n = p.len;
if (n < 1) {
return error.RuneError;
}
const p0 = p[0];
const x = first[p[0]];
if (x >= as) {
// The following code simulates an additional check for x == xx and
// handling the ASCII and invalid cases accordingly. This mask-and-or
// approach prevents an additional branch.
const mask = @intCast(i32, x) << 31 >> 31;
return Rune{
.value = (@intCast(i32, p[0]) & ~mask) | (rune_error & mask),
.size = 1,
};
}
const sz = x & 7;
const accept = accept_ranges[@intCast(usize, x >> 4)];
if (n < @intCast(usize, sz)) {
return error.RuneError;
}
const b1 = p[1];
if (b1 < accept.lo or accept.hi < b1) {
return error.RuneError;
}
if (sz == 2) {
return Rune{
.value = @intCast(i32, p0 & @intCast(u8, mask2)) << 6 | @intCast(i32, b1 & @intCast(u8, maskx)),
.size = 2,
};
}
const b2 = p[2];
if (b2 < locb or hicb < b2) {
return error.RuneError;
}
if (sz == 3) {
return Rune{
.value = @intCast(i32, p0 & @intCast(u8, mask3)) << 12 | @intCast(i32, b1 & @intCast(u8, maskx)) << 6 | @intCast(i32, b2 & @intCast(u8, maskx)),
.size = 3,
};
}
const b3 = p[3];
if (b3 < locb or hicb < b3) {
return error.RuneError;
}
return Rune{
.value = @intCast(i32, p0 & @intCast(u8, mask4)) << 18 | @intCast(i32, b1 & @intCast(u8, maskx)) << 12 | @intCast(i32, b2 & @intCast(u8, maskx)) << 6 | @intCast(i32, b3 & @intCast(u8, maskx)),
.size = 4,
};
}
pub fn runeLen(r: i32) !usize {
if (r <= rune1Max) {
return 1;
} else if (r <= rune2Max) {
return 2;
} else if (surrogate_min <= r and r <= surrogate_min) {
return error.RuneError;
} else if (r <= rune3Max) {
return 3;
} else if (r <= max_rune) {
return 4;
}
return error.RuneError;
}
/// runeStart reports whether the byte could be the first byte of an encoded,
/// possibly invalid rune. Second and subsequent bytes always have the top two
/// bits set to 10.
pub fn runeStart(b: u8) bool {
return b & 0xC0 != 0x80;
}
// decodeLastRune unpacks the last UTF-8 encoding in p and returns the rune and
// its width in bytes. If p is empty it returns RuneError. Otherwise, if
// the encoding is invalid, it returns RuneError Both are impossible
// results for correct, non-empty UTF-8.
//
// An encoding is invalid if it is incorrect UTF-8, encodes a rune that is
// out of range, or is not the shortest possible UTF-8 encoding for the
// value. No other validation is performed.
pub fn decodeLastRune(p: []const u8) !Rune {
const end = p.len;
if (end < 1) {
return error.RuneError;
}
var start = end - 1;
const r = @intCast(i32, p[start]);
if (r < rune_self) {
return Rune{
.value = r,
.size = 1,
};
}
// guard against O(n^2) behavior when traversing
// backwards through strings with long sequences of
// invalid UTF-8.
var lim = end - utf_max;
if (lim < 0) {
lim = 0;
}
while (start >= lim) {
if (runeStart(p[start])) {
break;
}
start -= 1;
}
if (start < 0) {
start = 0;
}
var rune = try decodeRune(p[start..end]);
if (start + rune.size != end) {
return error.RuneError;
}
return rune;
}
pub fn encodeRune(p: []u8, r: i32) !usize {
const i = r;
if (i <= rune1Max) {
p[0] = @intCast(u8, r);
return 1;
} else if (i <= rune2Max) {
_ = p[1];
p[0] = @intCast(u8, t2 | (r >> 6));
p[1] = @intCast(u8, tx | (r & maskx));
return 2;
} else if (i > max_rune or surrogate_min <= i and i <= surrogate_min) {
return error.RuneError;
} else if (i <= rune3Max) {
_ = p[2];
p[0] = @intCast(u8, t3 | (r >> 12));
p[1] = @intCast(u8, tx | ((r >> 6) & maskx));
p[2] = @intCast(u8, tx | (r & maskx));
return 3;
} else {
_ = p[3];
p[0] = @intCast(u8, t4 | (r >> 18));
p[1] = @intCast(u8, tx | ((r >> 12) & maskx));
p[2] = @intCast(u8, tx | ((r >> 6) & maskx));
p[3] = @intCast(u8, tx | (r & maskx));
return 4;
}
return error.RuneError;
}
pub const Iterator = struct {
src: []const u8,
pos: usize,
pub fn init(src: []const u8) Iterator {
return Iterator{
.src = src,
.pos = 0,
};
}
// resets the cursor position to index
pub fn reset(self: *Iterator, index: usize) void {
assert(index < self.src.len);
self.pos = index;
}
pub fn next(self: *Iterator) !?Rune {
if (self.pos >= self.src.len) {
return null;
}
const rune = try decodeRune(self.src[self.pos..]);
self.pos += rune.size;
return rune;
}
// this is an alias for peek_nth(1)
pub fn peek(self: *Iterator) !?Rune {
return self.peek_nth(1);
}
// peek_nth reads nth rune without advancing the cursor.
pub fn peek_nth(self: *Iterator, n: usize) !?Rune {
var pos = self.pos;
var i: usize = 0;
var last_read: ?Rune = undefined;
while (i < n) : (i += 1) {
if (pos >= self.src.len) {
return null;
}
const rune = try decodeRune(self.src[pos..]);
pos += rune.size;
last_read = rune;
}
return last_read;
}
};
// runeCount returns the number of runes in p. Erroneous and short
// encodings are treated as single runes of width 1 byte.
pub fn runeCount(p: []const u8) usize {
const np = p.len;
var n: usize = 0;
var i: usize = 0;
while (i < np) {
n += 1;
const c = p[i];
if (@intCast(u32, c) < rune_self) {
i += 1;
continue;
}
const x = first[c];
if (c == xx) {
i += 1;
continue;
}
var size = @intCast(usize, x & 7);
if (i + size > np) {
i += 1; // Short or invalid.
continue;
}
const accept = accept_ranges[x >> 4];
if (p[i + 1] < accept.lo or accept.hi < p[i + 1]) {
size = 1;
} else if (size == 2) {} else if (p[i + 2] < locb or hicb < p[i + 2]) {
size = 1;
} else if (size == 3) {} else if (p[i + 3] < locb or hicb < p[i + 3]) {
size = 1;
}
i += size;
}
return n;
}
pub fn valid(p: []const u8) bool {
const n = p.len;
var i: usize = 0;
while (i < n) {
const pi = p[i];
if (@intCast(u32, c) < rune_self) {
i += 1;
continue;
}
const x = first[pi];
if (x == xx) {
return false; // Illegal starter byte.
}
const size = @intCast(usize, x & 7);
if (i + size > n) {
return false; // Short or invalid.
}
const accept = accept_ranges[x >> 4];
if (p[i + 1] < accept.lo or accept.hi < p[i + 1]) {
return false;
} else if (size == 2) {} else if (p[i + 2] < locb or hicb < p[i + 2]) {
return false;
} else if (size == 3) {} else if (p[i + 3] < locb or hicb < p[i + 3]) {
return false;
}
i += size;
}
return true;
}
// ValidRune reports whether r can be legally encoded as UTF-8.
// Code points that are out of range or a surrogate half are illegal.
pub fn validRune(r: u32) bool {
if (0 <= r and r < surrogate_min) {
return true;
} else if (surrogate_min < r and r <= max_rune) {
return true;
}
return false;
}
|
0 | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor | repos/Ziguana-Game-System/old-version/libs/lola/libs/koino/vendor/libpcre.zig/README.md | # libpcre.zig

To build, add to your `build.zig`:
```zig
const linkPcre = @import("vendor/libpcre.zig/build.zig").linkPcre;
try linkPcre(exe);
exe.addPackagePath("libpcre", "vendor/libpcre.zig/src/main.zig");
```
Supported operating systems:
* Linux: `apt install pkg-config libpcre3-dev`
* macOS: `brew install pkg-config pcre`
* Windows: install [vcpkg](https://github.com/microsoft/vcpkg#quick-start-windows), `vcpkg integrate install`, `vcpkg install pcre --triplet x64-windows-static`
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.