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

fix(liferay-theme-task): Update regex to allow mulitple semicolons for @import #1194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fortunatomaldonado
Copy link
Member

https://liferay.atlassian.net/browse/LPD-3102

When a theme contains the following, the regex stops at the first semicolon, causing issues in the _rtl.css files.
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;500;600;700;800&display=swap");

I was able to resolve this by adjusting the regex so it allows multiple semicolons.

Let me know if there are any questions or comments about this.
Thank you!

new RegExp(
'^@' +
name +
' *(?:url\\(([^)]+)\\)|([^;\\n]*))(?: *([^;\\n]*))?;'
Copy link
Member

Choose a reason for hiding this comment

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

I'm terrible at reviewing regex, but my semi-trustworthy friend seems to indicate that this should be fine
Screenshot 2024-03-07 at 10 34 50 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants