From 665b6c81abf3706f31c6afd89e4f4eeddaa0b634 Mon Sep 17 00:00:00 2001 From: Sunny Hirai Date: Sun, 6 Jun 2021 18:04:18 -0700 Subject: [PATCH] docs: Experiment with alternate Options syntax for documentation --- docs/api/nodes/editor.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/docs/api/nodes/editor.md b/docs/api/nodes/editor.md index f9f1113ef..0ed6d4d5e 100644 --- a/docs/api/nodes/editor.md +++ b/docs/api/nodes/editor.md @@ -52,26 +52,14 @@ Creates a new, empty `Editor` object. #### `Editor.above(editor: Editor, options?) => NodeEntry | undefined` -```ts -function Editor.above( - editor: Editor, - options?: { - at?: Location - match?: NodeMatch - mode?: 'highest' | 'lowest' - voids?: boolean - } -) => NodeEntry | undefined -``` - Get the matching ancestor above a location in the document. -Options: `{at?: Location, match?: NodeMatch, mode?: 'highest' | 'lowest', voids?: boolean}` +Options: -- `mode?`: If `lowest` (default), returns the lowest matching ancestor. If `highest`, returns the highest matching ancestor. -- `voids?`: If `false` (default), ignore void objects. If `true`, include `void` objects. -- `at?`: Where to start at which is `editor.selection` by default. -- `match?`: Narrow the match +- `at?: Location`: Where to start at which is `editor.selection` by default. +- `match?: NodeMatch`: Narrow the match +- `mode?: 'highest' | 'lowest'`: If `lowest` (default), returns the lowest matching ancestor. If `highest`, returns the highest matching ancestor. +- `voids?: boolean`: If `false` (default), ignore void objects. If `true`, include `void` objects. #### `Editor.after(editor: Editor, at: Location, options?) => Point | undefined`