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
merged 7 commits into from
Nov 5, 2018

Conversation

segayuu
Copy link
Contributor

@segayuu segayuu 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 a team October 15, 2018 02:47
@coveralls
Copy link

coveralls 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.

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.
With this code it is sufficient to do a null check on the return value of RegExp#exec() or string#match().
This is equivalent if RegExp has no global flag.
@segayuu segayuu force-pushed the Spread-Hexo-Tag-plugin-blockquote branch from 45be31a to c84d587 Compare October 23, 2018 00:42
@segayuu
Copy link
Contributor Author

segayuu commented Oct 23, 2018

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

@segayuu segayuu requested review from a team and removed request for a team October 23, 2018 00:46
Copy link
Member

@NoahDragon NoahDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@segayuu segayuu merged commit 3fbbe5d into hexojs:master Nov 5, 2018
@segayuu segayuu deleted the Spread-Hexo-Tag-plugin-blockquote branch November 5, 2018 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants