Skip to content

Adjust string template docs#398

Open
tjpalmer wants to merge 2 commits intomainfrom
adjust-docs-string-interp
Open

Adjust string template docs#398
tjpalmer wants to merge 2 commits intomainfrom
adjust-docs-string-interp

Conversation

@tjpalmer
Copy link
Copy Markdown
Contributor

  • Also change a tempermd block to tempermd. Here's before:
image

And after:

image
  • This fixes highlighting for the indented code. I still don't address untagged triple-quote in pygments, but this still feels like an improvement overall.
  • Both still have an unclosed string, but that's fixed in Spot-fix to Docs wording #374

Signed-off-by: Tom <tom@temper.systems>
Signed-off-by: Tom <tom@temper.systems>
goes inside code blocks:

````md
````tempermd
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recognize this in our pygments support, even if I only support indented blocks and not untagged blocks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure how well I cope with breaking blocks in the middle of string interpolation values or other edge cases. Maybe something to keep in mind in the future.


Triple-quotes like `"""` start a multiline string, then all whitespace and
comments are ignored, and every line content beginning with any of the following
continues the string:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized I'd somehow left out intro text for the next example. I think this current arrangement now still isn't ideal, but I think it's an improvement.

// Use empty interpolation to provide trailing whitespace.
~${i.toString()}, ${""}
~${i}, ${}
:}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this because #392 is merged.

@tjpalmer tjpalmer marked this pull request as ready for review March 27, 2026 20:32
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.

2 participants