Skip to content
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

Spread function: Hexo built-in plugin blockquote #3291

merged 7 commits into from Nov 5, 2018


3 participants
Copy link

commented Oct 15, 2018

The blockquote built-in plugin is too large as a single function.
Also, most of the code concerns only footer output.
Therefore, we will create a new parseFooter() to reduce complexity.

  • Add test cases for the changes.
  • Passed the CI test.

@segayuu segayuu requested a review from hexojs/core Oct 15, 2018


This comment has been minimized.

Copy link

commented Oct 15, 2018

Coverage Status

Coverage decreased (-0.003%) to 97.268% when pulling c84d587 on segayuu:Spread-Hexo-Tag-plugin-blockquote into ce531c0 on hexojs:master.

segayuu added some commits Oct 23, 2018

The rAuthor variable has been deleted.
Judgment as to whether it is more than one character is done beforehand, there is no need to do it again and there is no need to capture all.
Remove RegExp#test().
With this code it is sufficient to do a null check on the return value of RegExp#exec() or string#match().
string#match() to RegExp#exec().
This is equivalent if RegExp has no global flag.

@segayuu segayuu force-pushed the segayuu:Spread-Hexo-Tag-plugin-blockquote branch from 45be31a to c84d587 Oct 23, 2018


This comment has been minimized.

Copy link
Contributor Author

commented Oct 23, 2018

The issue detected by codeclimate is only an improved part of the issue before PR.

@segayuu segayuu requested review from hexojs/core and removed request for hexojs/core Oct 23, 2018

Copy link

left a comment


@segayuu segayuu merged commit 3fbbe5d into hexojs:master Nov 5, 2018

2 of 4 checks passed

codeclimate 2 issues to fix
coverage/coveralls Coverage decreased (-0.003%) to 97.268%
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@segayuu segayuu deleted the segayuu:Spread-Hexo-Tag-plugin-blockquote branch Nov 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.