Skip to content

How can insert a varables inside code block output? #1547

Discussion options

You must be logged in to vote

Interpolating into code blocks and code literals inside md" strings isn't supported. This was a design choice of the Markdown parser itself rather than anything related to Pluto. If you're wanting to interpolate into code literals like that then you can call Markdown.parse on a String where you have already interpolated userID:

Markdown.parse(
	"""
	```java
	public string userId = $userId;
	```
	"""
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eggcaker
Comment options

Answer selected by eggcaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants