Bracket text longer than this scan handles: true when its bytes are those a * doc link is made of, so that it is reported instead of dropped. */
| 500 | /* Bracket text longer than this scan handles: true when its bytes are those a |
| 501 | * doc link is made of, so that it is reported instead of dropped. */ |
| 502 | static bool go_long_ref_shaped(const char *s, size_t n) { |
| 503 | size_t i = (n > 0 && s[0] == '*') ? SKIP_ONE : 0; |
| 504 | if (i >= n) { |
| 505 | return false; |
| 506 | } |
| 507 | for (; i < n; i++) { |
| 508 | unsigned char c = (unsigned char)s[i]; |
| 509 | if (!go_ident_byte(c) && !go_import_path_byte(c) && c != '/') { |
| 510 | return false; |
| 511 | } |
| 512 | } |
| 513 | return true; |
| 514 | } |
| 515 | |
| 516 | /* The longest prefix of s[0..n) of at most `max` bytes that ends on a rune |
| 517 | * boundary. */ |
no test coverage detected