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

feat: quoteStyle option #47

Merged
merged 4 commits into from
Nov 18, 2020
Merged

feat: quoteStyle option #47

merged 4 commits into from
Nov 18, 2020

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Nov 18, 2020

Notable Changes

quoteStyle option enables user specify whether double quote or single quote should be used.

It is also an alternative to replaceQuote option.

Commit Message Summary (CHANGELOG)

feat: implement quoteStyle option
test: quoteStyle option
docs: add quoteStyle option
feat: add type definition for quoteStyle

Type

  • Feature

SemVer

  • Fix (:label: Patch)
  • Feature (:label: Minor)
  • Breaking Change (:label: Major)

Minor. Since the PR introduces a new feature, but the default value for the new option has the same behavior as the current version (No breaking changes).

Issues

An alternative fix for posthtml/htmlnano#41

Checklist

  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes are merged and published in downstream modules

return html(tree);

/** @private */
function isSingleTag(tag) {
if (singleRegExp.length > 0) {
return singleRegExp.some(reg => reg.test(tag))
return singleRegExp.some(reg => reg.test(tag));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ; is added by xo --fix.

Comment on lines +157 to +160
node === null ||
node === false ||
node.length === 0 ||
Number.isNaN(node)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The indent is changed by xo --fix.

@Scrum Scrum merged commit 2de7798 into posthtml:master Nov 18, 2020
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.

2 participants