Skip to content

Commit

Permalink
Merge pull request #41 from SimplyEdit/feature/fullApp-optional
Browse files Browse the repository at this point in the history
Make parts of the page frame optional.
  • Loading branch information
ylebre authored Oct 1, 2024
2 parents 7843812 + 1d5e9e7 commit 1856adb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function(data) {

Object.keys(replacements).forEach(function(replacement) {
matches = fullApp.match("(\\s+){{" + replacement + "}}");
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
if (matches) {
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
}
});

// escape html
Expand Down
4 changes: 3 additions & 1 deletion www/api/data/generated.html
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,9 @@ <h1>App preview</h1>

Object.keys(replacements).forEach(function(replacement) {
matches = fullApp.match("(\\s+){{" + replacement + "}}");
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
if (matches) {
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
}
});

// escape html
Expand Down
8 changes: 5 additions & 3 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3970,12 +3970,14 @@ <h1>App preview</h1>
"footHtml": editor.transformers.simplyPreviewFootHtml.render(data.footHtml ?? []),
"bodyHtml" : editor.transformers.simplyPreviewBodyHtml.render(data.bodyHtml ?? [])
};

Object.keys(replacements).forEach(function(replacement) {
matches = fullApp.match("(\\s+){{" + replacement + "}}");
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
if (matches) {
fullApp = fullApp.replace("{{" + replacement + "}}", replacements[replacement].replace(/\n/g, matches[1]));
}
});

// escape html
var dataDiv = document.createElement("div");
dataDiv.appendChild(document.createTextNode(fullApp));
Expand Down

0 comments on commit 1856adb

Please sign in to comment.