quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.74k stars 305 forks source link

completions for html-pre-tag-processing on fenced div #10076

Open gordonwoodhull opened 2 months ago

gordonwoodhull commented 2 months ago

Continuing #10055

Completions for fenced divs were not behaving as I would expect in VSCode (missing results, strange results), so I was unable to test the completion for html-pre-tag-processing.

I don't know if it's important to get autocomplete for this obscure new feature in 1.5 but we can debug/properly configure my VSCode at some point.

I think it would look like this (unless it should go under an existing group):

diff --git a/src/resources/editor/tools/attrs.yml b/src/resources/editor/tools/attrs.yml
index fb03fac2c..40f7f70fb 100644
--- a/src/resources/editor/tools/attrs.yml
+++ b/src/resources/editor/tools/attrs.yml
@@ -320,6 +320,13 @@
     - value: .hidden
       doc: Hide content from view

+## html-pre-tag-processing
+- group: html-processing
+  contexts: [div]
+  completions:
+    - value: 'html-pre-tag-processing="parse"'
+      doc: Parse the pre tag in the HTML Raw Block into the Pandoc AST
+
 # revealDiv

 - group: revealDiv
cscheid commented 2 months ago

I think it would be nice to get this in for 1.5. It's not critical, but I think it'd be a feature I'd backport if we ship without it.