Inline code such as const brief = "short" sits in a sentence. A longer command like git -c push.negotiate=true push origin HEAD:main should stay readable in the middle of a line.

A prompt

Write a 100-word note for existing customers explaining the new pricing.
Keep it calm and plain.
Don't apologise.

JavaScript and TypeScript

// Count the words in a post
function wordCount(text) {
  return text.trim().split(/\s+/).filter(Boolean).length;
}

console.log(wordCount("The machine is fast."));
type Theme = 'Communication' | 'Judgement' | 'Craft';

interface Post {
  title: string;
  theme: Theme;
  draft?: boolean;
}

const live = (posts: Post[]) => posts.filter((p) => !p.draft);

Python

from collections import Counter

def top_words(text, n=3):
    words = [w.lower().strip(".,") for w in text.split()]
    return Counter(words).most_common(n)

print(top_words("The brief is the work. The work is the brief."))

Shell, JSON and YAML

npm ci
npm run build
az staticwebapp list --output table
{
  "title": "Test Post 3",
  "tags": ["code", "test"],
  "draft": false,
  "words": 480
}
title: "Test Post 3"
number: 3
theme: Judgement
takeaways:
  - First
  - Second

HTML, CSS and a diff

<article class="post">
  <h1>Hello</h1>
  <p>A paragraph with <strong>bold</strong> text.</p>
</article>
.post {
  max-width: 40rem;
  margin: 0 auto;
}
.post h1 { font-family: monospace; }
- Write something about our launch.
+ Write a 100-word note for existing customers explaining the new pricing.

No language, and one very long line

A block with no language set.
It has two lines and no colouring.
This is one very long line with no breaks so you can see how a code block handles text that is wider than the column: it should wrap or scroll rather than push the page sideways, and it should stay readable on a phone.

Code in a list

  1. Install the packages with npm ci.
  2. Build the site with npm run build.
  3. Check the dist folder for the output.