workbenchdev / workbenchdev/Workbench

Support XML comments when formatting code

Open
#144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
844
Forks
91
Avg merge
7h 12m
Merged PRs (30d)
1

Description

Right now, if the XML UI contains comments, they will get removed when the code is formatted (Ctrl+Shift+Return or Run).

This is quite annoying as the user might have spent time writing those comments, and they will get deleted. Fortunately it's possible to "undo" the formatting.

Let's support XML comments - for that we need

  • Make ltx sax-like parser emit XML comments
  • Update Workbench format function to use and append comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ltx sax-like parser at src/parsers/ltx.js and determine how XML comments are currently handled. Then trace Workbench's format function for XML UI formatting; done means comments emitted by the parser are preserved and appended rather than removed when formatting is triggered by Ctrl+Shift+Return or Run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.