comparableSource reduces a destination read straight from the source to that same form. It still carries the syntax goldmark had already removed: the whitespace separating the destination from the rest of the link, and the angle brackets that let a destination hold a space. Whitespace inside those b
(raw string)
| 412 | // angle brackets that let a destination hold a space. Whitespace inside those |
| 413 | // brackets is part of the name, so only the whitespace outside them goes. |
| 414 | func comparableSource(raw string) string { |
| 415 | return comparableDestination(trimAngles(strings.TrimSpace(raw))) |
| 416 | } |
| 417 | |
| 418 | func trimAngles(s string) string { |
| 419 | if len(s) >= 2 && s[0] == '<' && s[len(s)-1] == '>' { |
no test coverage detected