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

13 lines
281 B
JavaScript
Raw Normal View History

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