diff --git a/src/debugging/profileInclude.js b/src/debugging/profileInclude.js index c390d6d7da595f49aacaf50df149da15746785f9..eee4ed807d930bdd584c9941f7fdde123b8dc491 100644 --- a/src/debugging/profileInclude.js +++ b/src/debugging/profileInclude.js @@ -137,6 +137,9 @@ globalThis.ProfileInclude = (function() { Macro.add('include', {handler: builtinIncludeHandler}); builtinIncludeHandler = null; } - } + }, + + IncludeBegins: IncludeBegins, + IncludeEnds: IncludeEnds }; })(); diff --git a/src/js/utilsSC.js b/src/js/utilsSC.js index f22ba25c533c22dbd5ebd4e0725d582efa912252..af511e4ad9b774c250bdd8ce8896c46250da1c2f 100644 --- a/src/js/utilsSC.js +++ b/src/js/utilsSC.js @@ -323,7 +323,13 @@ App.UI.reload = function() { */ App.UI.DOM.renderPassage = function(passageTitle) { const res = document.createDocumentFragment(); + if (ProfileInclude.IsEnabled) { + ProfileInclude.IncludeBegins(passageTitle); + } $(res).wiki(jsInclude(passageTitle)); + if (ProfileInclude.IsEnabled) { + ProfileInclude.IncludeEnds(); + } return res; };