You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current send_code_block feature doesn't work as intended for Markdown code cells, delimited by triple backtics:
---title: "Example QMD notebook"---## R code chunk```{r}print('hello')for (i in seq(1, 5)) { print(i)}```## Python code chunk```{python}print('hello')for i in range(5): print(i)```
If you define the dividers to be "```", so it would recognize either language, the issue is that in the case of both languages, the send_code_block function also sends the first line, with the language indicator attached, breaking the REPL:
In [1]: ```{python}
...: print('hello')
...:
...: for i in range(5):
...: print(i)
...:
Cell In[1], line 1
```{python}
^
SyntaxError: invalid syntax
The suggested solution by @frere-jacques (thanks for the sppedy reply <3) involves incrementing the start of the block by one, with some consideration for edge cases such as empty blocks, and start/end of buffer.
The text was updated successfully, but these errors were encountered:
This is a follow up from #391 (comment)
The current
send_code_block
feature doesn't work as intended for Markdown code cells, delimited by triple backtics:If you define the dividers to be "```", so it would recognize either language, the issue is that in the case of both languages, the send_code_block function also sends the first line, with the language indicator attached, breaking the REPL:
The suggested solution by @frere-jacques (thanks for the sppedy reply <3) involves incrementing the start of the block by one, with some consideration for edge cases such as empty blocks, and start/end of buffer.
The text was updated successfully, but these errors were encountered: