jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

requireDescriptionCompleteSentence: To detect and ignore HTML content #186

Closed kepta closed 8 years ago

kepta commented 8 years ago

This rule has been flagging comments with html tags. In this patch the html is sanitized with *\ so that it doesn't interfere with the regular regex tests. The htmlSanitizer function is padding all strings with 'x.' so that RE_NEW_LINE_START_WITH_UPPER_CASE doesnt fail. This will need to be improved after discussing with owner if he/she thinks so.

Fixes jscs-dev/node-jscs#2056

kepta commented 8 years ago

@zxqfox Let me know what you think?

qfox commented 8 years ago

Looks good at all. Just need to fix nits.

kepta commented 8 years ago

I am sorry for the errors ommission, I will rebase. Kinda newbie

kepta commented 8 years ago

@zxqfox, I wanted your review on the padding with of sanitized HTML with 'x.' It's not the most elegant way, but I can't think of any other way to prevent RE_NEW_LINE_START_WITH_UPPER_CASE?

qfox commented 8 years ago

Oh, don't worry! I'm usually forgetting to check codestyle when going to foreign repo. Guess it's a common problem. :smirk_cat:

qfox commented 8 years ago

the padding with of sanitized HTML with 'x.'

+1 to this solution as strong and simple.

Another could be parsing, analyzing, etc. It's a kinda complex problem that needs additional research.

kepta commented 8 years ago

@zxqfox Does it look good now? I can't see the build icon now.

qfox commented 8 years ago

Yeah, lgtm. Ready to merge?

kepta commented 8 years ago

Yes :+1:

kepta commented 8 years ago

@zxqfox , friendly ping :)