Skip to content

Commit

Permalink
fixes up the correct markdown rendering of readme files when viewing …
Browse files Browse the repository at this point in the history
…profiles
  • Loading branch information
jstrachan committed Sep 20, 2013
1 parent 8dd6109 commit a08b6ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -374,16 +374,17 @@ module Wiki {

function viewContents(pageName, contents) {
$scope.sourceView = null;
if ("markdown" === $scope.format) {
var format = Wiki.fileFormat(pageName, fileExtensionTypeRegistry) || $scope.format;
if ("markdown" === format) {
// lets convert it to HTML
$scope.html = contents ? marked(contents) : "";
$scope.html = $compile($scope.html)($scope);
} else if ($scope.format && $scope.format.startsWith("html")) {
} else if (format && format.startsWith("html")) {
$scope.html = contents;
$compile($scope.html)($scope);
} else {
var form = null;
if ($scope.format && $scope.format === "javascript") {
if (format && format === "javascript") {
form = $location.search()["form"];
}
$scope.source = contents;
Expand Down

0 comments on commit a08b6ee

Please sign in to comment.