mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 11:44:21 -05:00
13 lines
273 B
JavaScript
13 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
|