added rmd support

This commit is contained in:
Max Brede 2023-03-23 14:05:08 +01:00
parent 2c6872aca3
commit dab20df5f2
4 changed files with 56 additions and 2 deletions

View File

@ -429,6 +429,29 @@
} }
] ]
}, },
{
"language": "Rmarkdown",
"markers": [
{
"type": "block",
"pattern": {
"start": "<!--",
"end": "-->"
}
},
{
"type": "block",
"pattern": {
"start": "{/\\*",
"end": "\\*/}"
}
},
{
"type": "line",
"pattern": "- \\[ \\]"
}
]
},
{ {
"language": "Shell", "language": "Shell",
"markers": [ "markers": [
@ -721,4 +744,4 @@
} }
] ]
} }
] ]

View File

@ -240,6 +240,18 @@ index 525e25d..ba4e68d 100644
- kept together as one todo - kept together as one todo
- */} - */}
- - [ ] TODO: An inline todo that's NOT a comment (what) - - [ ] 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 diff --git a/tests/example_file.mdx b/src/tests/example_file.mdx
index 525e25d..ba4e68d 100644 index 525e25d..ba4e68d 100644
--- a/src/tests/example_file.mdx --- a/src/tests/example_file.mdx

View File

@ -279,6 +279,19 @@ index 0000000..7cccc5b
+ kept together as one todo + kept together as one todo
+ */} + */}
+ - [ ] TODO: An inline todo that's NOT a comment (what) + - [ ] 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 diff --git a/tests/example_file.mdx b/src/tests/example_file.mdx
new file mode 100644 new file mode 100644
index 0000000..7cccc5b index 0000000..7cccc5b
@ -388,4 +401,4 @@ index 0000000..a6c6cb0
+<!-- TODO: Add xaml support --> +<!-- TODO: Add xaml support -->
+<Label Text="why"/> +<Label Text="why"/>
+<!-- TODO: please --> +<!-- TODO: please -->
+<Label Text="ok"/> +<Label Text="ok"/>

View File

@ -78,6 +78,9 @@ class NewIssueTests(unittest.TestCase):
def test_md_issues(self): def test_md_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6) self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6)
def test_rmd_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'rmarkdown'), 6)
def test_r_issues(self): def test_r_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2) self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
@ -157,6 +160,9 @@ class ClosedIssueTests(unittest.TestCase):
def test_md_issues(self): def test_md_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6) self.assertEqual(count_issues_for_file_type(self.raw_issues, 'markdown'), 6)
def test_rmd_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'rmarkdown'), 6)
def test_r_issues(self): def test_r_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2) self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)