summaryrefslogtreecommitdiff
path: root/src/scanners.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-22 22:07:38 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-22 22:18:03 -0800
commita74295a1ea686611498a75dd45597d224ce99287 (patch)
treea472e4d523d6e7aa72f4db62ca3b578fc4728ff5 /src/scanners.c
parent4296462bfe31c877f4826f5734813c88c7240770 (diff)
Rename 'header' -> 'heading'.
See jgm/CommonMark commit 0cdbcee4e840abd0ac7db93797b2b75ca4104314 Note that we have defined cmark_node_get_header_level = cmark_node_get_heading_level and cmark_node_set_header_level = camrk_node_set_heading_level for backwards compatibility in the API.
Diffstat (limited to 'src/scanners.c')
-rw-r--r--src/scanners.c60
1 files changed, 34 insertions, 26 deletions
diff --git a/src/scanners.c b/src/scanners.c
index d9f998f..2d5796f 100644
--- a/src/scanners.c
+++ b/src/scanners.c
@@ -15128,37 +15128,45 @@ bufsize_t _scan_html_tag(const unsigned char *p) {
unsigned char yych;
static const unsigned char yybm[] = {
/* table 1 .. 8: 0 */
- 0, 230, 230, 230, 230, 230, 230, 230, 230, 199, 199, 199, 199, 199, 230,
+ 0, 230, 230, 230, 230, 230, 230, 230, 230, 199, 199, 199, 199, 199,
230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 199, 230, 70, 230, 230, 230, 230, 134, 230, 230, 230,
- 230, 230, 254, 246, 230, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 246, 230, 198, 198, 196, 230, 230, 254, 254, 254, 254, 254, 254,
+ 230, 230, 230, 230, 199, 230, 70, 230, 230, 230, 230, 134, 230, 230,
+ 230, 230, 230, 254, 246, 230, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 246, 230, 198, 198, 196, 230, 230, 254, 254, 254, 254, 254,
254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 230, 230, 226, 230, 246, 198, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 230, 230, 226, 230, 246, 198, 254,
254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 230, 230, 230, 230,
- 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 230, 230, 230,
+ 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,
/* table 9 .. 11: 256 */
- 0, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 0, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 32, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 128, 160, 224, 224, 224, 224, 224, 224,
+ 160, 160, 160, 32, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 128, 160, 224, 224, 224, 224, 224,
224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 160, 160, 160, 160,
+ 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 160, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,
};
yych = *(marker = p);
if (yych <= '`') {
@@ -25077,8 +25085,8 @@ bufsize_t _scan_spacechars(const unsigned char *p) {
}
}
-// Match ATX header start.
-bufsize_t _scan_atx_header_start(const unsigned char *p) {
+// Match ATX heading start.
+bufsize_t _scan_atx_heading_start(const unsigned char *p) {
const unsigned char *marker = NULL;
const unsigned char *start = p;
@@ -25277,9 +25285,9 @@ bufsize_t _scan_atx_header_start(const unsigned char *p) {
}
}
-// Match setext header line. Return 1 for level-1 header,
+// Match setext heading line. Return 1 for level-1 heading,
// 2 for level-2, 0 for no match.
-bufsize_t _scan_setext_header_line(const unsigned char *p) {
+bufsize_t _scan_setext_heading_line(const unsigned char *p) {
const unsigned char *marker = NULL;
{