PY-12241 links_ are not highlighted in ReST files when they are followed by some of the punctuation chars

This commit is contained in:
Ekaterina Tuzova
2017-07-13 12:56:28 +03:00
parent 0d74564335
commit e07a1dd6c8
3 changed files with 1444 additions and 1371 deletions
@@ -155,6 +155,31 @@ public class RestLexerTest extends TestCase {
"[ :term:`user`, LINE]"
);
}
public void testLinks() throws IOException {
doTest("link_/\n" +
"link_!\n" +
"\"link_\"\n" +
"'link_'\n" +
"link_;\n",
"[link_, REFERENCE_NAME]",
"[/, LINE]",
"[\n, WHITESPACE]",
"[link_, REFERENCE_NAME]",
"[!, LINE]",
"[\n, WHITESPACE]",
"[\", LINE]",
"[link_, REFERENCE_NAME]",
"[\", LINE]",
"[\n, WHITESPACE]",
"[', LINE]",
"[link_, REFERENCE_NAME]",
"[', LINE]",
"[\n, WHITESPACE]",
"[link_, REFERENCE_NAME]",
"[;, LINE]",
"[\n, WHITESPACE]"
);
}
public void testInterpreted() throws IOException {
doTest(":kbd:`1`\n" +