Skip to content

Commit

Permalink
fix(prettier-plugin-jsdoc): prevent formatting issues with string lit…
Browse files Browse the repository at this point in the history
…erals
  • Loading branch information
homer0 committed Jul 25, 2021
1 parent 6e9ebdd commit f28beff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fns/formatStringLiterals.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const getReducer = (options) => {
* @param {string} type The type that will be used to find the string literals.
* @returns {string[]}
*/
const extractLiterals = (type) => R.match(/['"][\w\|\-\s'"]+['"](?:\s+)?/g, type);
const extractLiterals = (type) => R.match(/['"][\w\|\-\s'"]+['"](?: +)?/g, type);
/**
* Formats the styling of string literals inside a type. If the type doesn't use string
* literals, it will be returned without modification.
Expand Down

0 comments on commit f28beff

Please sign in to comment.