Skip to content

fix: enhance inline query regex to support more patterns#5939

Merged
chenjiahan merged 1 commit intomainfrom
inline_query_0824
Aug 24, 2025
Merged

fix: enhance inline query regex to support more patterns#5939
chenjiahan merged 1 commit intomainfrom
inline_query_0824

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Updated the INLINE_QUERY_REGEX to match more patterns, such as ?inline, ?inline=1, ?inline&other=value, and ?other=value&inline, instead of only ?inline at the start of the query string.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 24, 2025 12:27
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 24, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 06c5996
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68ab051c521e0400085ade00
😎 Deploy Preview https://deploy-preview-5939--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 76 (🟢 up 3 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the inline query regex pattern to support more flexible inline query formats. The update changes the regex from matching only ?inline at the start of query strings to matching ?inline, ?inline=value, ?inline&other=value, and ?other=value&inline patterns.

  • Updates INLINE_QUERY_REGEX from /^\?inline$/ to /[?&]inline(?:&|=|$)/ across multiple plugins and core
  • Adds comprehensive test coverage for all supported inline query patterns
  • Updates snapshot tests to reflect the new regex pattern

Reviewed Changes

Copilot reviewed 15 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/constants.ts Updates INLINE_QUERY_REGEX constant and adds documentation
packages/plugin-sass/src/index.ts Updates regex pattern in Sass plugin
packages/plugin-less/src/index.ts Updates regex pattern in Less plugin
packages/plugin-stylus/src/index.ts Updates regex pattern in Stylus plugin
e2e/cases/css/inline-query/src/index.js Adds test imports for different inline query patterns
e2e/cases/css/inline-query/index.test.ts Updates tests to verify all supported inline query formats
Various snapshot files Updates test snapshots to reflect the new regex pattern

@chenjiahan chenjiahan merged commit e9ecfa9 into main Aug 24, 2025
12 checks passed
@chenjiahan chenjiahan deleted the inline_query_0824 branch August 24, 2025 12:32
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.

2 participants