mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-06 08:36:02 +08:00
fix: content suffix for markdown respond format
This commit is contained in:
parent
cc6d2f3e29
commit
a453ab5f16
@ -410,10 +410,6 @@ export class SnapshotFormatter extends AsyncService {
|
||||
Object.assign(f, formatted);
|
||||
|
||||
const textRepresentation = (function (this: typeof formatted) {
|
||||
if (mode.includes('markdown')) {
|
||||
return this.content as string;
|
||||
}
|
||||
|
||||
const mixins = [];
|
||||
if (this.publishedTime) {
|
||||
mixins.push(`Published Time: ${this.publishedTime}`);
|
||||
@ -450,6 +446,11 @@ export class SnapshotFormatter extends AsyncService {
|
||||
mixins.push(`Warning: ${this.warning}`);
|
||||
}
|
||||
|
||||
if (mode.includes('markdown')) {
|
||||
return `${mixins.length ? `${mixins.join('\n\n')}\n\n` : ''}${this.content}
|
||||
${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
|
||||
}
|
||||
|
||||
return `Title: ${this.title}
|
||||
|
||||
URL Source: ${this.url}
|
||||
|
Loading…
x
Reference in New Issue
Block a user