PrivatecurrentPrivatecurrentPrivate ReadonlypluginPrivatesuggestionPrivateaddPrivategetGenerate suggestion items based on this context. Can be async, but preferably sync. When generating async suggestions, you should pass the context along.
PrivategetPrivateisBased on the editor line and cursor position, determine if this EditorSuggest should be triggered at this moment. Typically, you would run a regular expression on the current line text before the cursor. Return null to indicate that this editor suggest is not supposed to be triggered.
Please be mindful of performance when implementing this function, as it will be triggered very often (on each keypress). Keep it simple, and return null as early as possible if you determine that it is not the right time.
PrivateparseParses citation information from the provided equation content string, extracting details about the citation label and tags at the current cursor position.
Here we use cursorCh and eqStart parameter is just for the convenience of calling, it can also be reduced to 1 parameter.
The equation content string to parse for citation information.
The character index of the cursor of the current line.
The starting character index of the equation of the current line.
An object containing the validity of the citation, citation index, full and current labels, arrays of full and current tags, citation type, and citation prefix.
Privaterefreshrefresh in code block state when cursor line change
PrivaterenderPrivaterenderPrivaterenderPrivaterenderPrivateshouldTest if the trigger should be triggered in the current environment.
get math environment info from line and cursor position, including last dollar index, equation content, equation start and end position, and line content