overleaf/services/web/frontend/js/main/is-valid-tex-file.js

13 lines
273 B
JavaScript
Raw Normal View History

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