Open ShipsWithCannons opened 9 years ago
For posterity, this is my GH ;-)
Not sure how we detect it now, but this might solve at least bold/italics. Might want to add tokens for strikethroughs too
@danpantry this only picks up that special markdown combination. It may be more feasible to just strip the markdown before analyzing, by dropping ---|([*_])+
from all comment bodies before running the fuzzy match
this only picks up that special markdown combination. but this might solve at least bold/italics.
You're right, of course. I just wonder whether it would be better to strip markdown instead of just ignoring it using regex.
I feel like I am repeating myself..
https://github.com/Zomis/Duga/pull/84#discussion_r31601782
The better option to this might be stripping the comments of markdown before examining them, instead of building a comparably unreadable regex to match them with markdown
Should be simple enough. A .replaceAll(/* insert above regex */, "");
before examining the comment body should be good to go. Add some clean test-cases. @Zomis do you know of any analyzers that check for markdown-specific stuff? If not it might be interesting to strip the markdown when parsing the API-Call
Don't know of any analyzers that check for markdown-specific stuff. In the future though, I might want to take markdown into consideration when analyzing results from the API. I don't think that will ever happen for comments on posts though.
code review
is being detected.**code** review
(and other constructions like that) is not.Could support for such be added?
Thanks to Dan Pantry for spotting.