diff --git a/src/restructuredtext/restructuredtext.test.ts b/src/restructuredtext/restructuredtext.test.ts index f833ed66..dae5bd0b 100644 --- a/src/restructuredtext/restructuredtext.test.ts +++ b/src/restructuredtext/restructuredtext.test.ts @@ -6,6 +6,12 @@ import { testTokenization } from '../test/testRunner'; testTokenization('restructuredtext', [ + [ + { + line: 'some property = Text::ProxyLibrary::ProxyInterfaceTest::DeleteProxyInterface();', + tokens: [{ startIndex: 0, type: '' }] + } + ], [ { line: '#####', diff --git a/src/restructuredtext/restructuredtext.ts b/src/restructuredtext/restructuredtext.ts index 6b5e4344..0f7eee15 100644 --- a/src/restructuredtext/restructuredtext.ts +++ b/src/restructuredtext/restructuredtext.ts @@ -54,10 +54,9 @@ export const language = { ], alphanumerics: /[A-Za-z0-9]/, - alphanumericsplus: /[A-Za-z0-9-_+:.]/, - simpleRefNameWithoutBq: /(?:@alphanumerics@alphanumericsplus*@alphanumerics)+|(?:@alphanumerics+)/, - simpleRefName: /(?:`@simpleRefNameWithoutBq`|@simpleRefNameWithoutBq)/, - phrase: /@simpleRefName(?:\s@simpleRefName)*/, + simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/, + simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/, + phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/, citationName: /[A-Za-z][A-Za-z0-9-_.]*/, blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/, precedingChars: /(?:[ -:/'"<([{])/,