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

Code block tab indentation error (Python) #18

Closed
joshuahyatt opened this issue Mar 27, 2020 · 2 comments
Closed

Code block tab indentation error (Python) #18

joshuahyatt opened this issue Mar 27, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@joshuahyatt
Copy link

When running python with tabs instead of spaces for scope, codebraid does not compile the document.
This will fail

```{.python .cb.run}
for i in range(5):
	print(i)

While this will run

```{.python .cb.run}
for i in range(5):
    print(i)
@gpoore
Copy link
Owner

gpoore commented Mar 27, 2020

Apparently Pandoc converts all tabs to spaces by default, so when codebraid searches the original file to find the location of the code (this is useful in reporting any errors), it never finds the code. Pandoc has a --preserve-tabs option, so I will probably need to switch to using that for intermediate document transformations. --preserve-tabs is currently supported, but only applies to the final document transformation, not intermediate steps which is what matters here.

@gpoore
Copy link
Owner

gpoore commented Jun 17, 2020

This is fixed now in the dev version on GitHub, and a new version will be on PyPI soon.

@gpoore gpoore closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants