Skip to content

Adjust string template docs#398

Merged
tjpalmer merged 2 commits intomainfrom
adjust-docs-string-interp
Apr 9, 2026
Merged

Adjust string template docs#398
tjpalmer merged 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.

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.

But also waiting on #399 now.

@tjpalmer tjpalmer marked this pull request as ready for review March 27, 2026 20:32
@tjpalmer
Copy link
Copy Markdown
Contributor Author

tjpalmer commented Apr 3, 2026

I reverted this to a draft for now until #399 goes in.

@tjpalmer tjpalmer marked this pull request as ready for review April 9, 2026 15:42
@tjpalmer tjpalmer merged commit c099a0b into main Apr 9, 2026
2 checks passed
@tjpalmer tjpalmer deleted the adjust-docs-string-interp branch April 9, 2026 15:42
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