parse plain Markdown as MFM before falling back to HTML from remote notes
This commit is contained in:
parent
c3a6ba93ca
commit
ec6e4da8b3
1 changed files with 6 additions and 2 deletions
|
|
@ -210,7 +210,9 @@ export class ApNoteService {
|
||||||
const cw = note.summary === '' ? null : note.summary;
|
const cw = note.summary === '' ? null : note.summary;
|
||||||
|
|
||||||
// テキストのパース
|
// テキストのパース
|
||||||
let text = getContentByType(note, 'text/x.misskeymarkdown');
|
let text =
|
||||||
|
getContentByType(note, 'text/x.misskeymarkdown') ??
|
||||||
|
getContentByType(note, 'text/markdown');
|
||||||
if (text == null && typeof note.content === 'string') {
|
if (text == null && typeof note.content === 'string') {
|
||||||
text = this.apMfmService.htmlToMfm(note.content, note.tag);
|
text = this.apMfmService.htmlToMfm(note.content, note.tag);
|
||||||
}
|
}
|
||||||
|
|
@ -407,7 +409,9 @@ export class ApNoteService {
|
||||||
const cw = note.summary === '' ? null : note.summary;
|
const cw = note.summary === '' ? null : note.summary;
|
||||||
|
|
||||||
// テキストのパース
|
// テキストのパース
|
||||||
let text = getContentByType(note, 'text/x.misskeymarkdown');
|
let text =
|
||||||
|
getContentByType(note, 'text/x.misskeymarkdown') ??
|
||||||
|
getContentByType(note, 'text/markdown');
|
||||||
if (text == null && typeof note.content === 'string') {
|
if (text == null && typeof note.content === 'string') {
|
||||||
text = this.apMfmService.htmlToMfm(note.content, note.tag);
|
text = this.apMfmService.htmlToMfm(note.content, note.tag);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue