Rename Perl 6

This commit is contained in:
Konrad Borowski 2019-11-03 17:37:49 +01:00
parent ef2bd4f528
commit d24a2e9446
5 changed files with 6 additions and 4 deletions

View File

@ -14,12 +14,12 @@ const languagesMap: Map<string, [() => Promise<void> | void, string]> = new Map(
['jsx', [() => import('codemirror/mode/jsx/jsx'), 'text/jsx']],
['markdown', [() => import('codemirror/mode/markdown/markdown'), 'text/x-markdown']],
['perl', [() => import('codemirror/mode/perl/perl'), 'text/x-perl']],
['perl6', [() => import('./perl6'), 'text/x-perl6']],
['php', [() => import('codemirror/mode/php/php'), 'application/x-httpd-php']],
['plain-text', [() => { }, 'text/plain']],
['postgresql', [() => import('codemirror/mode/sql/sql'), 'text/x-pgsql']],
['python2', [() => import('codemirror/mode/python/python'), 'text/x-python']],
['python3', [() => import('codemirror/mode/python/python'), 'text/x-python']],
['raku', [() => import('./raku'), 'text/x-raku']],
['rust', [() => import('codemirror/mode/rust/rust'), 'text/x-rustsrc']],
['sh', [() => import('codemirror/mode/shell/shell'), 'text/x-sh']],
['sql', [() => import('codemirror/mode/sql/sql'), 'text/x-sql']],

View File

@ -1,6 +1,6 @@
import * as CodeMirror from 'codemirror'
CodeMirror.defineMode("perl6", () => {
CodeMirror.defineMode("raku", () => {
// null - magic touch
// 1 - keyword
// 2 - def
@ -1350,7 +1350,7 @@ CodeMirror.defineMode("perl6", () => {
}
})
CodeMirror.defineMIME("text/x-perl6", "perl6")
CodeMirror.defineMIME("text/x-raku", "raku")
function look(stream, c) {
return stream.string.charAt(stream.pos + (c || 0))

View File

@ -37,11 +37,11 @@ const languageMap = {
'jsx': 'javascript',
'markdown': 'markdown',
'perl': 'perl',
'perl6': null,
'php': 'php',
'postgresql': 'sql',
'python2': 'python',
'python3': 'python',
'raku': null,
'rust': 'rust',
'sh': 'shell',
'sql': 'sql',

View File

@ -0,0 +1 @@
UPDATE languages SET name = 'Perl 6', identifier = 'perl6' WHERE identifier = 'raku';

View File

@ -0,0 +1 @@
UPDATE languages SET name = 'Raku', identifier = 'raku' WHERE identifier = 'perl6';