Skip to content

Commit

Permalink
Merge pull request #37 from bloerwald/master
Browse files Browse the repository at this point in the history
 build diffs/previews: treat html, htm,  txt as text files
  • Loading branch information
Marlamin committed Aug 13, 2019
2 parents 6595f44 + 0918d56 commit 90ad8e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions builds/diff_new.php
Expand Up @@ -132,11 +132,14 @@ function actionToBadge(action){
}
break;
case "blp":
case "htm":
case "html":
case "lua":
case "xsd":
case "xml":
case "sbt":
case "toc":
case "txt":
case "xml":
case "xsd":
content = "<a style='cursor: pointer' data-toggle='modal' data-target='#previewModal' onClick='fillDiffModal(\"<?= $fromBuild['hash'] ?>\", \"<?= $toBuild['hash'] ?>\", \"" + full.id + "\")'>Preview</a>";
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion files/scripts/preview_api.php
Expand Up @@ -78,7 +78,7 @@ function downloadFile($params, $outfile){
<div class="tab-pane" id="raw" role="tabpanel" aria-labelledby="raw-tab"><pre style='max-height: 500px;'><code><?=htmlentities($output)?></pre></code></div>
</div>
<?php
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc"){
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc" || $type == "htm" || $type == "html" || $type == "sbt" || $type == "txt"){
echo "<pre style='max-height: 500px;'><code>".htmlentities(file_get_contents($tempfile))."</pre></code>";
}else{
// dump via hd
Expand Down

0 comments on commit 90ad8e4

Please sign in to comment.