(id: string)
| 954 | ]) |
| 955 | |
| 956 | function commandIdToExName(id: string): string { |
| 957 | // CM-Vim's ex parser only reads word characters (`\w+` = `[A-Za-z0-9_]`) |
| 958 | // for the command name. Any non-word char — dot, dash, etc. — ends the |
| 959 | // name early. Collapse them all to underscores so `note.copy-wikilink` |
| 960 | // → `note_copy_wikilink` is recognized as a single token. |
| 961 | return id.replace(/[^A-Za-z0-9]+/g, '_') |
| 962 | } |
| 963 | |
| 964 | /** Names of every ex command we register. Captured during init so the |
| 965 | * tab-completion handler can match against the full set without re- |
no outgoing calls
no test coverage detected