From 2506617bc114f981c72976d080015fd3a2309fac Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Fri, 24 May 2024 15:27:07 +0200 Subject: [PATCH] Revert "Ajout inner-parens-to-brackets" This reverts commit 1578254301b919f090b16b57ce385f0ea5cadeb9. --- .../.README.md.~undo-tree~ | 23 ----- .../.inner-parens-to-brackets.lua.~undo-tree~ | 42 --------- inner-parens-to-brackets/README.md | 4 - inner-parens-to-brackets/README.md~ | 1 - .../inner-parens-to-brackets.lua | 91 ------------------- .../inner-parens-to-brackets.lua~ | 85 ----------------- 6 files changed, 246 deletions(-) delete mode 100644 inner-parens-to-brackets/.README.md.~undo-tree~ delete mode 100644 inner-parens-to-brackets/.inner-parens-to-brackets.lua.~undo-tree~ delete mode 100644 inner-parens-to-brackets/README.md delete mode 100644 inner-parens-to-brackets/README.md~ delete mode 100644 inner-parens-to-brackets/inner-parens-to-brackets.lua delete mode 100644 inner-parens-to-brackets/inner-parens-to-brackets.lua~ diff --git a/inner-parens-to-brackets/.README.md.~undo-tree~ b/inner-parens-to-brackets/.README.md.~undo-tree~ deleted file mode 100644 index 5a68518..0000000 --- a/inner-parens-to-brackets/.README.md.~undo-tree~ +++ /dev/null @@ -1,23 +0,0 @@ -(undo-tree-save-format-version . 1) -"199a3ff653aaa566301c36c7025bac4c9f3e90ee" -[nil nil nil nil (26192 38250 630077 19000) 0 nil] -([nil nil ((70 . 72) (t 26192 38113 372753 271000)) nil (26192 38250 630075 659000) 0 nil]) -([nil nil ((72 . 93)) nil (26192 38250 630074 858000) 0 nil]) -([nil nil ((93 . 95)) nil (26192 38250 630074 227000) 0 nil]) -([nil nil ((73 . 77)) nil (26192 38250 630073 396000) 0 nil]) -([nil nil ((#(" " 0 1 (fontified t)) . -73) (undo-tree-id5 . -1) (#("d" 0 1 (fontified t)) . -74) (undo-tree-id6 . -1) (#("o" 0 1 (fontified t)) . -75) (undo-tree-id7 . -1) (#("u" 0 1 (fontified t)) . -76) (undo-tree-id8 . -1) 77) nil (26192 38250 630071 779000) 0 nil]) -([nil nil ((73 . 79)) nil (26192 38250 630066 446000) 0 nil]) -([nil nil ((#("t" 0 1 (fontified t)) . 79)) nil (26192 38250 630065 485000) 0 nil]) -([nil nil ((79 . 89)) nil (26192 38250 630064 813000) 0 nil]) -([nil nil ((#(" is" 0 3 (fontified t)) . 89) (undo-tree-id4 . -3)) nil (26192 38250 630063 630000) 0 nil]) -([nil nil ((#(" useful" 0 7 (fontified t)) . 96) (undo-tree-id1 . -5) (undo-tree-id2 . -5) (undo-tree-id3 . -7)) nil (26192 38250 630060 718000) 0 nil]) -([nil nil ((#(" to" 0 3 (fontified t)) . 96) (undo-tree-id0 . -3)) nil (26192 38250 630054 177000) 0 nil]) -([nil nil ((96 . 109)) nil (26192 38250 630027 658000) 0 nil]) -([nil nil ((109 . 129)) nil (26192 38250 630026 149000) 0 nil]) -([nil nil ((#(" " 0 1 (fontified t)) . 129)) nil (26192 38250 630018 883000) 0 nil]) -([nil nil ((129 . 130) (t 26192 38250 635843 580000)) nil (26192 38252 536863 795000) 0 nil]) -([nil nil ((#(" found" 0 6 (fontified t)) . 73) (undo-tree-id11 . -6) (t 26192 38252 541830 950000)) nil (26192 38280 42489 849000) 0 nil]) -([nil nil ((#(" it" 0 3 (fontified t)) . 73) (undo-tree-id10 . -3)) nil (26192 38280 42486 886000) 0 nil]) -([nil nil ((#("ful" 0 3 (fontified t)) . 77) (undo-tree-id9 . -3)) nil (26192 38280 42482 714000) 0 nil]) -([nil current ((77 . 80)) nil (26192 38280 42461 997000) 0 nil]) -nil diff --git a/inner-parens-to-brackets/.inner-parens-to-brackets.lua.~undo-tree~ b/inner-parens-to-brackets/.inner-parens-to-brackets.lua.~undo-tree~ deleted file mode 100644 index 2a6d26e..0000000 --- a/inner-parens-to-brackets/.inner-parens-to-brackets.lua.~undo-tree~ +++ /dev/null @@ -1,42 +0,0 @@ -(undo-tree-save-format-version . 1) -"45d1a127838c897d1249ff8ad1292f62be9b6e45" -[nil nil nil nil (26192 38154 101222 841000) 0 nil] -([nil nil ((1 . 2) (1 . 2) (t 25789 25195 656243 537000)) nil (26192 38154 101221 202000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 43 . 44) (nil fontified nil 43 . 44) (nil fontified nil 42 . 43) (nil fontified nil 41 . 42) (nil fontified nil 40 . 41) (nil fontified nil 39 . 40) (nil fontified nil 38 . 39) (nil fontified nil 37 . 38) (nil fontified nil 36 . 37) (nil fontified nil 35 . 36) (nil fontified nil 34 . 35) (nil fontified nil 33 . 34) (nil fontified nil 32 . 33) (nil fontified nil 31 . 32) (nil fontified nil 30 . 31) (nil fontified nil 29 . 30) (nil fontified nil 28 . 29) (nil fontified nil 27 . 28) (nil fontified nil 26 . 27) (nil fontified nil 25 . 26) (nil fontified nil 24 . 25) (nil fontified nil 23 . 24) (nil fontified nil 22 . 23) (nil fontified nil 21 . 22) (nil fontified nil 13 . 21) (nil fontified nil 12 . 13) (nil fontified nil 11 . 12) (nil fontified nil 10 . 11) (nil fontified nil 9 . 10) (nil fontified nil 8 . 9) (nil fontified nil 7 . 8) (nil fontified nil 6 . 7) (nil fontified nil 5 . 6) (nil fontified nil 4 . 5) (nil fontified nil 3 . 4) (nil fontified nil 2 . 3) (nil fontified nil 1 . 2) (1 . 44)) nil (26192 38154 101218 626000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 7 . 8) (nil fontified nil 7 . 8) (nil fontified nil 6 . 7) (nil fontified nil 5 . 6) (nil fontified nil 4 . 5) (nil fontified nil 3 . 4) (nil fontified nil 2 . 3) (nil fontified nil 1 . 2) (1 . 8) (#("# Converting nested parentheses to brackets" 0 1 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 1 2 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 2 3 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 3 4 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 4 5 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 5 6 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 6 7 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 7 8 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 8 9 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 9 10 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 10 11 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 11 12 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 12 20 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 20 21 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 21 22 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 22 23 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 23 24 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 24 25 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 25 26 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 26 27 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 27 28 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 28 29 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 29 30 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 30 31 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 31 32 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 32 33 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 33 34 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 34 35 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 35 36 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 36 37 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 37 38 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 38 39 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 39 40 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 40 41 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 41 42 (fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #)) 42 43 (rear-nonsticky t fontified t markdown-heading-1-atx (1 44 nil nil nil nil nil nil 1 3 3 44 #) markdown-heading (1 44 nil nil nil nil nil nil 1 3 3 44 #))) . -1) (undo-tree-id39 . -43) (undo-tree-id40 . -42) (undo-tree-id41 . -43) (undo-tree-id42 . -43) 44) nil (26192 38154 101211 798000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 5 . 6) (nil fontified nil 5 . 6) (nil fontified nil 4 . 5) (nil fontified nil 3 . 4) (nil fontified nil 2 . 3) (nil fontified nil 1 . 2) (1 . 6) (#("nested " 0 1 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 1 2 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 2 3 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 3 4 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 4 5 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 5 6 (fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #)) 6 7 (rear-nonsticky t fontified t markdown-heading-1-atx (1 33 nil nil nil nil nil nil 1 3 3 33 #) markdown-heading (1 33 nil nil nil nil nil nil 1 3 3 33 #))) . -1) (undo-tree-id36 . -7) (undo-tree-id37 . -6) (undo-tree-id38 . -7) 8) nil (26192 38154 101205 648000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 4 . 5) (nil fontified nil 1 . 5) (1 . 5) (#("insid" 0 1 (fontified t markdown-heading-1-atx (1 31 nil nil nil nil nil nil 1 3 3 31 #) markdown-heading (1 31 nil nil nil nil nil nil 1 3 3 31 #)) 1 2 (fontified t markdown-heading-1-atx (1 31 nil nil nil nil nil nil 1 3 3 31 #) markdown-heading (1 31 nil nil nil nil nil nil 1 3 3 31 #)) 2 3 (fontified t markdown-heading-1-atx (1 31 nil nil nil nil nil nil 1 3 3 31 #) markdown-heading (1 31 nil nil nil nil nil nil 1 3 3 31 #)) 3 4 (fontified t markdown-heading-1-atx (1 31 nil nil nil nil nil nil 1 3 3 31 #) markdown-heading (1 31 nil nil nil nil nil nil 1 3 3 31 #)) 4 5 (rear-nonsticky t fontified t markdown-heading-1-atx (1 31 nil nil nil nil nil nil 1 3 3 31 #) markdown-heading (1 31 nil nil nil nil nil nil 1 3 3 31 #))) . -1) (undo-tree-id33 . -5) (undo-tree-id34 . -4) (undo-tree-id35 . -5) 6) nil (26192 38154 101200 570000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 71 . 72) (nil fontified nil 1 . 72) (1 . 72) (#("This" 0 3 (fontified t) 3 4 (rear-nonsticky t fontified t)) . -1) (undo-tree-id30 . -4) (undo-tree-id31 . -3) (undo-tree-id32 . -4) 5) nil (26192 38154 101194 759000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 212 . 213) (nil fontified nil 1 . 213) (1 . 213) (#("A Pandoc Lua filter that automatically formats references to centuries." 0 70 (fontified t) 70 71 (rear-nonsticky t fontified t)) . -1) (undo-tree-id24 . -71) (undo-tree-id25 . -70) (undo-tree-id26 . -71) (undo-tree-id27 . -71) (undo-tree-id28 . -71) (undo-tree-id29 . -71) 72) nil (26192 38154 101188 822000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 9 . 10) (nil fontified nil 1 . 10) (1 . 10) (#("This filter extends Pandoc's cross-referencing abilities -with references to any portion of text -by its page number, its note number (when applicable) -or an arbitrary reference type (with ConTeXt or LaTeX output)." 0 26 (fontified t) 26 211 (face font-lock-string-face fontified t) 211 212 (face font-lock-string-face rear-nonsticky t fontified t)) . -1) (undo-tree-id17 . -212) (undo-tree-id18 . -211) (undo-tree-id19 . -150) (undo-tree-id20 . -212) (undo-tree-id21 . -212) (undo-tree-id22 . -212) (undo-tree-id23 . -212) 213) nil (26192 38154 101178 921000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 227 . 228) (nil fontified nil 227 . 228) (nil fontified nil 162 . 227) (nil fontified nil 159 . 162) (nil fontified nil 96 . 159) (nil fontified nil 93 . 96) (nil fontified nil 21 . 93) (nil fontified nil 18 . 21) (nil fontified nil 4 . 18) (nil fontified nil 1 . 4) (1 . 228) (#("centuries" 0 8 (fontified t) 8 9 (rear-nonsticky t fontified t)) . -1) (undo-tree-id8 . -9) (undo-tree-id9 . -8) (undo-tree-id10 . -9) (undo-tree-id11 . -9) (undo-tree-id12 . -9) (undo-tree-id13 . -9) (undo-tree-id14 . -9) (undo-tree-id15 . -9) (undo-tree-id16 . -9) 10) nil (26192 38155 103452 454000) 0 nil]) -([nil nil ((#(" -" 0 1 (rear-nonsticky t fontified t)) . -227) (undo-tree-id92 . -1) (undo-tree-id93 . -1) (undo-tree-id94 . -1) (undo-tree-id95 . -1) (undo-tree-id96 . -1) (undo-tree-id97 . -1) (undo-tree-id98 . -1) (undo-tree-id99 . -1) (undo-tree-id100 . -1) (undo-tree-id101 . -1) (undo-tree-id102 . -1) 228) nil (26192 38175 823807 599000) 0 nil] [nil nil ((nil rear-nonsticky nil 15 . 16) (nil fontified nil 6 . 16) (nil fontified nil 1 . 6) (1 . 16) (#("-- centuries.lua --- A Pandoc Lua filter that automatically formats references to centuries. --- Copyright 2022 Bastien Dumont (bastien.dumont [at] posteo.net) --- This file is under the MIT License: see LICENSE for more details - -" 0 3 (face font-lock-comment-delimiter-face fontified t) 3 17 (face font-lock-comment-face fontified t) 17 20 (face font-lock-comment-delimiter-face fontified t) 20 92 (face font-lock-comment-face fontified t) 92 95 (face font-lock-comment-delimiter-face fontified t) 95 158 (face font-lock-comment-face fontified t) 158 161 (face font-lock-comment-delimiter-face fontified t) 161 226 (face font-lock-comment-face fontified t) 226 227 (rear-nonsticky t fontified t)) . -1) (undo-tree-id0 . -227) (undo-tree-id1 . -226) (undo-tree-id2 . -227) (undo-tree-id3 . -227) (undo-tree-id4 . -227) (undo-tree-id5 . -227) (undo-tree-id6 . -227) (undo-tree-id7 . -227) 228) ((1 . 228) (#("text-crossrefs/" 0 5 (fontified nil) 5 14 (fontified nil) 14 15 (rear-nonsticky nil fontified nil)) . 1) (undo-tree-id43 . -15) (undo-tree-id44 . -14) (nil rear-nonsticky t 15 . 16)) (26192 38154 101149 611000) 0 nil]) -([nil nil ((#(" -" 0 1 (face font-lock-comment-face fontified t)) . -226) (undo-tree-id79 . -1) (undo-tree-id80 . -1) (undo-tree-id81 . -1) (undo-tree-id82 . -1) (undo-tree-id83 . -1) (undo-tree-id84 . -1) (undo-tree-id85 . -1) (undo-tree-id86 . -1) (undo-tree-id87 . -1) (undo-tree-id88 . -1) (undo-tree-id89 . -1) (undo-tree-id90 . -1) (undo-tree-id91 . -1) 227) nil (26192 38175 823791 590000) 0 nil]) -nil -([nil nil ((#("centuries" 0 9 (face font-lock-comment-face fontified t)) . -82) (undo-tree-id78 . -9) 91) nil (26192 38175 823777 267000) 0 nil]) -([nil nil ((#("to " 0 3 (face font-lock-comment-face fontified t)) . -79) (undo-tree-id76 . -3) (undo-tree-id77 . -3) 82) nil (26192 38175 823775 51000) 0 nil]) -([nil nil ((#("references " 0 11 (face font-lock-comment-face fontified t)) . -68) (undo-tree-id73 . -11) (undo-tree-id74 . -11) (undo-tree-id75 . -11) 79) nil (26192 38175 823771 381000) 0 nil]) -([nil nil ((#("formats " 0 8 (face font-lock-comment-face fontified t)) . -60) (undo-tree-id69 . -8) (undo-tree-id70 . -8) (undo-tree-id71 . -8) (undo-tree-id72 . -8) 68) nil (26192 38175 823767 278000) 0 nil]) -([nil nil ((#("automatically " 0 14 (face font-lock-comment-face fontified t)) . -46) (undo-tree-id64 . -14) (undo-tree-id65 . -14) (undo-tree-id66 . -14) (undo-tree-id67 . -14) (undo-tree-id68 . -14) 60) nil (26192 38175 823762 38000) 0 nil]) -([nil nil ((#("that " 0 5 (face font-lock-comment-face fontified t)) . -41) (undo-tree-id58 . -5) (undo-tree-id59 . -5) (undo-tree-id60 . -5) (undo-tree-id61 . -5) (undo-tree-id62 . -5) (undo-tree-id63 . -5) 46) nil (26192 38175 823755 545000) 0 nil]) -([nil nil ((41 . 62)) nil (26192 38175 823747 423000) 0 nil]) -([nil nil ((62 . 83)) nil (26192 38175 823746 789000) 0 nil]) -([nil nil ((83 . 85)) nil (26192 38175 823746 128000) 0 nil]) -([nil nil ((85 . 88)) nil (26192 38175 823744 830000) 0 nil]) -([nil nil ((#(" " 0 1 (fontified t)) . -86) (undo-tree-id45 . -1) (undo-tree-id46 . -1) (undo-tree-id47 . -1) (undo-tree-id48 . -1) (undo-tree-id49 . -1) (undo-tree-id50 . -1) (undo-tree-id51 . -1) (#(" " 0 1 (fontified t)) . -87) (undo-tree-id52 . -1) (undo-tree-id53 . -1) (undo-tree-id54 . -1) (undo-tree-id55 . -1) (undo-tree-id56 . -1) (undo-tree-id57 . -1) 88) nil (26192 38175 823708 216000) 0 nil]) -([nil nil ((86 . 105)) nil (26192 38175 823673 242000) 0 nil]) -([nil nil ((nil rear-nonsticky nil 31 . 32) (nil fontified nil 4 . 32) (4 . 32) (t 26192 38175 880338 984000)) nil (26192 38187 795305 45000) 0 nil]) -([nil nil ((#("centuries.lua" 0 13 (face font-lock-comment-face fontified t)) . 32) (undo-tree-id103 . 13) (undo-tree-id104 . 13) (undo-tree-id105 . 13) (undo-tree-id106 . -13)) nil (26192 38187 795297 990000) 0 nil]) -([nil nil ((#("2" 0 1 (face font-lock-comment-face fontified t)) . -138) (undo-tree-id107 . -1) 139 (t 26192 38187 854259 630000)) nil (26192 38191 781951 698000) 0 nil]) -([nil current ((138 . 139)) nil (26192 38191 781929 202000) 0 nil]) -nil diff --git a/inner-parens-to-brackets/README.md b/inner-parens-to-brackets/README.md deleted file mode 100644 index 0a4ab7a..0000000 --- a/inner-parens-to-brackets/README.md +++ /dev/null @@ -1,4 +0,0 @@ -This filter converts nested parentheses to brackets (and conversely). - -I use it mostly to post-process citeproc output. - diff --git a/inner-parens-to-brackets/README.md~ b/inner-parens-to-brackets/README.md~ deleted file mode 100644 index d9290e5..0000000 --- a/inner-parens-to-brackets/README.md~ +++ /dev/null @@ -1 +0,0 @@ -This filter converts nested parentheses to brackets (and conversely). diff --git a/inner-parens-to-brackets/inner-parens-to-brackets.lua b/inner-parens-to-brackets/inner-parens-to-brackets.lua deleted file mode 100644 index dec1dc4..0000000 --- a/inner-parens-to-brackets/inner-parens-to-brackets.lua +++ /dev/null @@ -1,91 +0,0 @@ --- inner-parens-to-brackets.lua --- A Pandoc Lua filter that converts nested parentheses to brackets --- (and conversely). --- Copyright 2024 Bastien Dumont (bastien.dumont [at] posteo.net) --- This file is under the MIT License: see LICENSE for more details - -local previously_signalled = {} - -local function signal_if_new(id, msg) - if not previously_signalled[id] then - io.stdout:write('INFO: ' .. msg .. '\n') - previously_signalled[id] = true - end -end - -function Para(para) - local whole_para = pandoc.utils.stringify(para) - local parens_trace = {} - local i_str = 0 - local isolate_parens = { - -- In case there are several level of parentheses in the same Str object - -- (could theoretically happen due to non-breaking spaces). - -- Also simplifies check_and_replace() below. - Str = function(str) - local text = str.text - if string.match(text, '[][()]') then - local substrings = {} - for a, b, c in string.gmatch(text, '([^][()]*)([][()]?)([^][()]*)') do - for _, sub in ipairs({ a, b, c }) do - if sub ~= '' then table.insert(substrings, pandoc.Str(sub)) end - end - end - return substrings - end - end - } - local check_and_replace = { - traverse = 'topdown', - Str = function(str) - i_str = i_str + 1 - local text = str.text - if text == '(' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '(' then - str.text = '[' - signal_if_new(whole_para .. i_str, - 'Replacing a left parenthesis with a bracket ' .. - 'in the following item: ' .. whole_para) - end - end - table.insert(parens_trace, str.text) - elseif text == ')' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '[' then - str.text = ']' - signal_if_new(whole_para .. i_str, - 'Replacing a right parenthesis with a bracket ' .. - 'in the following item: ' .. whole_para) - end - end - table.remove(parens_trace) - elseif text == '[' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '[' then - str.text = '(' - signal_if_new(whole_para .. i_str, - 'Replacing a left bracket with a parenthesis ' .. - 'in the following item: ' .. whole_para) - end - end - table.insert(parens_trace, str.text) - elseif text == ']' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '(' then - str.text = ')' - signal_if_new(whole_para .. i_str, - 'Replacing a right bracket with a parenthesis ' .. - 'in the following item: ' .. whole_para) - end - end - table.remove(parens_trace) - end - return str - end - } - local processed_para = para:walk(isolate_parens):walk(check_and_replace) - if #parens_trace > 0 then - io.stdout:write('WARNING: Unbalanced parentheses or brackets found in ' .. whole_para .. '\n') - end - return processed_para -end diff --git a/inner-parens-to-brackets/inner-parens-to-brackets.lua~ b/inner-parens-to-brackets/inner-parens-to-brackets.lua~ deleted file mode 100644 index a29dd57..0000000 --- a/inner-parens-to-brackets/inner-parens-to-brackets.lua~ +++ /dev/null @@ -1,85 +0,0 @@ -local previously_signalled = {} - -local function signal_if_new(id, msg) - if not previously_signalled[id] then - io.stdout:write('INFO: ' .. msg .. '\n') - previously_signalled[id] = true - end -end - -function Para(para) - local whole_para = pandoc.utils.stringify(para) - local parens_trace = {} - local i_str = 0 - local isolate_parens = { - -- In case there are several level of parentheses in the same Str object - -- (could theoretically happen due to non-breaking spaces). - -- Also simplifies check_and_replace() below. - Str = function(str) - local text = str.text - if string.match(text, '[][()]') then - local substrings = {} - for a, b, c in string.gmatch(text, '([^][()]*)([][()]?)([^][()]*)') do - for _, sub in ipairs({ a, b, c }) do - if sub ~= '' then table.insert(substrings, pandoc.Str(sub)) end - end - end - return substrings - end - end - } - local check_and_replace = { - traverse = 'topdown', - Str = function(str) - i_str = i_str + 1 - local text = str.text - if text == '(' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '(' then - str.text = '[' - signal_if_new(whole_para .. i_str, - 'Replacing a left parenthesis with a bracket ' .. - 'in the following item: ' .. whole_para) - end - end - table.insert(parens_trace, str.text) - elseif text == ')' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '[' then - str.text = ']' - signal_if_new(whole_para .. i_str, - 'Replacing a right parenthesis with a bracket ' .. - 'in the following item: ' .. whole_para) - end - end - table.remove(parens_trace) - elseif text == '[' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '[' then - str.text = '(' - signal_if_new(whole_para .. i_str, - 'Replacing a left bracket with a parenthesis ' .. - 'in the following item: ' .. whole_para) - end - end - table.insert(parens_trace, str.text) - elseif text == ']' then - if #parens_trace > 0 then - if parens_trace[#parens_trace] == '(' then - str.text = ')' - signal_if_new(whole_para .. i_str, - 'Replacing a right bracket with a parenthesis ' .. - 'in the following item: ' .. whole_para) - end - end - table.remove(parens_trace) - end - return str - end - } - local processed_para = para:walk(isolate_parens):walk(check_and_replace) - if #parens_trace > 0 then - io.stdout:write('WARNING: Unbalanced parentheses or brackets found in ' .. whole_para .. '\n') - end - return processed_para -end