MikhailArkhipov / vscode-r

R Tools for VS Code
Other
82 stars 6 forks source link

VSCode Rmarkdown: Use of non-inline math ($$) breaks interpretation of subsequent markdown & R code #74

Open jordantgh opened 3 years ago

jordantgh commented 3 years ago

Only tested in a remote WSL2 window. Compare the highlighted area in the two images.

image

image

I would not mind using only inline math, but in my case pandoc-crossref requires non-inline math for equation referencing.

MikhailArkhipov commented 3 years ago

For RMD files question is actually to VS Code embedded markdown editor. This extension simply associates RMD with MD editor for convenience - so one can execute R chunks in console. Extension does not provide separate RMD editor like in big VS. So any extensions to MD syntax may break regular stock MD editor. All it does is really this

    const files = workspace.getConfiguration('files');
    const associations = files.get<{ ext: string; editor: string }>('associations');
    associations['*.rmd'] = 'markdown';
    await files.update('associations', associations, ConfigurationTarget.Global);

Theoretically it is possible to make full blown RMD editor but that would quite a bit of work.