Library
REF 06Cheat Sheet · Reference

Code block modifiers

Modifiers placed after the opening fence and language identifier turn static code blocks into interactive UI in assignment.md. Comma-separated; order doesn't matter.

Modifier referenceComma-separated, after fence
```bash,runClick-to-run in the active terminal. Most common form.
```runClick-to-run, no syntax highlighting. Language-less runnable block.
```copyAdds a copy-to-clipboard button. Works without a language tag.
```nocopyDisables the default copy button. Use on output blocks.
```bash,wrapWraps long lines instead of horizontal scroll.
```line-numbersShows a line-number gutter. Combinable: run,line-numbers, js,line-numbers,wrap.
```bash,wrap,copyWrap plus copy. Useful for long one-liners learners need to grab.
```bash,nocopy,runRun-only, no copy button. For commands the learner shouldn’t grab.
```bashPlain bash. No run button. Use for snippets with placeholders.
```copyFor placeholder-bearing snippets that must be edited before running. Forces paste-edit-execute.
Common combinations
# Click-to-run command ```bash,run aws s3 ls ``` # Copyable long command ```bash,wrap,copy curl -X POST ... ``` # Snippet with placeholder ```copy grant select on <TABLE-NAME> to ana; ``` # Reference output ```nocopy Process completed. ```
Language identifiers

bash · sh · shell · python · javascript · js · typescript · ts · yaml · yml · json · dockerfile · hcl · aql · esql · http · graphql · markdown · md · ruby · go · rust · click · mongodb · logs · plaintext · text

sh and shell are synonyms for bash. click is for terminal-pasted code that isn’t a literal bash invocation (inside a kubectl exec shell, for example).

TrapsDon't do this

Invalid syntax: ```bash {“run”: “execute”} looks like it should work but is not valid Instruqt syntax. The block renders, but no run button appears. Always use comma-separated modifiers: ```bash,run.

Placeholder + run is wrong: code blocks with angle-bracket UPPER-DASH-CASE placeholders (<TABLE-NAME>, <USER-EMAIL>) should never use ,run. Use copy alone — learners are forced to paste, edit, and execute manually.

Wrong language tag breaks execution: ```python,run on a bash command tells the platform to run it as Python. Output looks weird, errors confuse. Match the language tag to what’s actually executing.

Choosing the right modifier