Browse Source
The standard explicitly prohibits nesting of "a" tags. Prevent nesting from occuring when only "markdown" input is present. If explicit "<a ...>...</a>" tags are present in the input they will be (mostly) left alone even if they've been incorrectly nested. Avoid producing mojibake links in the case that the URL itself appears to contain another URL. (The wayback machine links often look like this.) In essence, once a link (either an "a" or "img") tag has been generated/processed, avoid processing it again in order to make sure no accidental mojibake occurs. One consequence of this change is that "Automatic Links" that are NOT surrounded by '<' and '>' will now only be recognized if they occur at the beginning of the input or after a whitespace (a newline qualifies) character. This also helps to eliminate unintended double linkification. Furthermore, URLs containing peculiar characters in them (e.g. single quote and/or double quote) should be far less troublesome now as well. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>master

1 changed files with 18 additions and 13 deletions
Loading…
Reference in new issue