markdown support dropped
This commit is contained in:
parent
6da2e4f0e5
commit
6d0efd09a3
|
@ -118,11 +118,6 @@
|
||||||
"lint-staged": "15.0.2",
|
"lint-staged": "15.0.2",
|
||||||
"loglevel": "1.8.1",
|
"loglevel": "1.8.1",
|
||||||
"loglevel-plugin-prefix": "0.8.4",
|
"loglevel-plugin-prefix": "0.8.4",
|
||||||
"markdown-it": "13.0.1",
|
|
||||||
"markdown-it-container": "3.0.0",
|
|
||||||
"markdown-it-implicit-figures": "0.11.0",
|
|
||||||
"markdown-it-mark": "3.0.1",
|
|
||||||
"markdown-it-replace-link": "1.2.0",
|
|
||||||
"nanostores": "0.7.4",
|
"nanostores": "0.7.4",
|
||||||
"prettier": "3.0.3",
|
"prettier": "3.0.3",
|
||||||
"prettier-eslint": "16.1.2",
|
"prettier-eslint": "16.1.2",
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { Popover } from '../../_shared/Popover'
|
||||||
import { Icon } from '../../_shared/Icon'
|
import { Icon } from '../../_shared/Icon'
|
||||||
import styles from './AudioPlayer.module.scss'
|
import styles from './AudioPlayer.module.scss'
|
||||||
import { GrowingTextarea } from '../../_shared/GrowingTextarea'
|
import { GrowingTextarea } from '../../_shared/GrowingTextarea'
|
||||||
import MD from '../MD'
|
|
||||||
import { MediaItem } from '../../../pages/types'
|
import { MediaItem } from '../../../pages/types'
|
||||||
import SimplifiedEditor from '../../Editor/SimplifiedEditor'
|
import SimplifiedEditor from '../../Editor/SimplifiedEditor'
|
||||||
|
|
||||||
|
@ -146,12 +145,12 @@ export const PlayerPlaylist = (props: Props) => {
|
||||||
<div class={styles.descriptionBlock}>
|
<div class={styles.descriptionBlock}>
|
||||||
<Show when={mi.body}>
|
<Show when={mi.body}>
|
||||||
<div class={styles.description}>
|
<div class={styles.description}>
|
||||||
<MD body={mi.body} />
|
<div innerHTML={mi.body} />
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={mi.lyrics}>
|
<Show when={mi.lyrics}>
|
||||||
<div class={styles.lyrics}>
|
<div class={styles.lyrics}>
|
||||||
<MD body={mi.lyrics} />
|
<div innerHTML={mi.lyrics} />
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Show, createMemo, createSignal, For, lazy, Suspense } from 'solid-js'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { getPagePath } from '@nanostores/router'
|
import { getPagePath } from '@nanostores/router'
|
||||||
|
|
||||||
import MD from '../MD'
|
|
||||||
import { Userpic } from '../../Author/Userpic'
|
import { Userpic } from '../../Author/Userpic'
|
||||||
import { CommentRatingControl } from '../CommentRatingControl'
|
import { CommentRatingControl } from '../CommentRatingControl'
|
||||||
import { CommentDate } from '../CommentDate'
|
import { CommentDate } from '../CommentDate'
|
||||||
|
@ -171,7 +170,7 @@ export const Comment = (props: Props) => {
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div class={styles.commentBody}>
|
<div class={styles.commentBody}>
|
||||||
<Show when={editMode()} fallback={<MD body={body()} />}>
|
<Show when={editMode()} fallback={<div innerHTML={body()} />}>
|
||||||
<Suspense fallback={<p>{t('Loading')}</p>}>
|
<Suspense fallback={<p>{t('Loading')}</p>}>
|
||||||
<SimplifiedEditor
|
<SimplifiedEditor
|
||||||
initialContent={comment().body}
|
initialContent={comment().body}
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { createEffect, For, createMemo, onMount, Show, createSignal, onCleanup }
|
||||||
import { Title } from '@solidjs/meta'
|
import { Title } from '@solidjs/meta'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { getPagePath } from '@nanostores/router'
|
import { getPagePath } from '@nanostores/router'
|
||||||
import MD from './MD'
|
|
||||||
import type { Author, Shout } from '../../graphql/types.gen'
|
import type { Author, Shout } from '../../graphql/types.gen'
|
||||||
import { useSession } from '../../context/session'
|
import { useSession } from '../../context/session'
|
||||||
import { useLocalize } from '../../context/localize'
|
import { useLocalize } from '../../context/localize'
|
||||||
|
@ -319,7 +318,7 @@ export const FullArticle = (props: Props) => {
|
||||||
description={m.body}
|
description={m.body}
|
||||||
/>
|
/>
|
||||||
<Show when={m?.body}>
|
<Show when={m?.body}>
|
||||||
<MD body={m.body} />
|
<div innerHTML={m.body} />
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -329,9 +328,7 @@ export const FullArticle = (props: Props) => {
|
||||||
|
|
||||||
<Show when={body()}>
|
<Show when={body()}>
|
||||||
<div id="shoutBody" class={styles.shoutBody} onClick={handleArticleBodyClick}>
|
<div id="shoutBody" class={styles.shoutBody} onClick={handleArticleBodyClick}>
|
||||||
<Show when={!body().startsWith('<')} fallback={<div innerHTML={body()} />}>
|
<div innerHTML={body()} />
|
||||||
<MD body={body()} />
|
|
||||||
</Show>
|
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
import MD from 'markdown-it'
|
|
||||||
import mdfig from 'markdown-it-implicit-figures'
|
|
||||||
import mdmark from 'markdown-it-mark'
|
|
||||||
import mdcustom from 'markdown-it-container'
|
|
||||||
import mdlinks from 'markdown-it-replace-link'
|
|
||||||
import { createMemo } from 'solid-js'
|
|
||||||
|
|
||||||
const mit = MD({
|
|
||||||
html: true,
|
|
||||||
linkify: true,
|
|
||||||
typographer: true
|
|
||||||
})
|
|
||||||
mit.use(mdmark)
|
|
||||||
mit.use(mdcustom)
|
|
||||||
mit.use(mdfig, {
|
|
||||||
dataType: false, // <figure data-type="image">
|
|
||||||
figcaption: true // <figcaption>alternative text</figcaption>
|
|
||||||
})
|
|
||||||
mit.use(mdlinks)
|
|
||||||
|
|
||||||
export default (props: { body: string }) => {
|
|
||||||
const body = createMemo(() => (props.body.startsWith('<') ? props.body : mit.render(props.body)))
|
|
||||||
return <div innerHTML={body()} />
|
|
||||||
}
|
|
|
@ -11,7 +11,6 @@ import { useSession } from '../../context/session'
|
||||||
import FloatingPanel from '../../components/_shared/FloatingPanel/FloatingPanel'
|
import FloatingPanel from '../../components/_shared/FloatingPanel/FloatingPanel'
|
||||||
import { useSnackbar } from '../../context/snackbar'
|
import { useSnackbar } from '../../context/snackbar'
|
||||||
import { useLocalize } from '../../context/localize'
|
import { useLocalize } from '../../context/localize'
|
||||||
import { Userpic } from '../../components/Author/Userpic'
|
|
||||||
import { createStore } from 'solid-js/store'
|
import { createStore } from 'solid-js/store'
|
||||||
import { clone } from '../../utils/clone'
|
import { clone } from '../../utils/clone'
|
||||||
import SimplifiedEditor from '../../components/Editor/SimplifiedEditor'
|
import SimplifiedEditor from '../../components/Editor/SimplifiedEditor'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user