alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
605 stars 115 forks source link

Fix LaTeX bug + add tests #96

Closed qwinters closed 2 years ago

qwinters commented 2 years ago

This PR aims to

I was able to identify this by adding a local change to swap \begin => \\begin and \end => \\end in the regex parts for LaTeX before parsing. However, not all tests pass after doing this (which appears to be due to other underlying issues with the tests).

Also worth noting that the tests right now depend explicitly on the version of syntax.json which is on master of this repo, which makes it painful to test locally. I overrode that in the tests file to make them easier to work with in the future

qwinters commented 2 years ago

@alstr It doesn't look like I can add you as a reviewer on this, but just wanted to comment to make sure you're aware of it. Cheers!

alstr commented 2 years ago

Thanks very much for the work on this, I'll take a look as soon as I'm able!

alstr commented 2 years ago

And yes, the tests should not depend on the remote syntax.json file, good observation. In general I want to improve the coverage of the tests and ideally add a test each time a new language is added.

qwinters commented 2 years ago

@alstr - I just added tests for Julia / AutoHotKey / Org Mode / Handlebars, which are the ones listed as outstanding.

Worth noting that the Julia test is failing because it creates 3 issues instead of 2, which I think has something to do with the actual parsing logic, but I don't have bandwidth to dig into it.

I propose that if the tests work for you that we merge this to fix the LaTeX issue (which is actively blocking some of my personal workflows) and then move the Julia parsing error to a new issue / PR. Does that sound good to you?

qwinters commented 2 years ago

@alstr friendly ping on this! This PR is defo far from perfect, but want to get at the very least the TeX portion fixed sooner rather than later if possible. Thanks!

alstr commented 2 years ago

Thanks very much!