Skip to content

Commit

Permalink
fix: render markdown in notes on the dashboard (#6576)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Saettler <[email protected]>
  • Loading branch information
SimonVanacco and asbiin authored Nov 1, 2023
1 parent 0f636e4 commit 4612bb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/js/components/dashboard/DashboardLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@
<a :href="'people/' + note.contact.id">
{{ note.name }}
</a>
<p>
{{ note.body }}
</p>
<p v-html="compiledMarkdown(note.body)"></p>
</div>
</div>
</template>
Expand Down Expand Up @@ -449,7 +447,11 @@ export default {
.then(response => {
this.tasks.splice(this.tasks.indexOf(task), 1);
});
}
},
compiledMarkdown (text) {
return text !== undefined && text !== null ? marked(text, { sanitize: true }) : '';
},
}
};
</script>

0 comments on commit 4612bb1

Please sign in to comment.