Skip to content

Commit

Permalink
Small JSDoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed Aug 16, 2024
1 parent 385d125 commit 02b0fc6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package/src/extensions/autocomplete/javascript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type JSContext = {
* will be present.
*
* There are three capture groups:
* 1) The tags' name
* 1) The tag's name
* 2) The last attribute's name
* 3) Is present if the cursor is inside an attribute value
*/
Expand Down
2 changes: 1 addition & 1 deletion package/src/extensions/autocomplete/javascript/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AttributeConfig, Completion, CompletionSource, TagConfig } from "../typ
import { optionsFromKeys } from "../utils.js"

/**
* Completion source that adds auto completion for JSX tags.
* Completion source that adds autocompletion for JSX tags.
* @param tags Object mapping tag-names to completable attributes for that tag.
* @param globalAttributes Completable attributes shared by all tags.
* @returns A Completion source. Requires a JavaScript context to work.
Expand Down
6 changes: 5 additions & 1 deletion package/src/extensions/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const whitespaceEnd = (str: string) => str.search(/\S|$/)
* - Ctrl+/ (Cmd+/ on MacOS): Toggle comment
* - Shift+Alt+A: Toggle block comment
* - Ctrl+M (Ctrl+Shift+M on MacOS): Toggle Tab capturing
*
* The shortcuts for the commands are not easily customizable. If you want to customize
* them, you can copy the {@link https://github.com/FIameCaster/prism-code-editor/blob/main/package/src/extensions/commands.ts|source}
* and change the conditions.
*
* @param selfClosePairs Pairs of self-closing brackets and quotes.
* Must be an array of strings with 2 characters each.
Expand Down Expand Up @@ -383,7 +387,7 @@ export interface EditHistory extends BasicExtension {
* `EditHistory.go(-1)` would be equivalent to an undo while `EditHistory.go(1)` would
* be equivalent to a redo.
*
* If there's no entry at the specified position, the call does nothing.
* If there's no entry at the specified offset, the call does nothing.
*/
go(offset: number): void
/**
Expand Down
5 changes: 2 additions & 3 deletions package/src/extensions/search/invisibles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { createSearchAPI } from "./search.js"
/**
* Extension that shows tabs and spaces.
* @param alwaysShow By default, spaces and tabs are only shown when they're selected.
* By passing `true`, they're always shown. This negatively impacts performance when
* typing, and increases the amount of elements in the DOM, but improves performance when
* changing the selection.
* By passing `true`, they're always shown, which negatively impacts performance when
* typing, and increases the amount of elements in the DOM.
*
* Requires styling from `prism-code-editor/invisibles.css`.
*/
Expand Down

0 comments on commit 02b0fc6

Please sign in to comment.