You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Tools: Add Open Graph tags to website
This commit is contained in:
@@ -15,8 +15,17 @@ export class MarkupLanguageUtils {
|
||||
throw new Error(`Unsupported markup language: ${language}`);
|
||||
}
|
||||
|
||||
public extractImageUrls(language: MarkupLanguage, text: string) {
|
||||
return this.lib_(language).extractImageUrls(text);
|
||||
public extractImageUrls(language: MarkupLanguage, text: string): string[] {
|
||||
let urls: string[] = [];
|
||||
|
||||
if (language === MarkupLanguage.Any) {
|
||||
urls = urls.concat(this.lib_(MarkupLanguage.Markdown).extractImageUrls(text));
|
||||
urls = urls.concat(this.lib_(MarkupLanguage.Html).extractImageUrls(text));
|
||||
} else {
|
||||
urls = this.lib_(language).extractImageUrls(text);
|
||||
}
|
||||
|
||||
return urls;
|
||||
}
|
||||
|
||||
// Create a new MarkupToHtml instance while injecting options specific to Joplin
|
||||
|
||||
Reference in New Issue
Block a user