Wrong source and sourceIndex for Sass interpolated selectors
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, sass
- 領域
- tooling
調査の方向性
Start with the inline Sass selector reproduction and the parser code that assigns source positions and sourceIndex to interpolated class nodes. Update the behavior so the interpolated selector reports the expected columns and index, then verify both the Sass and normal selector examples pass.
索引モデルが issue の本文から書いたものです。
説明
Repro:
test('Sass selector', '.#{$classname}', (t, tree) => {
const node = tree.nodes[0].nodes[0];
t.deepEqual(node.type, "class"); // Ok
t.deepEqual(node.value, "#{$classname}"); // Ok
t.deepEqual(node.source.start.column, 1); // Fail. Received: 5
t.deepEqual(node.source.end.column, 14); // Fail. Received: 18
t.deepEqual(node.sourceIndex, 0); // Fail. Received: 4
});
Compare with this selector that has the same length:
test('Normal selector', '.XXXclassnameX', (t, tree) => {
const node = tree.nodes[0].nodes[0];
t.deepEqual(node.type, "class"); // Ok
t.deepEqual(node.value, "XXXclassnameX"); // Ok
t.deepEqual(node.source.start.column, 1); // Ok
t.deepEqual(node.source.end.column, 14); // Ok
t.deepEqual(node.sourceIndex, 0); // Ok
});
I tried to look at the parser code to figure out what's wrong but I didn't manage to figure this one out.
- 主要言語
- JavaScript
- スター
- 214
- フォーク
- 63
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
postcss/postcss-selector-parser のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
-
postcss/postcss-selector-parser#332 · リアクション 1 件 · 担当者 2 名 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
postcss/postcss-selector-parser#309 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
postcss/postcss-selector-parser#306 · コメント 2 件 ·
postcss/postcss-selector-parser の issue をすべて見る
似ている issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·