Skip to content

Commit

Permalink
Updated service parent and parent parent document which now returns a…
Browse files Browse the repository at this point in the history
…s a function instead of an attribute with newer mongo packages.
  • Loading branch information
JangoSteve committed Feb 5, 2021
1 parent 00b41c6 commit 38435cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/widgets/redmine_documents/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ exports.translate = function(data, service) {
.replace(/{{video\(https?:\/\/(www\.)?youtu(be\.com|\.be)\/(watch\?.*v=)?([-\d\w]+)[^}]*}}/, '<iframe width="100%" height="400" src="//www.youtube-nocookie.com/embed/$4?rel=0" frameborder="0" allowfullscreen></iframe>')
.replace(/!(\/[^\s]+)!/gm, function(match, p1) {
var path = encodeURIComponent(p1);
return ("<img src='/proxy/redmine_documents?service_id=" + service.id + "&project_id=" + service.parent.id + "&client_id=" + service.parent.parent.id + "&proxy=image&path=" + path + "' />");
return ("<img src='/proxy/redmine_documents?service_id=" + service.id + "&project_id=" + service.parent().id + "&client_id=" + service.parent().parent().id + "&proxy=image&path=" + path + "' />");
})
.replace(/((^>.*$(\r\n)?)+)/gm, "<blockquote>$1</blockquote>")
.replace(/^(<blockquote>)?> +$/gm, "$1&nbsp;")
Expand Down

0 comments on commit 38435cd

Please sign in to comment.