mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-05 07:37:24 +03:00
Edit JSDoc.
This commit is contained in:
parent
63ca5b80ea
commit
aa44c4f7b0
@ -19,7 +19,10 @@ export function escapeRegExp(str: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the comments if any
|
||||
* Removes a comment on each line of `text`.
|
||||
*
|
||||
* @param text A string in which comments get removed.
|
||||
* @param commentSign The character starting a comment. Typically '%'.
|
||||
*/
|
||||
export function stripComments(text: string, commentSign: string): string {
|
||||
const pattern = '([^\\\\]|^)' + commentSign + '.*$'
|
||||
@ -28,7 +31,8 @@ export function stripComments(text: string, commentSign: string): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finding the longest substring containing balanced curly braces {...}
|
||||
* Finds the longest substring containing balanced curly braces {...}
|
||||
*
|
||||
* @param s A string to be searched.
|
||||
*/
|
||||
export function getLongestBalancedString(s: string): string {
|
||||
@ -144,6 +148,7 @@ export function svgToDataUrl(xml: string): string {
|
||||
|
||||
/**
|
||||
* Returns a function replacing placeholders of LaTeX recipes.
|
||||
*
|
||||
* @param rootFile The path of the root file.
|
||||
* @param tmpDir The path of a temporary directory.
|
||||
* @returns A function replacing placeholders.
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
We start a new VS Code instance each `fixture` directory in `fixtures/build/` and others, and execute an appropriate test defined in `build.test.ts` while skipping other tests not related to the directory. Fot tests of building a LaTeX file, we try to build a LaTeX file in the directory. If a PDF file is not generated, the test fails. With this approach, we can debug the extension by opening a TeX file in the `fixture` directory if the test fails.
|
||||
|
||||
### How tests executed
|
||||
|
||||
- `runTest.ts` starts a new VS Code instance each `fixture` directory and executes `*.index.ts`.
|
||||
- `*.index.ts` runs all the tests defined in `*.test.ts`.
|
||||
- Tests in `*.test.ts` are executed through `runTestWithFixture`.
|
||||
|
Loading…
Reference in New Issue
Block a user