-
Notifications
You must be signed in to change notification settings - Fork 10
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
FileConventions: fix WrapText function #135
base: master
Are you sure you want to change the base?
Conversation
Add failing test for WrapText function based on [1]. [1] nblockchain#117
5a924f9
to
1fa1684
Compare
@parhamsaremi my review is the following: Sometimes we cut corners to get something to work, do some hack here and there. You didn't do this with this code, it seems. However, you went to the other extreme: you overengineered. Look at the diff, it's too complicated for such a simple thing that should just skip wrapping code blocks. You can write much much simpler code by having a loop that goes over all lines, and as soon as it finds three ticks and an EOL, stop wrapping text, and as soon as it finds it again, resume the text wrapping operation. For such a simple algorithm, you don't need regular expressions at all. |
f3486b8
to
0e1b393
Compare
@aarani please review |
a69af6f
to
fe739b6
Compare
Ignore codeblocks while splitting the text into paragraphs because there might be a codeblock with multiple paragraphs. Fixes nblockchain#117
fe739b6
to
fc2c4d5
Compare
@aarani good now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ignore codeblocks while splitting the text into paragraphs because there might be a codeblock with multiple paragraphs.
Fixes #117