✨ Highlight Matching Tags

Offen
#274 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
28/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
swift
Bereich
devtools

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Ermittle zuerst die Komponenten des Editors für das Parsen von Tags, den Cursor-Abgleich, die Hervorhebung und die Edit-Synchronisierung; abgeschlossen ist die Aufgabe, wenn passende öffnende und schließende Tags für die beschriebenen Cursorpositionen hervorgehoben werden und synchron bleiben, während Namen bearbeitet werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement
Description

We want to enhance tag-matching behavior in markup languages such as HTML, XML, and JSX by highlighting matching tags based on cursor position. This feature is inspired by bracket matching in Xcode, where matching brackets are highlighted based on cursor placement.

When the cursor is placed within a tag, the corresponding opening or closing tag should be highlighted. Additionally, if any tag name is modified in either the beginning or end tag, the matching tag should update to reflect the change.

Behavior Examples

In the following examples, | represents the cursor position, and underlined text represents the highlighted matching tags:

  • <|div class="wrapper">Hello world!</div>
  • <div| class="wrapper">Hello world!</div>
  • <div class="wrapper">|Hello world!</div>
  • <div class="wrapper">Hello world!<|/div>
  • <div class="wrapper">Hello world!</div|>
  • <div class="wrapper">Hello world!</div>|
Requirements
  1. Cursor-Based Tag Matching:

    • When the cursor is within a tag name, either at the opening or closing tag, the corresponding tag should be highlighted.
  2. Tag Synchronization:

    • When a tag name is edited, the matching tag should update to reflect the change in real-time, ensuring that both tags are always in sync.
  3. Highlight Behavior:

    • Highlighting should clearly indicate the matching tag, using a distinct visual style (e.g., underline or color change) for both the opening and closing tags to enhance visibility.

This feature will improve the editing experience by making it easier to identify matching tags, reducing errors in nested or complex structures.

Original Issue Description

Is it possible to highlight the opening and closing tags? Example: <div> </div>

Vorherrschende Sprache
Swift
Sterne
720
Forks
162
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CodeEditApp/CodeEditSourceEditor

Alle Issues in CodeEditApp/CodeEditSourceEditor

Ähnliche Issues

Weitere Issues zu Swift

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.