diff --git a/README.md b/README.md index b49fdb7..a301e81 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi - Kotlin - Less - Liquid +- Lua - Makefile - Markdown - Nix diff --git a/syntax.json b/syntax.json index 0de8d02..d179da4 100644 --- a/syntax.json +++ b/syntax.json @@ -837,5 +837,21 @@ } } ] + }, + { + "language": "Lua", + "markers": [ + { + "type": "line", + "pattern": "--" + }, + { + "type": "block", + "pattern": { + "start": "--\\[\\[", + "end": "--\\]\\]" + } + } + ] } ] diff --git a/tests/test_closed.diff b/tests/test_closed.diff index bd2a940..1b1a6cb 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -483,3 +483,20 @@ index 525e25d..ba4e68d 100644 -TODO: Create an issue for TODO --} -sum a b = a + b +diff --git a/init.lua b/init.lua +new file mode 100644 +index 0000000..0ce9b1a +--- a/init.lua ++++ b/init.lua +@@ -0,0 +1,11 @@ +--- TODO: Fix this +--- In the future, make a way to build these and just start the base +--- out with a large supply of each +--- labels: redesign +-local a = 1 +- +---[[ +- TODO: Fix this todo +- labels: urgent +---]] +-local b = 2 diff --git a/tests/test_new.diff b/tests/test_new.diff index 8df409d..db2273e 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -539,3 +539,20 @@ index 0000000..0ce9b1a +TODO: Create an issue for TODO +-} +sum a b = a + b +diff --git a/init.lua b/init.lua +new file mode 100644 +index 0000000..0ce9b1a +--- /dev/null ++++ b/init.lua +@@ -0,0 +1,11 @@ ++-- TODO: Fix this ++-- In the future, make a way to build these and just start the base ++-- out with a large supply of each ++-- labels: redesign ++local a = 1 ++ ++--[[ ++ TODO: Fix this todo ++ labels: urgent ++--]] ++local b = 2 diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index 62c8622..705e764 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -100,6 +100,9 @@ class NewIssueTests(unittest.TestCase): def test_liquid_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3) + def test_lua_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) + class ClosedIssueTests(unittest.TestCase): # Check for removed TODOs across the files specified. def setUp(self): @@ -187,6 +190,9 @@ class ClosedIssueTests(unittest.TestCase): def test_liquid_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'liquid'), 3) + def test_lua_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'lua'), 2) + class IgnorePatternTests(unittest.TestCase):