Comments (2)
@alexhagen ,
It looks like multiline for Python has been include via triple-quoted strings.
https://github.com/pgilad/leasot/blob/master/lib/parsers/pythonParser.js#L7
I know that approach is not every Python programmer's preference</alliteration>
but for whatever reason that's the convention chosen for that parser.
One solution could be to create an additional multiline regex pattern for # TODO
on the first line and #
on subsequent ones. You could then add an additional loop like the existing one:
https://github.com/pgilad/leasot/blob/master/lib/parsers/pythonParser.js#L24-L32
Your first example would most likely be the easier one to implement. You could make a capture group for the content on each line, making sure to filter out the beginning #
on each line. Then concatenate the captures to make a single comment string.
If that weren't to become a native Leasot parser change you could still use it as a custom parser:
https://github.com/pgilad/leasot#custom-parsers
Food for thought? :-)
from leasot.
Thanks - I'll definitely go with the triple quoted strings for now.
from leasot.
Related Issues (20)
- RFC: Version 7.0.0 currently in release candidate stage HOT 2
- Symlinks HOT 5
- Does not report TODOs in .vue files HOT 7
- Running `leasot -S -i node_modules *.js` doesn't ignore the node_modules folder. HOT 12
- feature request: support DONE keyword. HOT 3
- Why is this project named leasot? HOT 3
- Unable to associate .svelte file with twigParser HOT 8
- windows compatibility - no files found HOT 2
- F# support HOT 2
- Clojure support? HOT 2
- Vue.js: Only HTML comments register HOT 2
- 11.2 Cannot find module HOT 4
- 11.6.0 should've been a major release HOT 1
- Can't click open in VScode, but I have I temp solution.
- Broken Markdown table output
- Add support for GDScript
- Newest published package has an error when attempting to run HOT 3
- `ERR_PACKAGE_PATH_NOT_EXPORTED` reported when using as node script HOT 4
- Add support for the R language HOT 2
- Non-comment todo's (maybe feature request) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leasot.