[education/rkward/snippets] rkward: add Quote and make Inline code smart

Stefan Rödiger null at kde.org
Sat Jun 18 21:06:24 BST 2022


Git commit b205bf588f9aeebe4ddc2f793ac80325939eefea by Stefan Rödiger.
Committed on 18/06/2022 at 20:05.
Pushed by srodiger into branch 'snippets'.

add Quote and make Inline code smart

M  +5    -1    rkward/RKWardRMd.xml

https://invent.kde.org/education/rkward/commit/b205bf588f9aeebe4ddc2f793ac80325939eefea

diff --git a/rkward/RKWardRMd.xml b/rkward/RKWardRMd.xml
index 0be7aeac..ee8d68c4 100644
--- a/rkward/RKWardRMd.xml
+++ b/rkward/RKWardRMd.xml
@@ -100,7 +100,7 @@ function rangeCommand(command, def) {
  </item>
  <item>
   <match>Inline Code</match>
-  <fillin>${rangeCommand("`r paste(\"The sum of 1 to 1000 is\", sum(1L:1000))`")}</fillin>
+  <fillin>${rangeCommand("`r %%1`", "paste(\"The sum of 1 to 1000 is\", sum(1L:1000))")}</fillin>
  </item>
  <item>
   <match>Code_Block</match>
@@ -109,6 +109,10 @@ function rangeCommand(command, def) {
   <item>
   <match>Chunck (Simple)</match>
   <fillin>${rangeCommand("\n```"+ braces("r") +" %%1```\n", "\nx <- 1\n\n")}</fillin>
+ </item>
+  <item>
+  <match>Quote</match>
+  <fillin>${rangeCommand("> %%1", "Text")}</fillin>
  </item>
  <item>
   <match>Chunck (defaults)</match>


More information about the rkward-tracker mailing list