Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: improve CSS classname regexp#205

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mrmckeb merged 1 commit intomainfromfix-regexp-bug
Feb 20, 2023
Merged

fix: improve CSS classname regexp#205

mrmckeb merged 1 commit intomainfromfix-regexp-bug
Feb 20, 2023

Conversation

mrmckeb
Copy link
Owner

This resolves a bug where lines could fail to be matched, resulting in negative line matches.

The previous code failed to check thatindexOf values were above zero.


const matchedLine = cssLines.findIndex((line) => classRegexp.test(line));
const matchedColumn =
matchedLine && cssLines[matchedLine].indexOf(originalClassname);
Copy link
OwnerAuthor

Choose a reason for hiding this comment

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

Here,matchedLine could be -1. This shouldn't have happened, but the newly introduced regexp above didn't cover enough cases.

@mrmckebmrmckeb merged commit3819676 intomainFeb 20, 2023
@mrmckebmrmckeb deleted the fix-regexp-bug branchFebruary 20, 2023 07:44
calvellido referenced this pull request in arrow-kt/arrow-websiteFeb 20, 2023
[![MendRenovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---||[typescript-plugin-css-modules](https://togithub.com/mrmckeb/typescript-plugin-css-modules)| [`4.1.1` ->`4.2.2`](https://renovatebot.com/diffs/npm/typescript-plugin-css-modules/4.1.1/4.2.2)|[![age](https://badges.renovateapi.com/packages/npm/typescript-plugin-css-modules/4.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)|[![adoption](https://badges.renovateapi.com/packages/npm/typescript-plugin-css-modules/4.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)|[![passing](https://badges.renovateapi.com/packages/npm/typescript-plugin-css-modules/4.2.2/compatibility-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/)|[![confidence](https://badges.renovateapi.com/packages/npm/typescript-plugin-css-modules/4.2.2/confidence-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/)|---### Release Notes<details><summary>mrmckeb/typescript-plugin-css-modules</summary>###[`v4.2.2`](https://togithub.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v4.2.2)[CompareSource](https://togithub.com/mrmckeb/typescript-plugin-css-modules/compare/v4.2.1...v4.2.2)**Bug fixes:**- Fix potentially fatal CSS classname regexp bug([@&#8203;mrmckeb](https://togithub.com/mrmckeb),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/205](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/205)).**Full changelog**:mrmckeb/typescript-plugin-css-modules@v4.2.1...v4.2.2###[`v4.2.1`](https://togithub.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v4.2.1)[CompareSource](https://togithub.com/mrmckeb/typescript-plugin-css-modules/compare/v4.2.0...v4.2.1)**Bug fixes:**- Correct `additionalData` typo([@&#8203;mrmckeb](https://togithub.com/mrmckeb),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/204](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/204)).**Full changelog**:mrmckeb/typescript-plugin-css-modules@v4.2.0...v4.2.1###[`v4.2.0`](https://togithub.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v4.2.0)[CompareSource](https://togithub.com/mrmckeb/typescript-plugin-css-modules/compare/v4.1.1...v4.2.0)**New features:**- Add Less support for `goToDefinition`([@&#8203;mariusGundersen](https://togithub.com/mariusGundersen),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/192](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/192)).- Add `additionalData` option to append text content to files beforethey're processed ([@&#8203;mrmckeb](https://togithub.com/mrmckeb),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/203](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/203)).**Bug fixes:**- Fix Sass tilde importer partial support([@&#8203;dennispg](https://togithub.com/dennispg),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/193](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/193)).**Other:**- Remove unsupported `postcss-*` packages([@&#8203;mrmckeb](https://togithub.com/mrmckeb),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/201](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/201)).- Improve `goToDefinition` documentation and add additional tests([@&#8203;mrmckeb](https://togithub.com/mrmckeb),[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/202](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/202)).**New contributors**- [@&#8203;mariusGundersen](https://togithub.com/mariusGundersen) madetheir first contribution in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/192](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/192)- [@&#8203;dennispg](https://togithub.com/dennispg) made their firstcontribution in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/193](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/193)**Full changelog**:mrmckeb/typescript-plugin-css-modules@v4.1.1...v4.2.0</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined),Automerge - At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once youare satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick therebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this updateagain.---- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, checkthis box---This PR has been generated by [MendRenovate](https://www.mend.io/free-developer-tools/renovate/). Viewrepository job log[here](https://app.renovatebot.com/dashboard#github/arrow-kt/arrow-website).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNDMuMSIsInVwZGF0ZWRJblZlciI6IjM0LjE0Ni4xIn0=-->Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lianapachelianapachelianapache approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mrmckeb@lianapache

[8]ページ先頭

©2009-2025 Movatter.jp