Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need add support for VueJS files #107

Closed
sattellite opened this issue Nov 25, 2020 · 5 comments · Fixed by #145
Closed

Need add support for VueJS files #107

sattellite opened this issue Nov 25, 2020 · 5 comments · Fixed by #145
Labels
good first issue Good for newcomers

Comments

@sattellite
Copy link
Contributor

VueJS have one-file components with file extension .vue. One-file components contains html, javascript and css.

JS have standard comments and .js is supported by todomatcher:

// oneline comment
/*
multiline comment
*/

With preprocessors html and css can have different syntaxes 😞 https://vue-loader.vuejs.org/guide/pre-processors.html
But it can be parsed as defualt html and css comments:

<!-- HTML oneline and multiline comments -->
/* CSS oneline and multiline comments */
@preslavmihaylov
Copy link
Owner

@sancroth if you're looking for a more challenging issue, you can check this one out. :)

It will require you to learn about state machines & extend the existing set of state machines for parsing comments.

@sancroth
Copy link
Contributor

sancroth commented Mar 2, 2021

@preslavmihaylov i'll move on to this one if you want to assign someone.

@preslavmihaylov
Copy link
Owner

Go ahead!

@FelixTheodor
Copy link
Contributor

If the issue ist still open, I'd like to try and solve it. My first impression is that I 'just' need to add a new ToDoMatcher for .vue files, matching all the mentioned formats, right?

@preslavmihaylov
Copy link
Owner

That is correct. The difficulty is in identifying HTML comments as identifying them requires that you read 4 symbols, while the current interface for creating todo matchers only enables you to read prev, curr and next symbols.

In the new todomatcher, you'll need to keep track of the second to current character in order to solve this. At least that's what it looks like at first glance.

Feel free to take this on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants