/** */ Style comments in code examples don't convert correctly

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

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

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

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
documentation

調査の方向性

Start by tracing how TypeScript builds the documentation displayed in VS Code hover popups, then find the code that handles escaped characters in JavaDoc comments. Reproduce the reported case with the nested /** ... */ example and check whether \/ and \@ are displayed without their escape characters. Done when the popup output matches the expected example while ordinary comment parsing remains correct.

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

説明

Possible Improvement
🔎 Search Terms

I'm trying to put a code example in a JavaDoc comment. However, the escaped characters show up as escape characters instead of the regular characters I'm trying to display. For example;

/**
  *  \/** comment in comment *\/
  */

Turns into

\/** comment in comment *\/

But should turn into;

/** comment in comment */
🕗 Version & Regression Information
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about javadocs.
⏯ Playground Link

No response

💻 Code

The input code


/**
 * @see {@link I_Trial} 
 * An API trial is a trial that should be used to test an API (expanded as an Application Programming Interface ).  
 * This could be an internal interface of a program, a public command-line interface between programs, or a RESTful or other web-based interface. 
 * In other words, this kind of trial is the catch-all when nother trial type does not seem appropriate for your tests use an ApiTrial. 
 * For example;
 * 
 * ```
 * import { I_Class} from '@ts.adligo.org/i_obj/dist/i_obj.mjs';
 * import { I_AssertionContext } from '@ts.adligo.org/i_tests4ts/dist/i_assertions.mjs';
 * import { I_Trial } from '@ts.adligo.org/i_tests4ts/dist/i_tests4ts.mjs';
 * import { ApiTrial} from '@ts.adligo.org/tests4ts/dist/trials.mjs';
 *
 * export class FooApiTrial extends ApiTrial {
 *   public static readonly CLASS_NAME = 'FooApiTrial';
 *   public static readonly CLAZZ_NAME = PROC_TESTS_PACKAGE_DOT + FooApiTrial.CLASS_NAME;
 *
 *   
*   \/** \@see {\@link I_Class} 
*     * Also note this fulll package and class name allows (Hudson, Jenkins) or Travis CI (continuous integration) tools
*     * the ability to group Trials and their tests by package and class name.  Hudson, Jenkins and Travis all have
*     * great JUnit results charts and drill down interfaces that tests4ts is integrated with.
*     *\/
 *   getClass(): string { return FooApiTrial.CLAZZ_NAME; }
 *   
 *   testSomethingCool(ac: I_AssertionContext) {
 *     ac.isTrue(false);
 *   }
 * }
 * ```
 * 
 * Note the example is copy and pasteable from the VSCode hover over (intellisence) javadoc popup.
*/

The expected output (intellisence popup in VS Code);

import { I_Class} from '@ts.adligo.org/i_obj/dist/i_obj.mjs';
import { I_AssertionContext } from '@ts.adligo.org/i_tests4ts/dist/i_assertions.mjs';
import { I_Trial } from '@ts.adligo.org/i_tests4ts/dist/i_tests4ts.mjs';
import { ApiTrial} from '@ts.adligo.org/tests4ts/dist/trials.mjs';

export class FooApiTrial extends ApiTrial {
  public static readonly CLASS_NAME = 'FooApiTrial';
  public static readonly CLAZZ_NAME = PROC_TESTS_PACKAGE_DOT + FooApiTrial.CLASS_NAME;


 /** @see {@link I_Class}
   * Also note this fulll package and class name allows (Hudson, Jenkins) or Travis CI (continuous integration) tools
   * the ability to group Trials and their tests by package and class name.  Hudson, Jenkins and Travis all have
   * great JUnit results charts and drill down interfaces that tests4ts is integrated with.
   */
  getClass(): string { return FooApiTrial.CLAZZ_NAME; }

  testSomethingCool(ac: I_AssertionContext) {
    ac.isTrue(false);
  }
}
🙁 Actual behavior

The current output (intellisence popup in VS Code);

import { I_Class} from '@ts.adligo.org/i_obj/dist/i_obj.mjs';
import { I_AssertionContext } from '@ts.adligo.org/i_tests4ts/dist/i_assertions.mjs';
import { I_Trial } from '@ts.adligo.org/i_tests4ts/dist/i_tests4ts.mjs';
import { ApiTrial} from '@ts.adligo.org/tests4ts/dist/trials.mjs';

export class FooApiTrial extends ApiTrial {
  public static readonly CLASS_NAME = 'FooApiTrial';
  public static readonly CLAZZ_NAME = PROC_TESTS_PACKAGE_DOT + FooApiTrial.CLASS_NAME;


 \/** \@see {\@link I_Class}
   * Also note this fulll package and class name allows (Hudson, Jenkins) or Travis CI (continuous integration) tools
   * the ability to group Trials and their tests by package and class name.  Hudson, Jenkins and Travis all have
   * great JUnit results charts and drill down interfaces that tests4ts is integrated with.
   *\/
  getClass(): string { return FooApiTrial.CLAZZ_NAME; }

  testSomethingCool(ac: I_AssertionContext) {
    ac.isTrue(false);
  }
}
🙂 Expected behavior

I don't expect to see the escape characters in the JavaDoc pop-up menu, i.e. I'm seeing '/' or '@' and want to see '/' or '@' respectively.

Additional information about the issue

No response

主要言語
Go
スター
112k
フォーク
16k
平均マージ
3日 4時間
マージ済み PR(30日)
145

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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