microsoft / microsoft/TypeScript-TmLanguage
Highlight @example jsdoc body as source code
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 471
- Forks
- 149
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
TS and JS Grammar Extension version: 0.0.47 / latest
Code
For a js doc body such as:
/**
* @example
* 1 + 1
*/
const a = 1
We mark the body of the @example block specially but do not actually syntax highlight it. I added an injection grammar in VS Code that does this: https://github.com/Microsoft/vscode/blob/master/extensions/typescript-basics/syntaxes/ExampleJsDoc.injection.tmLanguage.json
May be worth including in the core grammar. Let me know if you agree. The injection grammar will not work as is, we're relying on another injection grammar that handles separating the leading stars of the doc block from the documentation content itself
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Überprüfe die verlinkte VS Code ExampleJsDoc.injection.tmLanguage.json und die Verarbeitung der TypeScript/JavaScript-Grammatik für JSDoc-Kommentare im Repository. Bestätige, wie die bestehende Injection führende Sternchen vom Dokumentationsinhalt trennt; als abgeschlossen gilt die Aufgabe, wenn der Body eines @example-Blocks Syntaxhervorhebung für Quellcode erhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100