-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix: inline class visually-hidden #334
fix: inline class visually-hidden #334
Conversation
src/transform/plugins/utils.ts
Outdated
// replace line breaks with spaces, remove multiple consequent spaces | ||
inline = inline.replace(/(\r\n|\n|\r)/gm, ' ').replace(/\s+/g, ' '); | ||
// remove first and last characters which are spaces | ||
inline = inline.substring(1, inline.length - 1); |
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.
inline.trim()
src/transform/plugins/utils.ts
Outdated
// replace line breaks with spaces, remove multiple consequent spaces | ||
inline = inline.replace(/(\r\n|\n|\r)/gm, ' ').replace(/\s+/g, ' '); | ||
// remove first and last characters which are spaces | ||
inline = inline.trim(); |
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.
pretty sure you can just: inline.match(/[^\s]+/gm).join(' ');
instead of 2 replaces and trim
@Kiri111enz also checkout CI, you gonna have to update test, to include inline styles in the expected result.
|
No description provided.