Skip to content

Commit cad42c9

Browse files
committed
Merge branch 'hotfix/featured-doc-intro-markdown'
2 parents a015a0b + 767e0e2 commit cad42c9

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

public/build/app.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/app.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<script src="/build/annotator.js?949a18f6"></script>
4141

42-
<script src="/build/app.js?1f565df6"></script>
42+
<script src="/build/app.js?50d0d042"></script>
4343
</head>
4444
<body>
4545

public/js/controllers/homePageController.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
angular.module('madisonApp.controllers')
2-
.controller('HomePageController', ['$scope', '$filter', 'Doc',
3-
function ($scope, $filter, Doc) {
2+
.controller('HomePageController', ['$scope', '$filter', '$sce', 'Doc',
3+
function ($scope, $filter, $sce, Doc) {
44
$scope.docs = [];
55
$scope.featured = {};
66
$scope.mostActive = [];
@@ -26,7 +26,10 @@ angular.module('madisonApp.controllers')
2626
});
2727

2828
Doc.getFeaturedDoc(function (data) {
29+
var converter = new Markdown.Converter();
30+
2931
$scope.featured = data;
32+
$scope.featured.introtext = $sce.trustAsHtml(converter.makeHtml(data.introtext));
3033
}).$promise.catch(function (data) {
3134
console.error("Unable to get featured document: %o", data);
3235
});

public/templates/partials/featured.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ <h2 class="heading entry-title">
4141
</header>
4242

4343
<div class="doc-content" ng-if="featured.introtext">
44-
<div class="doc-summary entry-summary">
45-
{{ featured.introtext }}
46-
</div>
44+
<div class="doc-summary entry-summary markdown" data-ng-bind-html="featured.introtext"></div>
4745
<a class="read-button" href="{{ featured.url }}" rel="bookmark" role="button" title="Read more on {{doc.title}}">Read More</a>
4846
</div>
4947
</article>

0 commit comments

Comments
 (0)