Merge pull request #16523 from overleaf/dp-editable-file-extensions-2

Make cfg, ltx, Rnw and inc files editable in the editor

GitOrigin-RevId: 1999c29ea451aa3f362ffa09f6f4d5889beaf404
This commit is contained in:
David 2024-01-17 08:47:39 +00:00 committed by Copybot
parent be402d238a
commit 29bfdae57d
5 changed files with 18 additions and 0 deletions

View file

@ -91,6 +91,10 @@ const defaultTextExtensions = [
'lhs', 'lhs',
'mk', 'mk',
'xmpdata', 'xmpdata',
'cfg',
'rnw',
'ltx',
'inc',
] ]
const parseTextExtensions = function (extensions) { const parseTextExtensions = function (extensions) {

View file

@ -27,6 +27,7 @@ export const languages = [
'ldf', 'ldf',
'xmpdata', 'xmpdata',
'Rnw', 'Rnw',
'rnw',
'lyx', 'lyx',
'inc', 'inc',
'dtx', 'dtx',
@ -44,6 +45,7 @@ export const languages = [
'pygstyle', 'pygstyle',
'pygtex', 'pygtex',
'ps_tex', 'ps_tex',
'ltx',
], ],
load: () => { load: () => {
return import('./latex').then(m => m.latex()) return import('./latex').then(m => m.latex())

View file

@ -186,6 +186,10 @@ const initialize = () => {
'lhs', 'lhs',
'mk', 'mk',
'xmpdata', 'xmpdata',
'cfg',
'rnw',
'ltx',
'inc',
], ],
editableFilenames: ['latexmkrc', '.latexmkrc', 'makefile', 'gnumakefile'], editableFilenames: ['latexmkrc', '.latexmkrc', 'makefile', 'gnumakefile'],
validRootDocExtensions: ['tex', 'Rtex', 'ltx', 'Rnw'], validRootDocExtensions: ['tex', 'Rtex', 'ltx', 'Rnw'],

View file

@ -64,6 +64,10 @@ window.ExposedSettings = {
'lhs', 'lhs',
'mk', 'mk',
'xmpdata', 'xmpdata',
'cfg',
'rnw',
'ltx',
'inc',
], ],
editableFilenames: ['latexmkrc', '.latexmkrc', 'makefile', 'gnumakefile'], editableFilenames: ['latexmkrc', '.latexmkrc', 'makefile', 'gnumakefile'],
} }

View file

@ -92,6 +92,10 @@ describe('FileTypeManager', function () {
'/file.TEX', '/file.TEX',
'/file.lhs', '/file.lhs',
'/file.xmpdata', '/file.xmpdata',
'/file.cfg',
'/file.Rnw',
'/file.ltx',
'/file.inc',
'/makefile', '/makefile',
'/Makefile', '/Makefile',
'/GNUMakefile', '/GNUMakefile',