From 6ddd5b00631278ff7358ed8d70080981f9d65367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Violette?= Date: Mon, 4 Nov 2024 13:12:16 +0100 Subject: [PATCH 1/5] Document CommentDelimiters --- content/en/docs/topics/config/index.md | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/en/docs/topics/config/index.md b/content/en/docs/topics/config/index.md index ef2233a..ffe8273 100644 --- a/content/en/docs/topics/config/index.md +++ b/content/en/docs/topics/config/index.md @@ -207,6 +207,33 @@ BlockIgnores = (?s) *({< output >}.*?{< ?/ ?output >}), \ (?s) *({< highlight .* >}.*?{< ?/ ?highlight >}) ``` +#### CommentDelimiters + +`CommentDelimiters` allow you to override standard, HTML comment delimiters (``). + +Custom comment delimiters are useful when using non-standard formats which do not allow HTML-style comments. + +```ini +[*.md] +CommentDelimiters = "{/*","*/}" +``` + +When `CommentDelimiters` are set, you can take full advantage of [markup-based configuration](/docs/topics/scoping/#markup-based-configuration) to enable or disable specific rules within a section. + +For instance, when using MDX: + +```markup +{/* + +*/} + +We rock! + +{/* + +*/} +``` + #### TokenIgnores {{< alert icon="👉" context="info">}} From 1310b8444b169b91df7bb3f2cbbb56a557296b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Violette?= Date: Mon, 4 Nov 2024 13:18:14 +0100 Subject: [PATCH 2/5] Use markup instead of formats --- content/en/docs/topics/.DS_Store | Bin 0 -> 6148 bytes content/en/docs/topics/config/index.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 content/en/docs/topics/.DS_Store diff --git a/content/en/docs/topics/.DS_Store b/content/en/docs/topics/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8c131656235d1fae6ee77211bf2fd75f6894fa7c GIT binary patch literal 6148 zcmeHK%Sr=55UkdKfn0L*IKSW@3?cb~{6Ih<2(l4H&wKK_{Ipa*2nic6f)}ZV?waZ8 znq}*-y$!%tA5Ra!62P49h%XOQ^KCCsP>xE-t(qT1xSUuTlLa}%{?{85K>xqg|Knh$c zaGTqu_x}z3hxz}Kq@5Iy0{=<@o2|F&6*VFU*Eaf&?ls?ZH?D)i5bc;4?U);H e$M;c`b}.*?{< ?/ ?output >}), \ `CommentDelimiters` allow you to override standard, HTML comment delimiters (``). -Custom comment delimiters are useful when using non-standard formats which do not allow HTML-style comments. +Custom comment delimiters are useful when using non-standard markup which do not allow HTML-style comments. ```ini [*.md] From b528d87a7aac63482922eb20836741ec46910c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Violette?= Date: Mon, 4 Nov 2024 13:19:35 +0100 Subject: [PATCH 3/5] Remove macOS file --- content/en/docs/topics/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 content/en/docs/topics/.DS_Store diff --git a/content/en/docs/topics/.DS_Store b/content/en/docs/topics/.DS_Store deleted file mode 100644 index 8c131656235d1fae6ee77211bf2fd75f6894fa7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%Sr=55UkdKfn0L*IKSW@3?cb~{6Ih<2(l4H&wKK_{Ipa*2nic6f)}ZV?waZ8 znq}*-y$!%tA5Ra!62P49h%XOQ^KCCsP>xE-t(qT1xSUuTlLa}%{?{85K>xqg|Knh$c zaGTqu_x}z3hxz}Kq@5Iy0{=<@o2|F&6*VFU*Eaf&?ls?ZH?D)i5bc;4?U);H e$M;c`b Date: Tue, 5 Nov 2024 10:04:59 +0100 Subject: [PATCH 4/5] Update example --- content/en/docs/topics/.DS_Store | Bin 0 -> 6148 bytes content/en/docs/topics/config/index.md | 29 ++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 content/en/docs/topics/.DS_Store diff --git a/content/en/docs/topics/.DS_Store b/content/en/docs/topics/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..485908296006611d84bf5d5e4262cfb83a8b14f4 GIT binary patch literal 6148 zcmeH~O-chn5QSf9(14pPUG^2c!4TpJasfdl2w@^d1$VQ{we#x7kTA*Cg}j35H(g!T z&3ucgX#h6=dU*h50H$U;UouQ#LY^8v5D#TL)l;2lTx z{VI3G4Oc($gEd~U&Akt6=l4`p1VlgtL_h>Y;4%UBY`5uMszwnI0TDP5@b5#TyLP2R zYJ564#1()#VK|J>ahISr4^X?(A(auDWhpgFt*#iB<&3w=>q>{zEQiI(+^0^qx}jK{ z&UlM-SeL3%1VrGJz;#Y%-v1xz7w-S3MVg6#2>dGoHd!nebG}mb*3rv(uWj@v`mZrJ n(m6ycrba8~#9Q(GQC{}.*?{< ?/ ?output >}), \ Custom comment delimiters are useful when using non-standard markup which do not allow HTML-style comments. ```ini -[*.md] -CommentDelimiters = "{/*","*/}" +[formats] +mdx = md + +[*.mdx] +BasedOnStyles = Vale + +CommentDelimiters = {/*, */} ``` -When `CommentDelimiters` are set, you can take full advantage of [markup-based configuration](/docs/topics/scoping/#markup-based-configuration) to enable or disable specific rules within a section. +When `CommentDelimiters` are set, you can take full advantage of [markup-based configuration](/docs/topics/scoping/#markup-based-configuration) to enable or disable specific rules within a section. For instance, when using MDX: ```markup -{/* - -*/} +{/* vale off */} + +This is some text ACT test + +This is some text ACT test + +{/* vale on */} + +{/* vale vale.Redundancy = NO */} -We rock! +This is some text ACT test -{/* - -*/} +{/* vale vale.Redundancy = YES */} ``` #### TokenIgnores From 4a85b760b83ee7c6b5f7b125c69f80c5e0abe034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Violette?= Date: Tue, 5 Nov 2024 10:12:46 +0100 Subject: [PATCH 5/5] Remove macOS file (again) --- content/en/docs/topics/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 content/en/docs/topics/.DS_Store diff --git a/content/en/docs/topics/.DS_Store b/content/en/docs/topics/.DS_Store deleted file mode 100644 index 485908296006611d84bf5d5e4262cfb83a8b14f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~O-chn5QSf9(14pPUG^2c!4TpJasfdl2w@^d1$VQ{we#x7kTA*Cg}j35H(g!T z&3ucgX#h6=dU*h50H$U;UouQ#LY^8v5D#TL)l;2lTx z{VI3G4Oc($gEd~U&Akt6=l4`p1VlgtL_h>Y;4%UBY`5uMszwnI0TDP5@b5#TyLP2R zYJ564#1()#VK|J>ahISr4^X?(A(auDWhpgFt*#iB<&3w=>q>{zEQiI(+^0^qx}jK{ z&UlM-SeL3%1VrGJz;#Y%-v1xz7w-S3MVg6#2>dGoHd!nebG}mb*3rv(uWj@v`mZrJ n(m6ycrba8~#9Q(GQC{