Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

improve a rule which freeze a page in restructuredText #141

Merged
merged 1 commit into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/restructuredtext/restructuredtext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import { testTokenization } from '../test/testRunner';

testTokenization('restructuredtext', [
[
{
line: 'some property = Text::ProxyLibrary::ProxyInterfaceTest::DeleteProxyInterface();',
tokens: [{ startIndex: 0, type: '' }]
}
],
[
{
line: '#####',
Expand Down
7 changes: 3 additions & 4 deletions src/restructuredtext/restructuredtext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ export const language = <languages.IMonarchLanguage>{
],

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: /(?:[ -:/'"<([{])/,
Expand Down