Fix duplicate version nums + etc (#831)

* Fix duplicate version nums + etc

* Update link info

* Remove useless loading conditions

* Update pages/legal/privacy.vue

Co-authored-by: triphora <emmaffle@modrinth.com>

* Update plugins/xss.js

Co-authored-by: triphora <emmaffle@modrinth.com>

Co-authored-by: triphora <emmaffle@modrinth.com>
This commit is contained in:
Geometrically
2023-01-03 19:06:30 -07:00
committed by GitHub
parent d2b1404907
commit b4236b9a95
21 changed files with 243 additions and 263 deletions

23
plugins/markdown.js Normal file
View File

@@ -0,0 +1,23 @@
import MarkdownIt from 'markdown-it'
export default (ctx, inject) => {
const md = new MarkdownIt('default', {
html: true,
linkify: true,
breaks: false,
})
const defaultRender =
md.renderer.rules.link_open ||
function (tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options)
}
md.renderer.rules.link_open = function (tokens, idx, options, env, self) {
tokens[idx].attrJoin('rel', 'noopener noreferrer ugc')
return defaultRender(tokens, idx, options, env, self)
}
inject('md', md)
}