overleaf/services/web/frontend/js/main/is-valid-tex-file.js
Timothée Alby 1012dbc3c4 Merge pull request #2961 from overleaf/ta-spike-outline
Document Outline Spike

GitOrigin-RevId: adc315a3546147eb10c7a40ae70f9cab1cbf7b8d
2020-06-30 02:10:19 +00:00

12 lines
273 B
JavaScript

import ExposedSettings from './exposed-settings'
const validTeXFileRegExp = new RegExp(
`\\.(${ExposedSettings.validRootDocExtensions.join('|')})$`,
'i'
)
function isValidTeXFile(filename) {
return validTeXFileRegExp.test(filename)
}
export default isValidTeXFile