Typing `/` after a `<` when we know the tag isn't closed should close the open tag.

オープン
#505 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
html, typescript

調査の方向性

まず、pull request 501 の議論と、\u003c の後に / を入力したときの html/autoInsert に対する既存の HTML Language Server の処理を確認します。\u003e のケースで使用される parser の検証を、LiquidHTMLASTParsing エラーを含めて追跡します。完了条件は、重複する終了タグを追加せずに、閉じられていないタグを安全に補完できることです。

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.
This is a followup of https://github.com/Shopify/theme-tools/pull/501#discussion_r1777602887

It seems like the HTML Language Server also does html/autoInsert when typing / after a <.

Describe the solution you'd like

  • If the user types / after a < and we know that it's safe to close a tag that currently is opened without child, then we should complete it.
  • We shouldn't close tags that are already opened, don't want duplicate close tags (no <div></div></div> pls)

We might be smart and do a "smart edit of the file", pass it through the parser and verify for a LiquidHTMLASTParsing error like we do for the > case.

主要言語
TypeScript
スター
245
フォーク
108
平均マージ
2日 8時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Shopify/theme-tools のほかの issue

Shopify/theme-tools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。