overleaf/services/web/frontend/js/main/is-valid-tex-file.js
M Fahru f27562eb12 Data handling for settings in editor left menu react migration (#10470)
- Importing SettingsController from the angular code, which enables post requests for every select menu and socket handler for compiler, texlive version, and main document select option
 - New context for the data handling infrastructure between react and angular. The data is still located in the angular version, and I use the context only as a proxy to fetch/post new data.

GitOrigin-RevId: 59009bceb128d82969a2318e90036aacf79f9887
2022-11-30 09:04:32 +00:00

10 lines
238 B
JavaScript

function isValidTeXFile(filename) {
const validTeXFileRegExp = new RegExp(
`\\.(${window.ExposedSettings.validRootDocExtensions.join('|')})$`,
'i'
)
return validTeXFileRegExp.test(filename)
}
export default isValidTeXFile