From dab20df5f260517df424e74f20e4b00373122f10 Mon Sep 17 00:00:00 2001 From: Max Brede <50902832+MBrede@users.noreply.github.com> Date: Thu, 23 Mar 2023 14:05:08 +0100 Subject: [PATCH 1/5] added rmd support --- syntax.json | 25 ++++++++++++++++++++++++- tests/test_closed.diff | 12 ++++++++++++ tests/test_new.diff | 15 ++++++++++++++- tests/test_todo_parser.py | 6 ++++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/syntax.json b/syntax.json index 808f963..27b101d 100644 --- a/syntax.json +++ b/syntax.json @@ -429,6 +429,29 @@ } ] }, + { + "language": "Rmarkdown", + "markers": [ + { + "type": "block", + "pattern": { + "start": "" + } + }, + { + "type": "block", + "pattern": { + "start": "{/\\*", + "end": "\\*/}" + } + }, + { + "type": "line", + "pattern": "- \\[ \\]" + } + ] + }, { "language": "Shell", "markers": [ @@ -721,4 +744,4 @@ } ] } -] \ No newline at end of file +] diff --git a/tests/test_closed.diff b/tests/test_closed.diff index 19df3f3..134265b 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -240,6 +240,18 @@ index 525e25d..ba4e68d 100644 - kept together as one todo - */} - - [ ] TODO: An inline todo that's NOT a comment (what) +diff --git a/tests/example_file.md b/src/tests/example_file.rmd +index 525e25d..ba4e68d 100644 +--- a/src/tests/example_file.rmd ++++ b/src/tests/example_file.rmd +@@ -1,7 +0,0 @@ +- {/* TODO: Hopefully this comment turns into a todo issue */} +- {/* +- TODO:Multiline comments +- also need to be turned into todos, and hopefully +- kept together as one todo +- */} +- - [ ] TODO: An inline todo that's NOT a comment (what) diff --git a/tests/example_file.mdx b/src/tests/example_file.mdx index 525e25d..ba4e68d 100644 --- a/src/tests/example_file.mdx diff --git a/tests/test_new.diff b/tests/test_new.diff index 74c6e4a..e957a6e 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -279,6 +279,19 @@ index 0000000..7cccc5b + kept together as one todo + */} + - [ ] TODO: An inline todo that's NOT a comment (what) +diff --git a/tests/example_file.rmd b/src/tests/example_file.rmd +new file mode 100644 +index 0000000..7cccc5b +--- /dev/null ++++ b/src/tests/example_file.rmd +@@ -0,0 +1,7 @@ ++ {/* TODO: Hopefully this comment turns into a todo issue */} ++ {/* ++ TODO:Multiline comments ++ also need to be turned into todos, and hopefully ++ kept together as one todo ++ */} ++ - [ ] TODO: An inline todo that's NOT a comment (what) diff --git a/tests/example_file.mdx b/src/tests/example_file.mdx new file mode 100644 index 0000000..7cccc5b @@ -388,4 +401,4 @@ index 0000000..a6c6cb0 + +