From 1e746fbd7283fdfb3d06f02aa97528ee82351933 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 29 Oct 2024 20:50:22 +0100 Subject: [PATCH] markdown quote transform --- texttools.tcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/texttools.tcl b/texttools.tcl index d8a1096..abc1efc 100755 --- a/texttools.tcl +++ b/texttools.tcl @@ -17,8 +17,14 @@ proc wordcount {text} { return $out } +proc markdown_quote {text} { + set text [string trimright $text] + return [string cat "> " [regsub -all \n $text "\n> "]] +} + lappend transforms [list {One line} oneline] lappend transforms [list {Line/Word/Char} wordcount] +lappend transforms [list {Markdown Quote} markdown_quote] wm geometry . 750x650 wm title . "Text Tools"