The inline link `(dest "title")` at s[i] == '('. On success *end is past the * closing parenthesis. */
| 1897 | /* The inline link `(dest "title")` at s[i] == '('. On success *end is past the |
| 1898 | * closing parenthesis. */ |
| 1899 | static bool rs_inline_dest(const rs_inline_t *in, uint32_t i, const char **dest, uint32_t *dest_len, |
| 1900 | uint32_t *end) { |
| 1901 | const char *s = in->s; |
| 1902 | uint32_t n = in->n; |
| 1903 | uint32_t k = i + SKIP_ONE; |
| 1904 | while (k < n && isspace((unsigned char)s[k])) { |
| 1905 | k++; |
| 1906 | } |
| 1907 | if (!rs_link_dest(s, n, &k, dest, dest_len)) { |
| 1908 | return false; |
| 1909 | } |
| 1910 | uint32_t after = k; |
| 1911 | while (after < n && isspace((unsigned char)s[after])) { |
| 1912 | after++; |
| 1913 | } |
| 1914 | if (after > k && !rs_link_title(s, n, &after)) { |
| 1915 | return false; |
| 1916 | } |
| 1917 | while (after < n && isspace((unsigned char)s[after])) { |
| 1918 | after++; |
| 1919 | } |
| 1920 | if (after >= n || s[after] != ')') { |
| 1921 | return false; |
| 1922 | } |
| 1923 | *end = after + SKIP_ONE; |
| 1924 | return true; |
| 1925 | } |
| 1926 | |
| 1927 | /* The reference-style link the ']' at s[i] ends, when the text after it or |
| 1928 | * the bracket text itself is a label: full `[text][label]`, collapsed |
no test coverage detected