Skip to content

Update SAS Code Execution and Rendering#563

Merged
statasaurus merged 16 commits intoPSIAIMS:mainfrom
michaelwalshe:update-sas-qmd-execution
Apr 1, 2026
Merged

Update SAS Code Execution and Rendering#563
statasaurus merged 16 commits intoPSIAIMS:mainfrom
michaelwalshe:update-sas-qmd-execution

Conversation

@michaelwalshe
Copy link
Copy Markdown
Contributor

@michaelwalshe michaelwalshe commented Mar 19, 2026

This PR updates the SAS execution engine options in quarto docs to generally be:

```sas
<code>
```

Rather than using {sas} or {r} or default. I've also therefore removed the global eval: false and project local eval: true for all R blocks. I've also added a syntax highlighting definition file for SAS, which means that Quarto/Pandoc correctly recognise it as a language and add code backgrounds and syntax highlighting, e.g.

```sas
proc format; 
  value respmulti 
  1='Liver' 
  2='Lung' 
  3='Bone'; 
run; 
 
data resp; 
  set resp1; 
    call streaminit(1234);   
    respord = rand("integer", 1, 3);     *Ordinal; 
    respnom = put(respord, respmulti.);  *Nominal;
run;
```

Renders now with highlighted steps, keywords, numbers, strings, comments, etc.
image

As part of the change I've also re-rendered the whole project to render with SAS syntax highlighting and check that everything is executing which should be. Unfortunately that also means that this is a large PR, but couldn't think of a good way to break up the changes sensibly.

I'm going to try to get the SAS syntax highlighting merged upstream so that any quarto project using SAS will get it by default, but that may take a while to trickle through (will need new versions of Kate, skylighting, pandoc, and quarto to be released!)

Other small changes:

  • Removed sasquatch dependency as not used
  • Reverted sessioninfo to 1.2.2 as 1.2.3 currently has a bug

Fixes #559

@statasaurus
Copy link
Copy Markdown
Contributor

Amazing thank you! I will have a look at this

@statasaurus
Copy link
Copy Markdown
Contributor

@yannickvandendijck and I will pull this in next week

@statasaurus statasaurus self-requested a review April 1, 2026 08:46
@statasaurus statasaurus merged commit 8658caf into PSIAIMS:main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixing SAS Evaluation Issues in Quarto

2 participants