summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-11 12:40:37 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-11 12:40:37 -0800
commit7d04065de4c793003af01647ff23132de1c9e919 (patch)
treee15ba8a50dfcdbe731d1fedd689dab1b71d58a26 /src
parent58dd044ca1ea8316f4f4b6034eec12d204cc6913 (diff)
Code reformat
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/inlines.c b/src/inlines.c
index d9301c8..2a84242 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -930,30 +930,30 @@ static bufsize_t manual_scan_link_url_2(cmark_chunk *input, bufsize_t offset,
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;
- }
+ 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;
- } else {
- ++i;
+ --nb_p;
+ ++i;
+ } else if (cmark_isspace(input->data[i])) {
+ if (i == offset) {
+ return -1;
}
+ break;
+ } else {
+ ++i;
}
+ }
if (i >= input->len || nb_p != 0)
return -1;