- Commit
- 28525a57f3a7ba4e821e7300ac9c74a1dbcadc24
- Parent
- 2bcca4c2118733f14a91eaf585e8ff97e216b6bd
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Rename CMARK_OPT_SMARTPUNCT -> CMARK_OPT_SMART.
My personal build of CMark ✏️
Rename CMARK_OPT_SMARTPUNCT -> CMARK_OPT_SMART.
4 files changed, 7 insertions, 7 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | man/man3/cmark.3 | 2 | 1 | 1 |
Modified | src/cmark.h | 2 | 1 | 1 |
Modified | src/inlines.c | 8 | 4 | 4 |
Modified | src/main.c | 2 | 1 | 1 |
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3 @@ -524,7 +524,7 @@ Normalize tree by consolidating adjacent text nodes. .nf \fC .RS 0n -#define CMARK_OPT_SMARTPUNCT 8 +#define CMARK_OPT_SMART 8 .RE \f[] .fi
diff --git a/src/cmark.h b/src/cmark.h @@ -498,7 +498,7 @@ char *cmark_render_man(cmark_node *root, int options); /** Convert straight quotes to curly, --- to em dashes, -- to en dashes. */ -#define CMARK_OPT_SMARTPUNCT 8 +#define CMARK_OPT_SMART 8 /** * ## Version information
diff --git a/src/inlines.c b/src/inlines.c @@ -971,7 +971,7 @@ static int subject_find_special_char(subject *subj, int options) while (n < subj->input.len) { if (SPECIAL_CHARS[subj->input.data[n]]) return n; - if (options & CMARK_OPT_SMARTPUNCT && + if (options & CMARK_OPT_SMART && SMART_PUNCT_CHARS[subj->input.data[n]]) return n; n++; @@ -1012,13 +1012,13 @@ static int parse_inline(subject* subj, cmark_node * parent, int options) case '_': case '\'': case '"': - new_inl = handle_delim(subj, c, options & CMARK_OPT_SMARTPUNCT); + new_inl = handle_delim(subj, c, options & CMARK_OPT_SMART); break; case '-': - new_inl = handle_hyphen(subj, options & CMARK_OPT_SMARTPUNCT); + new_inl = handle_hyphen(subj, options & CMARK_OPT_SMART); break; case '.': - new_inl = handle_period(subj, options & CMARK_OPT_SMARTPUNCT); + new_inl = handle_period(subj, options & CMARK_OPT_SMART); break; case '[': advance(subj);
diff --git a/src/main.c b/src/main.c @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) } else if (strcmp(argv[i], "--hardbreaks") == 0) { options |= CMARK_OPT_HARDBREAKS; } else if (strcmp(argv[i], "--smart") == 0) { - options |= CMARK_OPT_SMARTPUNCT; + options |= CMARK_OPT_SMART; } else if (strcmp(argv[i], "--normalize") == 0) { options |= CMARK_OPT_NORMALIZE; } else if ((strcmp(argv[i], "--help") == 0) ||