summaryrefslogtreecommitdiff
path: root/src/inlines.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inlines.c')
-rw-r--r--[-rwxr-xr-x]src/inlines.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 3275ddd..1199831 100755..100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -24,7 +24,7 @@ static const char *RIGHTSINGLEQUOTE = "\xE2\x80\x99";
// Macros for creating various kinds of simple.
#define make_str(s) make_literal(CMARK_NODE_TEXT, s)
#define make_code(s) make_literal(CMARK_NODE_CODE, s)
-#define make_raw_html(s) make_literal(CMARK_NODE_INLINE_HTML, s)
+#define make_raw_html(s) make_literal(CMARK_NODE_HTML_INLINE, s)
#define make_linebreak() make_simple(CMARK_NODE_LINEBREAK)
#define make_softbreak() make_simple(CMARK_NODE_SOFTBREAK)
#define make_emph() make_simple(CMARK_NODE_EMPH)
@@ -284,7 +284,7 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open,
before_char_pos -= 1;
}
len = cmark_utf8proc_iterate(subj->input.data + before_char_pos,
- subj->pos - before_char_pos, &before_char);
+ subj->pos - before_char_pos, &before_char);
if (len == -1) {
before_char = 10;
}
@@ -301,7 +301,7 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open,
}
len = cmark_utf8proc_iterate(subj->input.data + subj->pos,
- subj->input.len - subj->pos, &after_char);
+ subj->input.len - subj->pos, &after_char);
if (len == -1) {
after_char = 10;
}
@@ -309,10 +309,10 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open,
!(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));
+ 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));
@@ -865,7 +865,6 @@ static cmark_node *handle_close_bracket(subject *subj, cmark_node *parent) {
// Next, look for a following [link label] that matches in refmap.
// skip spaces
- subj->pos = subj->pos + scan_spacechars(&subj->input, subj->pos);
raw_label = cmark_chunk_literal("");
found_label = link_label(subj, &raw_label);
if (!found_label || raw_label.len == 0) {
@@ -944,10 +943,10 @@ 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);
+ advance(subj);
}
if (peek_at(subj, subj->pos) == '\n') {
- advance(subj);
+ advance(subj);
}
// skip spaces at beginning of line
skip_spaces(subj);