mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
update the simplreRefName rule to fix freezing the page. microsoft/monaco-editor#2484
This commit is contained in:
parent
19ce286ce4
commit
57a88a08c2
2 changed files with 9 additions and 4 deletions
|
|
@ -6,6 +6,12 @@
|
||||||
import { testTokenization } from '../test/testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('restructuredtext', [
|
testTokenization('restructuredtext', [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: 'some property = Text::ProxyLibrary::ProxyInterfaceTest::DeleteProxyInterface();',
|
||||||
|
tokens: [{ startIndex: 0, type: '' }]
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '#####',
|
line: '#####',
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,9 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
],
|
],
|
||||||
|
|
||||||
alphanumerics: /[A-Za-z0-9]/,
|
alphanumerics: /[A-Za-z0-9]/,
|
||||||
alphanumericsplus: /[A-Za-z0-9-_+:.]/,
|
simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,
|
||||||
simpleRefNameWithoutBq: /(?:@alphanumerics@alphanumericsplus*@alphanumerics)+|(?:@alphanumerics+)/,
|
simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/,
|
||||||
simpleRefName: /(?:`@simpleRefNameWithoutBq`|@simpleRefNameWithoutBq)/,
|
phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,
|
||||||
phrase: /@simpleRefName(?:\s@simpleRefName)*/,
|
|
||||||
citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
|
citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
|
||||||
blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
|
blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
|
||||||
precedingChars: /(?:[ -:/'"<([{])/,
|
precedingChars: /(?:[ -:/'"<([{])/,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue