mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-06 08:14:25 +00:00
Update \documentclass regex so that it does match on '\documentclass{...} % comment with \documentclass'
This commit is contained in:
parent
4c626f23e7
commit
65a42c551d
1 changed files with 2 additions and 2 deletions
|
@ -109,8 +109,8 @@ define [
|
||||||
doc = ide.editorManager.getCurrentDocValue()
|
doc = ide.editorManager.getCurrentDocValue()
|
||||||
return null if !doc?
|
return null if !doc?
|
||||||
for line in doc.split("\n")
|
for line in doc.split("\n")
|
||||||
match = line.match /(.*)\\documentclass/
|
match = line.match /^[^%]*\\documentclass/
|
||||||
if match and !match[1].match /%/
|
if match
|
||||||
return ide.editorManager.getCurrentDocId()
|
return ide.editorManager.getCurrentDocId()
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue