--- a/src_js/iconolab-bundle/src/components/editor/Comment.vue Fri Feb 24 17:35:16 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/Comment.vue Fri Feb 24 17:47:45 2017 +0100
@@ -1,6 +1,6 @@
<template>
<div class="comment">
- {{ comment }}
+ <div class="comment-body" v-html="commentFormatted"></div>
<div class="comment-footer">
<span class="comment-author">{{ username }}</span>
<span class="comment-date">{{ dateFormatted }}</span>
@@ -10,6 +10,10 @@
<script>
+ import showdown from 'showdown'
+
+ const converter = new showdown.Converter()
+
export default {
props: [
'comment',
@@ -27,6 +31,9 @@
var year = date.getFullYear();
return day + '/' + month + '/' + year;
+ },
+ commentFormatted: function(){
+ return converter.makeHtml(this.comment);
}
}
}