ReviewNB / support

Issues and feature requests for ReviewNB
https://reviewnb.com
58 stars 8 forks source link

Issues with underscores inside code block #48

Closed dshean closed 4 years ago

dshean commented 4 years ago

I try to add a comment like:

Just do [x.rstrip('\n') for x in my_list_of_words]

The parser incorrectly handles the underscores in the variable name within the code block, so the final comment looks like:

Just do [x.rstrip('\n') for x in mylistof_words]

In other cases, this creates real formatting issues with the code block and surrounding text.

dshean commented 4 years ago

To clarify, this is reproduced by interactively creating a code block in the comment using backticks, not using the button.

amit1rrr commented 4 years ago

Thanks for reporting @dshean.

Turned out our regex for detecting italics was very permissive. I have restricted it to not trigger for variable names like my_long_var. This should fix the issue you are facing.

Feel free to reopen if you still see something off.

Cheers!

amit1rrr commented 4 years ago

Reopening for a bit - turns out the negative lookahead I used in the regex is not supported in Firefox & Safari yet. So I had to revert the change. Will deploy a fix in some time.

amit1rrr commented 4 years ago

Fixed, resolving.