How to enter \n with backtick syntax?

I made a small post describing how to do a documentation PR directly by the github interface (no fork required) here.

Because some questions arose, I explained a little better in this post and, continuing in that thread, I made a screenshot too.

2 Likes

Again, I would say bug. But opening an issue would be best.

Issue filed at https://github.com/JuliaLang/julia/issues/37817 .

I don’t know about documented, your question, but echo will not be portable to Windows. I’m not on Windows, do newlines as part of a command translate to there?

It works in backticks:

julia> `ls $1+2`
`ls 1+2`

I’m not sure why "ls $1+2" is different.

2 Likes

So, I think "ls $1+2" is probably a programming error. I’d say the problem is with backticks. I think the interpretation should be $ could have a symbol following or should require (). However, I’m not sure the part about permitting arbitrary expressions after is a great idea.

Anyway, I made another ticket for a subset of this.
https://github.com/JuliaLang/julia/issues/38734