Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown text interpolation bug #3028

Closed
haakon-e opened this issue Sep 26, 2024 · 2 comments
Closed

Markdown text interpolation bug #3028

haakon-e opened this issue Sep 26, 2024 · 2 comments

Comments

@haakon-e
Copy link

In the following example, the variable y does not always get interpolated correctly and is instead interpreted as a math environment

let
	x = 1
	y = 2
	md"""
	This works: x = $x, y = $y
	
	but this doesnt: x = $x, y = ($y)

	adding a space after '(' fixes it: x = $x, y = ( $y)
	"""
end

Screenshot:
image


Julia v1.10.5, Pluto v0.19.46

@Pangoraw
Copy link
Collaborator

This seems to be a problem with the Markdown stdlib as it reproduces in the repl:

julia> let
               x = 1
               y = 2
               md"""
               This works: x = $x, y = $y

               but this doesnt: x = $x, y = ($y)

               adding a space after '(' fixes it: x = $x, y = ( $y)
               """
       end
  This works: x = 1, y = 2

  but this doesnt: x = x, y = (y)

  adding a space after '(' fixes it: x = 1, y = ( 2)

Presumably there is ambiguity around parsing $y and inline math equations.

@haakon-e
Copy link
Author

Thanks, reposted the issue here: JuliaLang/julia#55943

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

No branches or pull requests

2 participants