features generate-docs: `$` sequences in NOTES.md and descriptions are expanded as String.replace patterns, splicing the README template into the output
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
テンプレートは src/spec-node/collectionCommonUtils/generateDocsCommandImpl.ts の170〜182行目付近で埋められており、そこでは文字列の値を使って .replace() が呼び出されています。ユーザー指定の内容(notes、name、description、オプションの説明)に対するこれらの呼び出しを、置換関数を使うように変更してから、repro を再実行してください。$ を含む NOTES.md が、テンプレートの二重コピーなしに生成された README.md にそのまま表示されるはずです。出力が期待どおりのテキストと一致し、$'、$&、$$ もそのまま通ることが確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
If a Feature's NOTES.md contains $` (for example the markdown `$`), the generated README.md gets a second copy of the README template at that point: the title, the description, and an "Example Usage" block with literal #{Registry}/#{Namespace}/<id>:#{Version} and #{Customizations}. $', $& and $$ also misbehave, and so do name, description and option descriptions in devcontainer-feature.json.
Repro (CLI 0.89.0; same on main at 155f8b2)
mkdir -p src/demo
echo '{ "id": "demo", "version": "1.0.0", "name": "Demo", "description": "A demo." }' > src/demo/devcontainer-feature.json
echo 'Escape quotes, `$` or backslashes.' > src/demo/NOTES.md
devcontainer features generate-docs -p src -n x/y
- Expected:
Escape quotes, `$` or backslashes. - Actual:
Escape quotes, `, then the template copy (# Demo (demo),## Example Usage,#{Registry}/#{Namespace}/demo:#{Version},#{Customizations}), then` or backslashes.
Cause
src/spec-node/collectionCommonUtils/generateDocsCommandImpl.ts:170-182 fills the template with .replace('#{…}', value). With a string replacement, String.prototype.replace expands $`, $', $& and $$ (MDN). The same code is in devcontainers/action src/generateDocs.ts:152-162.
Suggested fix
Pass a replacer function, as in .replace('#{Notes}', () => generateNotesMarkdown()), for every placeholder that takes user content.
Not the same as #1324, which is about how option values are sourced at build time.
- 主要言語
- TypeScript
- スター
- 3k
- フォーク
- 462
- 平均マージ
- 13時間 28分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
devcontainers/cli のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
devcontainers/cli#1203 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
devcontainers/cli#1178 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 45/100
devcontainers/cli#1324 ·
メンテナーはふだん 1 日以内に返信
-
`devcontainer build` fails on Buildx 0.37.2 because the generated Dockerfile is outside the Compose bake context対応中かも @v-Kaniska244 が 5 日前に担当しました。 オープン
devcontainers/cli#1320 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
devcontainers/cli#1319 ·
メンテナーはふだん 1 日以内に返信
devcontainers/cli の issue をすべて見る
似ている issue
-
🐛 Bug: Calendar work items cannot be opened on mobile対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jaegertracing/jaeger-ui#4596 ·
メンテナーはふだん 1 日以内に返信
-
area:tui enhancement platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
anthropics/claude-code#101490 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
netlify/netlify-mcp#75 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信