-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quarto Visual Editor support for reference links #42
Comments
We currently aren't able to support reference links because when Pandoc parses the page they are all resolved into "real" links (i.e. the Pandoc AST doesn't have the concept of a reference link, and since our editor is really editing the AST not the markdown text, there isn't any way for us to read or write them). I'm going to close this issue for now b/c there isn't a way for us to resolve it. Rest assured though if at some point we do get Pandoc AST support for reference links we will implement this in the visual editor! We do now have a version of the Quarto Visual Editor available in our VS Code extension. Details are here: https://quarto.org/docs/visual-editor/vscode/ |
Hi @jjallaire, okay, I'll investigate/raise this issue with pandoc. Did I misunderstand that there will be a stand alone editor or is there a VSC extension only? |
There will also be a stand alone editor (sometime later this year) |
Do you not support reference links at all? There's a couple of variations and @jgm confirmed pandoc AST doesn't preserve the label, but perhaps you could rewrite with option 1 or 3?
|
Pandoc itself is doing the writing (we don't do raw text transformations ourselves). The problem is that we don't have a way of saying to Pandoc "please write this as a reference link" (at least that I know of). Even if we did they wouldn't round-trip back into the AST. Very open to any path you can lead us to get this working (definitely could be missing something). |
That option is available on the command line and implicit reference links seem to survive round trips
|
To clarify: pandoc will allow you to render ALL the links as reference links. But you can't pick and choose. |
Even if all links are made reference links, I think that makes for much more (human) readable and editable markdown. |
I just test drove this locally and sure enough it does round-trip! We could provide an option similarly to what we currently do for where to write footnotes and how to handle line breaks. I'll re-open this and we'll hopefully work on this very soon! |
@jjallaire, great, thank you. FYI: here's the markdown, a syllabus, that I tested your editor on. Perhaps it, or other examples I'm happy to share, would be good tests for ensuring whatever you save remains as human legible/editable as possible. For example, one other nuisance when I go from md2md with pandoc is HTML comments become quoted and labeled. I haven't figured out how to disable that yet, but it means to uncomment something I have to manually select and edit the text rather than using the "uncomment" keyboard shortcut in my editor. ```{=html} |
Disable the |
Thanks, that's:
|
Support for writing reference links has been added here: 8db11d6 This is available in v1.64.0 of the VS Code extension (docs here: https://quarto.org/docs/visual-editor/vscode/#links) |
I'm eagerly awaiting Quarto's stand-alone markdown editor (is there a timeframe on that?) because in my quick test, RStudio's visual mode, is an excellent markdown editor: it supports multiline tables and div sections! Aside from not needing all the R stuff, the show-stopper, though, is that it rewrites all of my carefully made reference links. Could these be supported?
The text was updated successfully, but these errors were encountered: