mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'master' into sk-passport
This commit is contained in:
commit
c12450f533
3 changed files with 6 additions and 7 deletions
|
@ -380,8 +380,8 @@ module.exports = (grunt) ->
|
|||
|
||||
grunt.registerTask 'test:modules:unit', 'Run the unit tests for the modules', ['compile:modules:server', 'compile:modules:unit_tests'].concat(moduleUnitTestTasks)
|
||||
|
||||
grunt.registerTask 'run', "Compile and run the web-sharelatex server", ['compile', 'env:run', 'parallel']
|
||||
grunt.registerTask 'runq', "Compile and run the web-sharelatex server", ['compile', 'env:run', 'exec']
|
||||
grunt.registerTask 'run:watch', "Compile and run the web-sharelatex server", ['compile', 'env:run', 'parallel']
|
||||
grunt.registerTask 'run', "Compile and run the web-sharelatex server", ['compile', 'env:run', 'exec']
|
||||
|
||||
grunt.registerTask 'default', 'run'
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module.exports = BlogController =
|
|||
try
|
||||
data = JSON.parse(data)
|
||||
if settings.cdn?.web?.host?
|
||||
data?.content = data?.content?.replace(/src="([^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
|
||||
data?.content = data?.content?.replace(/src="(\/[^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
|
||||
catch err
|
||||
logger.err err:err, data:data, "error parsing data from data"
|
||||
res.render "blog/blog_holder", data
|
||||
|
|
|
@ -101,16 +101,15 @@ module.exports = ProjectLocator =
|
|||
getEntity = (folder, entityName, cb)->
|
||||
if !entityName?
|
||||
return cb null, folder, "folder"
|
||||
|
||||
for file in folder.fileRefs
|
||||
for file in folder.fileRefs or []
|
||||
if file?.name.toLowerCase() == entityName.toLowerCase()
|
||||
result = file
|
||||
type = "file"
|
||||
for doc in folder.docs
|
||||
for doc in folder.docs or []
|
||||
if doc?.name.toLowerCase() == entityName.toLowerCase()
|
||||
result = doc
|
||||
type = "doc"
|
||||
for childFolder in folder.folders
|
||||
for childFolder in folder.folders or []
|
||||
if childFolder?.name.toLowerCase() == entityName.toLowerCase()
|
||||
result = childFolder
|
||||
type = "folder"
|
||||
|
|
Loading…
Reference in a new issue