Use FEP-c16b: Formatting MFM functions #410
2 changed files with 16 additions and 1 deletions
|
@ -191,6 +191,21 @@ export default {
|
||||||
if (this.handleLinks && attrs?.['class']?.includes?.('h-card')) {
|
if (this.handleLinks && attrs?.['class']?.includes?.('h-card')) {
|
||||||
return ['', children.map(processItem), '']
|
return ['', children.map(processItem), '']
|
||||||
}
|
}
|
||||||
|
// Turn data-mfm- attributes into a string for the `style` attribute
|
||||||
|
// If they have a value different than `true`, they need to be added to `style`
|
||||||
|
// e.g. `attrs={'data-mfm-some': '1deg', 'data-mfm-thing': '5s'}` => "--mfm-some: 1deg;--mfm-thing: 5s;"
|
||||||
|
let mfm_style = Object.keys(attrs).filter(
|
||||||
|
(key) => key.startsWith('data-mfm-') && attrs[key] !== true
|
||||||
|
).map(
|
||||||
|
(key) => '--mfm-' + key.substr(9) + ': ' + attrs[key] + ';'
|
||||||
|
).reduce((a,v) => a+v, "")
|
||||||
|
if (mfm_style !== "") {
|
||||||
|
return [
|
||||||
|
opener.slice(0,-1) + " style=\"" + mfm_style + "\">",
|
||||||
|
children.map(processItem),
|
||||||
|
closer
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (children !== undefined) {
|
if (children !== undefined) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="StatusBody"
|
class="StatusBody"
|
||||||
:class="{ '-compact': compact, 'mfm-disabled': !renderMisskeyMarkdown }"
|
:class="{ '-compact': compact }"
|
||||||
>
|
>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue