Add multiline math syntax
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<span v-html="compiledFormula"></span>
|
||||
<div v-if="block" v-html="compiledFormula"></div>
|
||||
<span v-else v-html="compiledFormula"></span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -11,6 +12,10 @@ export default Vue.extend({
|
||||
formula: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
block: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-formula :formula="formula"/>
|
||||
<x-formula :formula="formula" :block="block" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -14,6 +14,10 @@ export default Vue.extend({
|
||||
formula: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
block: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -228,12 +228,24 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||
})];
|
||||
}
|
||||
|
||||
case 'math': {
|
||||
case 'mathInline': {
|
||||
//const MkFormula = () => import('./formula.vue').then(m => m.default);
|
||||
return [createElement(MkFormula, {
|
||||
key: Math.random(),
|
||||
props: {
|
||||
formula: token.node.props.formula
|
||||
formula: token.node.props.formula,
|
||||
block: false
|
||||
}
|
||||
})];
|
||||
}
|
||||
|
||||
case 'mathBlock': {
|
||||
//const MkFormula = () => import('./formula.vue').then(m => m.default);
|
||||
return [createElement(MkFormula, {
|
||||
key: Math.random(),
|
||||
props: {
|
||||
formula: token.node.props.formula,
|
||||
block: true
|
||||
}
|
||||
})];
|
||||
}
|
||||
|
Reference in New Issue
Block a user