* Get the tab size from editor state
(state: EditorState)
| 46 | * Get the tab size from editor state |
| 47 | */ |
| 48 | function getTabSize(state: EditorState): number { |
| 49 | const tabSize = state.facet(EditorState.tabSize); |
| 50 | return Number.isFinite(tabSize) && tabSize > 0 ? tabSize : 4; |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Resolve the indentation width used for guide spacing. |
no outgoing calls
no test coverage detected