Skip to content

Commit

Permalink
Adding rendering of Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
niclash committed Feb 20, 2021
1 parent 7f5fe22 commit 5e19ae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/webapp/project/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h4 class="card-title">Overview</h4>
<div class="card-body">
<h4 class="card-title">README</h4>
<hr/>
<pre><code>{{renderReadme()}}</code></pre>
<div id="readme"/>
</div>
</div>
</div>
Expand Down
7 changes: 2 additions & 5 deletions src/main/webapp/project/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ angular.module('ponyhub.view_project', ['ngRoute'])
$scope.projectData = response;
$log.info("Fetched project.", $scope.projectData);
$scope.rendered = marked($scope.projectData._source.readMe);

$log.info("Readme content.", $scope.rendered);
document.getElementById("readme").innerHTML = $scope.rendered;
}
});
$scope.renderReadme = function() {
console.log("Render:", $scope.rendered);
return $scope.rendered;
}
}]);

0 comments on commit 5e19ae9

Please sign in to comment.