~~foo~~ unterstützt",
"editorMarkdownInlineSup": "Markdown Inline-Hochstellungssyntax",
- "editorMarkdownInlineSupTip": "Nach der Aktivierung wird die Eingabe von ^foo^ Inline-Hochstellungssyntax unterstützt.",
+ "editorMarkdownInlineSupTip": "Nach der Aktivierung wird die Eingabe der Inline-Hochstellungssyntax ^foo^ unterstützt",
"editorMarkdownInlineSub": "Markdown Inline-Tiefstellungssyntax",
- "editorMarkdownInlineSubTip": "Nach der Aktivierung wird die Eingabe von ~foo~ Inline-Tiefstellungssyntax unterstützt.",
+ "editorMarkdownInlineSubTip": "Nach der Aktivierung wird die Eingabe der Inline-Tiefstellungssyntax ~foo~ unterstützt",
"editorMarkdownInlineTag": "Markdown Inline-Tag-Syntax",
- "editorMarkdownInlineTagTip": "Nach der Aktivierung wird die Eingabe von #foo# Inline-Tag-Syntax unterstützt.",
+ "editorMarkdownInlineTagTip": "Nach der Aktivierung wird die Eingabe der Inline-Tag-Syntax #foo# unterstützt",
"editorMarkdownInlineMath": "Markdown Inline-Formelsyntax",
- "editorMarkdownInlineMathTip": "Nach der Aktivierung wird die Eingabe von $foo$ Inline-Formelsyntax unterstützt.",
+ "editorMarkdownInlineMathTip": "Nach der Aktivierung wird die Eingabe der Inline-Formelsyntax $foo$ unterstützt",
"editorMarkdownInlineAsterisk": "Markdown Inline-Asterisk-Syntax",
- "editorMarkdownInlineAsteriskTip": "Nach der Aktivierung wird die Eingabe von *foo* Kursivsatz- und **foo** Fettschrift-Syntax unterstützt.",
+ "editorMarkdownInlineAsteriskTip": "Nach der Aktivierung wird die Eingabe der Inline-Asterisk-Syntax *foo* und **foo** unterstützt",
"editorMarkdownInlineUnderscore": "Markdown Inline-Unterstreichungssyntax",
- "editorMarkdownInlineUnderscoreTip": "Nach der Aktivierung wird die Eingabe von _foo_ Kursivsatz- und __foo__ Fettschrift-Syntax unterstützt.",
+ "editorMarkdownInlineUnderscoreTip": "Nach der Aktivierung wird die Eingabe der Inline-Unterstreichungssyntax _foo_ und __foo__ unterstützt",
"currentNotebook": "Aktuelles Notizbuch",
"containerBlockTip1": "Die Aktivierung von Containerblöcken führt zu doppelten Suchergebnissen.",
"containerBlockTip2": "Die Aktivierung von Dokumentenblöcken unterstützt derzeit nur die Suche nach Dokumenttiteln.",
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index fa91abb1f..7d8ffaa71 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -44,18 +44,20 @@
"autoLaunchMode0": "Do not launch automatically",
"autoLaunchMode1": "Auto launch after booting",
"autoLaunchMode2": "Auto launch and minimize the main interface after booting",
+ "editorMarkdownInlineStrikethrough": "Markdown inline strikethrough syntax",
+ "editorMarkdownInlineStrikethroughTip": "After enabling, the ~~foo~~ inline strikethrough syntax input will be supported",
"editorMarkdownInlineSup": "Markdown inline superscript syntax",
- "editorMarkdownInlineSupTip": "After enabling, ^foo^ inline superscript syntax input will be supported",
+ "editorMarkdownInlineSupTip": "After enabling, the ^foo^ inline superscript syntax input will be supported",
"editorMarkdownInlineSub": "Markdown inline subscript syntax",
- "editorMarkdownInlineSubTip": "After enabling, ~foo~ inline subscript syntax input will be supported",
+ "editorMarkdownInlineSubTip": "After enabling, the ~foo~ inline subscript syntax input will be supported",
"editorMarkdownInlineTag": "Markdown inline tag syntax",
- "editorMarkdownInlineTagTip": "After enabling, #foo# inline tag input syntax will be supported",
+ "editorMarkdownInlineTagTip": "After enabling, the #foo# inline tag syntax input will be supported",
"editorMarkdownInlineMath": "Markdown inline formula syntax",
- "editorMarkdownInlineMathTip": "After enabling, $foo$ inline formula syntax input will be supported",
+ "editorMarkdownInlineMathTip": "After enabling, the $foo$ inline formula syntax input will be supported",
"editorMarkdownInlineAsterisk": "Markdown inline asterisk syntax",
- "editorMarkdownInlineAsteriskTip": "After enabling, *foo* italic syntax and **foo** bold syntax input will be supported",
+ "editorMarkdownInlineAsteriskTip": "After enabling, the *foo* italic syntax and the **foo** bold syntax input will be supported",
"editorMarkdownInlineUnderscore": "Markdown inline underline syntax",
- "editorMarkdownInlineUnderscoreTip": "After enabling, _foo_ italic syntax and __foo__ bold syntax input will be supported",
+ "editorMarkdownInlineUnderscoreTip": "After enabling, the _foo_ italic syntax and the __foo__ bold syntax input will be supported",
"currentNotebook": "Current Notebook",
"containerBlockTip1": "Enabling container blocks will result in duplicate search results",
"containerBlockTip2": "Enabling document blocks currently only supports searching for document titles",
diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json
index 9c87f0dc2..d38cde7f2 100644
--- a/app/appearance/langs/es_ES.json
+++ b/app/appearance/langs/es_ES.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "No iniciar automáticamente",
"autoLaunchMode1": "Inicio automático después del arranque",
"autoLaunchMode2": "Iniciar automáticamente y minimizar la interfaz principal después del arranque",
+ "editorMarkdownInlineStrikethrough": "Sintaxis de tachado en línea de Markdown",
+ "editorMarkdownInlineStrikethroughTip": "Una vez habilitado, se admitirá la entrada de sintaxis de tachado en línea ~~foo~~",
"editorMarkdownInlineSup": "Sintaxis de superíndice en línea de Markdown",
"editorMarkdownInlineSupTip": "Después de habilitar, se admitirá la entrada de sintaxis de superíndice en línea ^foo^",
"editorMarkdownInlineSub": "Sintaxis del subíndice en línea de Markdown",
@@ -53,7 +55,7 @@
"editorMarkdownInlineMath": "Sintaxis de fórmula en línea de Markdown",
"editorMarkdownInlineMathTip": "Después de habilitar, se admitirá la entrada de sintaxis de fórmula en línea $foo$",
"editorMarkdownInlineAsterisk": "Sintaxis de asterisco en línea de Markdown",
- "editorMarkdownInlineAsteriskTip": "Después de habilitar, se admitirá la entrada de sintaxis *foo* en cursiva y **foo** en negrita" ,
+ "editorMarkdownInlineAsteriskTip": "Después de habilitar, se admitirá la entrada de sintaxis *foo* en cursiva y **foo** en negrita",
"editorMarkdownInlineUnderscore": "Sintaxis de subrayado en línea de Markdown",
"editorMarkdownInlineUnderscoreTip": "Después de habilitar, se admitirá la sintaxis _foo_ en cursiva y __foo__ en negrita",
"currentNotebook": "Cuaderno actual",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index 7254426c3..154d7af33 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "Ne pas lancer automatiquement",
"autoLaunchMode1": "Lancement automatique après le démarrage",
"autoLaunchMode2": "Lancement automatique et minimisation de l'interface principale après le démarrage",
+ "editorMarkdownInlineStrikethrough": "Syntaxe de ligne barrée Markdown",
+ "editorMarkdownInlineStrikethroughTip": "Une fois activé, la saisie de la syntaxe de ligne barrée ~~foo~~ sera prise en charge",
"editorMarkdownInlineSup": "Syntaxe exposant Markdown en ligne",
"editorMarkdownInlineSupTip": "Après l'activation, la saisie de la syntaxe en exposant ^foo^ en ligne sera prise en charge",
"editorMarkdownInlineSub": "Syntaxe d'indice en ligne Markdown",
@@ -53,7 +55,7 @@
"editorMarkdownInlineMath": "Syntaxe de formule en ligne Markdown",
"editorMarkdownInlineMathTip": "Après l'activation, la saisie de la syntaxe de formule en ligne $foo$ sera prise en charge",
"editorMarkdownInlineAsterisk": "Syntaxe d'astérisque en ligne Markdown",
- "editorMarkdownInlineAsteriskTip": "Après l'activation, la syntaxe *foo* italique et la syntaxe **foo** en gras seront prises en charge" ,
+ "editorMarkdownInlineAsteriskTip": "Après l'activation, la syntaxe *foo* italique et la syntaxe **foo** en gras seront prises en charge",
"editorMarkdownInlineUnderscore": "Syntaxe de soulignement en ligne Markdown",
"editorMarkdownInlineUnderscoreTip": "Après l'activation, la syntaxe _foo_ italique et la syntaxe __foo__ gras seront prises en charge",
"currentNotebook": "Carnet actuel",
diff --git a/app/appearance/langs/he_IL.json b/app/appearance/langs/he_IL.json
index dcea7fbf5..537c74d93 100644
--- a/app/appearance/langs/he_IL.json
+++ b/app/appearance/langs/he_IL.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "אל תצא אוטומטית",
"autoLaunchMode1": "צא אוטומטית לאחר אתחול",
"autoLaunchMode2": "צא אוטומטית ומזער את הממשק העיקרי לאחר אתחול",
+ "editorMarkdownInlineStrikethrough": "תחביר קו חוצה בשורת Markdown",
+ "editorMarkdownInlineStrikethroughTip": "לאחר ההפעלה, ייתמך קלט תחביר קו חוצה בשורת ~~foo~~",
"editorMarkdownInlineSup": "תחביר עליון בתוך Markdown",
"editorMarkdownInlineSupTip": "לאחר הפעלה, ^foo^ תחביר עליון פנימי יתמוך בקלט",
"editorMarkdownInlineSub": "תחביר תת-מצבה בתוך Markdown",
@@ -55,7 +57,7 @@
"editorMarkdownInlineAsterisk": "שימוש בתחביר כוכבית פנימית ב-Markdown",
"editorMarkdownInlineAsteriskTip": "לאחר הפעלה, *foo* תחביר נטוי ו **foo** תחביר מודגש יתמוך בקלט",
"editorMarkdownInlineUnderscore": "שימוש בתחביר קו תחתון פנימי ב-Markdown",
- "editorMarkdownInlineUnderscoreTip": "לאחר הפעלה, _foo_ תחביר נטוי ו __foo__ תחביר מודגש יתמוך בקלט",
+ "editorMarkdownInlineUnderscoreTip": "לאחר הפעלה, _foo_ תחביר נטוי ו __foo__ תחביר מודגש יתמוך בקלט"
"currentNotebook": "מחברת נוכחית",
"containerBlockTip1": "הפעלת בלוקים יחידתיים תוביל לתוצאות חיפוש כפולות",
"containerBlockTip2": "הפעלת בלוקי מסמכים תומכת כרגע רק בחיפוש הכותרות של המסמכים",
diff --git a/app/appearance/langs/it_IT.json b/app/appearance/langs/it_IT.json
index 8cefde096..5c480b293 100644
--- a/app/appearance/langs/it_IT.json
+++ b/app/appearance/langs/it_IT.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "Non avviare automaticamente",
"autoLaunchMode1": "Avvio automatico dopo l'accensione",
"autoLaunchMode2": "Avvio automatico e minimizzazione dell'interfaccia principale dopo l'accensione",
+ "editorMarkdownInlineStrikethrough": "Sintassi di barratura in linea di Markdown",
+ "editorMarkdownInlineStrikethroughTip": "Dopo l'attivazione, sarà supportato l'inserimento della sintassi di barratura in linea ~~foo~~",
"editorMarkdownInlineSup": "Sintassi Markdown per apice in linea",
"editorMarkdownInlineSupTip": "Dopo l'abilitazione, verrà supportato l'input della sintassi per apice in linea ^foo^",
"editorMarkdownInlineSub": "Sintassi Markdown per pedice in linea",
@@ -55,7 +57,7 @@
"editorMarkdownInlineAsterisk": "Sintassi asterisco in linea Markdown",
"editorMarkdownInlineAsteriskTip": "Dopo aver attivato, saranno supportate la sintassi in corsivo *foo* e la sintassi in grassetto **foo**",
"editorMarkdownInlineUnderscore": "Sintassi underscore in linea Markdown",
- "editorMarkdownInlineUnderscoreTip": "Dopo aver attivato, saranno supportate la sintassi in corsivo _foo_ e la sintassi in grassetto __foo__",
+ "editorMarkdownInlineUnderscoreTip": "Dopo aver attivato, saranno supportate la sintassi in corsivo _foo_ e la sintassi in grassetto __foo__"
"currentNotebook": "Taccuino corrente",
"containerBlockTip1": "L'abilitazione dei blocchi contenitore comporterà risultati di ricerca duplicati",
"containerBlockTip2": "L'abilitazione dei blocchi documento attualmente supporta solo la ricerca per titoli di documento",
diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json
index 870edfcb8..2cfdc7e63 100644
--- a/app/appearance/langs/ja_JP.json
+++ b/app/appearance/langs/ja_JP.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "自動的に起動しない",
"autoLaunchMode1": "システムの起動後に自動的に起動する",
"autoLaunchMode2": "システムの起動後にインターフェースを最小化して自動的に起動する",
+ "editorMarkdownInlineStrikethrough": "Markdown 行内取り消し線の構文",
+ "editorMarkdownInlineStrikethroughTip": "~~foo~~ 形式のインライン取り消し線構文を有効にします",
"editorMarkdownInlineSup": "Markdown インライン上付き文字構文",
"editorMarkdownInlineSupTip": "^foo^ 形式のインライン上付き文字構文を有効にします",
"editorMarkdownInlineSub": "Markdown インライン下付き文字構文",
@@ -55,7 +57,7 @@
"editorMarkdownInlineAsterisk": "Markdown インラインアスタリスク構文",
"editorMarkdownInlineAsteriskTip": "*foo* 形式の斜体構文と **foo** 形式の太字構文を有効にします",
"editorMarkdownInlineUnderscore": "Markdown インライン下線構文",
- "editorMarkdownInlineUnderscoreTip": "_foo_ 形式の斜体構文と __foo__ 形式の太字構文を有効にします",
+ "editorMarkdownInlineUnderscoreTip": "_foo_ 形式の斜体構文と __foo__ 形式の太字構文を有効にします"
"currentNotebook": "現在のノートブック",
"containerBlockTip1": "コンテナブロックを有効にすると重複した検索結果が表示されます",
"containerBlockTip2": "ドキュメントブロックはタイトルの検索のみをサポートしています",
diff --git a/app/appearance/langs/pl_PL.json b/app/appearance/langs/pl_PL.json
index 6a42ac37f..261060978 100644
--- a/app/appearance/langs/pl_PL.json
+++ b/app/appearance/langs/pl_PL.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "Nie uruchamiaj automatycznie",
"autoLaunchMode1": "Uruchom automatycznie po włączeniu",
"autoLaunchMode2": "Uruchom automatycznie i zminimalizuj główny interfejs po włączeniu",
+ "editorMarkdownInlineStrikethrough": "Markdown składnia przekreślenia",
+ "editorMarkdownInlineStrikethroughTip": "Po włączeniu będzie obsługiwane wprowadzanie składni przekreślenia ~~foo~~",
"editorMarkdownInlineSup": "Składnia Markdown dla indeksów dolnych w tekście",
"editorMarkdownInlineSupTip": "Po włączeniu zostanie obsługiwana składnia indeksów dolnych w formacie ^foo^",
"editorMarkdownInlineSub": "Składnia Markdown dla indeksów górnych w tekście",
diff --git a/app/appearance/langs/ru_RU.json b/app/appearance/langs/ru_RU.json
index e097cef89..4546cbe8d 100644
--- a/app/appearance/langs/ru_RU.json
+++ b/app/appearance/langs/ru_RU.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "Не запускать автоматически",
"autoLaunchMode1": "Автозапуск после загрузки",
"autoLaunchMode2": "Автозапуск и минимизация главного интерфейса после загрузки",
+ "editorMarkdownInlineStrikethrough": "Markdown синтаксис зачёркивания",
+ "editorMarkdownInlineStrikethroughTip": "После включения будет поддерживаться ввод синтаксиса зачёркивания ~~foo~~",
"editorMarkdownInlineSup": "Markdown синтаксис для надстрочного индекса",
"editorMarkdownInlineSupTip": "После включения будет поддерживаться ввод надстрочного индекса ^foo^",
"editorMarkdownInlineSub": "Markdown синтаксис для подстрочного индекса",
@@ -1556,5 +1558,5 @@
"246": "Название документа не может содержать / и было заменено на _",
"247": "Файл [%s] больше максимального ограничения [%s] и был проигнорирован для загрузки в облако",
"248": "Целевой заголовок находится в контейнерном блоке и не может использоваться как пункт сброса"
- }
+ }
}
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index f055e5dfa..c6c916072 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "不自動啟動",
"autoLaunchMode1": "開機自動啟動",
"autoLaunchMode2": "開機後自動啟動並最小化主介面",
+ "editorMarkdownInlineStrikethrough": "Markdown 行級刪除線語法",
+ "editorMarkdownInlineStrikethroughTip": "啟用後將支持 ~~foo~~ 行級刪除線語法輸入",
"editorMarkdownInlineSup": "Markdown 行級上標語法",
"editorMarkdownInlineSupTip": "啟用後將支援 ^foo^ 行級上標語法輸入",
"editorMarkdownInlineSub": "Markdown 行級下標語法",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index dbc0beb24..eeecea70e 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -44,6 +44,8 @@
"autoLaunchMode0": "不自动启动",
"autoLaunchMode1": "开机后自动启动",
"autoLaunchMode2": "开机后自动启动并最小化主界面",
+ "editorMarkdownInlineStrikethrough": "Markdown 行级删除线语法",
+ "editorMarkdownInlineStrikethroughTip": "启用后将支持 ~~foo~~ 行级删除线语法输入",
"editorMarkdownInlineSup": "Markdown 行级上标语法",
"editorMarkdownInlineSupTip": "启用后将支持 ^foo^ 行级上标语法输入",
"editorMarkdownInlineSub": "Markdown 行级下标语法",
diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts
index 1649cc032..5c526f81e 100644
--- a/app/src/config/editor.ts
+++ b/app/src/config/editor.ts
@@ -319,6 +319,14 @@ export const editor = {
+
+`;
},
bindEvent: () => {
@@ -353,7 +361,8 @@ export const editor = {
inlineSup: (editor.element.querySelector("#editorMarkdownInlineSup") as HTMLInputElement).checked,
inlineSub: (editor.element.querySelector("#editorMarkdownInlineSub") as HTMLInputElement).checked,
inlineTag: (editor.element.querySelector("#editorMarkdownInlineTag") as HTMLInputElement).checked,
- inlineMath: (editor.element.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked
+ inlineMath: (editor.element.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked,
+ inlineStrikethrough: (editor.element.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked
},
allowHTMLBLockScript: (editor.element.querySelector("#allowHTMLBLockScript") as HTMLInputElement).checked,
justify: (editor.element.querySelector("#justify") as HTMLInputElement).checked,
diff --git a/app/src/mobile/settings/editor.ts b/app/src/mobile/settings/editor.ts
index d9ef8596d..1db63aa33 100644
--- a/app/src/mobile/settings/editor.ts
+++ b/app/src/mobile/settings/editor.ts
@@ -20,7 +20,8 @@ const setEditor = (modelMainElement: Element) => {
inlineSup: (modelMainElement.querySelector("#editorMarkdownInlineSup") as HTMLInputElement).checked,
inlineSub: (modelMainElement.querySelector("#editorMarkdownInlineSub") as HTMLInputElement).checked,
inlineTag: (modelMainElement.querySelector("#editorMarkdownInlineTag") as HTMLInputElement).checked,
- inlineMath: (modelMainElement.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked
+ inlineMath: (modelMainElement.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked,
+ inlineStrikethrough: (modelMainElement.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked
};
window.siyuan.config.editor.allowHTMLBLockScript = (modelMainElement.querySelector("#allowHTMLBLockScript") as HTMLInputElement).checked;
window.siyuan.config.editor.dynamicLoadBlocks = dynamicLoadBlocks;
@@ -312,6 +313,14 @@ export const initEditor = () => {
+
+`,
bindEvent(modelMainElement: HTMLElement) {
modelMainElement.querySelector("#clearHistory").addEventListener("click", () => {
diff --git a/app/src/protyle/render/setLute.ts b/app/src/protyle/render/setLute.ts
index 5578e5664..fe476b304 100644
--- a/app/src/protyle/render/setLute.ts
+++ b/app/src/protyle/render/setLute.ts
@@ -31,6 +31,7 @@ export const setLute = (options: ILuteOptions) => {
lute.SetSub(window.siyuan.config.editor.markdown.inlineSub);
lute.SetTag(window.siyuan.config.editor.markdown.inlineTag);
lute.SetInlineMath(window.siyuan.config.editor.markdown.inlineMath);
+ lute.SetGFMStrikethrough(window.siyuan.config.editor.markdown.inlineStrikethrough);
lute.SetGFMStrikethrough1(false);
lute.SetSpin(true);
lute.SetProtyleWYSIWYG(true);
diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts
index e6fb4831a..98da788a5 100644
--- a/app/src/protyle/util/reload.ts
+++ b/app/src/protyle/util/reload.ts
@@ -32,6 +32,7 @@ export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?
protyle.lute.SetSub(window.siyuan.config.editor.markdown.inlineSub);
protyle.lute.SetTag(window.siyuan.config.editor.markdown.inlineTag);
protyle.lute.SetInlineMath(window.siyuan.config.editor.markdown.inlineMath);
+ protyle.lute.SetGFMStrikethrough(window.siyuan.config.editor.markdown.inlineStrikethrough);
protyle.lute.SetGFMStrikethrough1(false);
addLoading(protyle);
if (protyle.options.backlinkData) {
diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.ts
index 6a6bec038..14c34d48b 100644
--- a/app/src/types/config.d.ts
+++ b/app/src/types/config.d.ts
@@ -312,6 +312,10 @@ declare namespace Config {
* Whether to enable the inline math
*/
inlineMath: boolean;
+ /**
+ * Whether to enable the inline strikethrough
+ */
+ inlineStrikethrough: boolean;
}
/**
diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts
index caa37a9d4..bbf8f5a76 100644
--- a/app/src/types/protyle.d.ts
+++ b/app/src/types/protyle.d.ts
@@ -206,6 +206,8 @@ declare class Lute {
public SetInlineMath(enable: boolean): void;
+ public SetGFMStrikethrough(enable: boolean): void;
+
public SetGFMStrikethrough1(enable: boolean): void;
public SetMark(enable: boolean): void;
diff --git a/kernel/util/lute.go b/kernel/util/lute.go
index da1505512..98beaee2b 100644
--- a/kernel/util/lute.go
+++ b/kernel/util/lute.go
@@ -26,21 +26,23 @@ import (
// MarkdownSettings 运行时 Markdown 配置。
var MarkdownSettings = &Markdown{
- InlineAsterisk: true,
- InlineUnderscore: true,
- InlineSup: true,
- InlineSub: true,
- InlineTag: true,
- InlineMath: true,
+ InlineAsterisk: true,
+ InlineUnderscore: true,
+ InlineSup: true,
+ InlineSub: true,
+ InlineTag: true,
+ InlineMath: true,
+ InlineStrikethrough: true,
}
type Markdown struct {
- InlineAsterisk bool `json:"inlineAsterisk"` // 是否启用行级 * 语法
- InlineUnderscore bool `json:"inlineUnderscore"` // 是否启用行级 _ 语法
- InlineSup bool `json:"inlineSup"` // 是否启用行级上标
- InlineSub bool `json:"inlineSub"` // 是否启用行级下标
- InlineTag bool `json:"inlineTag"` // 是否启用行级标签
- InlineMath bool `json:"inlineMath"` // 是否启用行级公式
+ InlineAsterisk bool `json:"inlineAsterisk"` // 是否启用行级 * 语法
+ InlineUnderscore bool `json:"inlineUnderscore"` // 是否启用行级 _ 语法
+ InlineSup bool `json:"inlineSup"` // 是否启用行级上标
+ InlineSub bool `json:"inlineSub"` // 是否启用行级下标
+ InlineTag bool `json:"inlineTag"` // 是否启用行级标签
+ InlineMath bool `json:"inlineMath"` // 是否启用行级公式
+ InlineStrikethrough bool `json:"inlineStrikethrough"` // 是否启用行级删除线
}
func NewLute() (ret *lute.Lute) {
@@ -61,6 +63,7 @@ func NewLute() (ret *lute.Lute) {
ret.SetSub(MarkdownSettings.InlineSub)
ret.SetTag(MarkdownSettings.InlineTag)
ret.SetInlineMath(MarkdownSettings.InlineMath)
+ ret.SetGFMStrikethrough(MarkdownSettings.InlineStrikethrough)
ret.SetInlineMathAllowDigitAfterOpenMarker(true)
ret.SetGFMStrikethrough1(false)
ret.SetFootnotes(false)
@@ -96,6 +99,7 @@ func NewStdLute() (ret *lute.Lute) {
ret.SetSub(MarkdownSettings.InlineSub)
ret.SetTag(MarkdownSettings.InlineTag)
ret.SetInlineMath(MarkdownSettings.InlineMath)
+ ret.SetGFMStrikethrough(MarkdownSettings.InlineStrikethrough)
ret.SetGFMStrikethrough1(false)
return
}