diff --git a/src/routes/About.vue b/src/routes/About.vue index 511877f8..ab8ac8c9 100644 --- a/src/routes/About.vue +++ b/src/routes/About.vue @@ -11,7 +11,7 @@ - + Contributors @@ -22,12 +22,7 @@ Changelog -
-

{{section.title}}

-
    -
  • {{log}}
  • -
-
+
@@ -39,6 +34,8 @@ import Abstract from "../components/Abstract"; import GithubContributors from "../components/GithubContributors"; import changelog from "../../CHANGELOG.md" + import marked from 'marked' + import DOMPurify from 'dompurify'; export default { name: "About", @@ -46,28 +43,21 @@ changelog: [] }), mounted() { - - this.changelog = ('##' + changelog.replace(/^(.*?)##/s, '')) - .split('\n') - .filter(v => v !== '') - .reduce((sections, v) => { - v = v.trim(); - if(v.startsWith('##')){ - sections.push({ - title: v.replace(/^##/, '').trim(), - logs: [] - }) - }else { - sections.slice(-1)[0].logs.push(v.replace(/^-/, '').trim()) - } - - return sections - }, []); - console.log(this.changelog); + this.changelog = DOMPurify.sanitize(marked('##' + changelog.replace(/^(.*?)##/s, ''))); }, components: { Abstract, GithubContributors }, } - \ No newline at end of file + + + \ No newline at end of file