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

TRACKING ISSUE: Labs blog build errors due to code output formatting #679

Open
MarsBarLee opened this issue Feb 28, 2023 · 1 comment
Open

Comments

@MarsBarLee
Copy link
Contributor

MarsBarLee commented Feb 28, 2023

These are the PRs that have MDX build errors due to code output formatted as plain text instead of a code block. All of these are ipynb-to-md conversions, so the formatting used to build on the old website but not on the Vercel build.

For example, from #647:


I'm getting the Vercel build error: error [Error: [next-mdx-remote] error compiling MDX:

Full error message:

Unexpected character `'` (U+0027) after name,
expected a character that can start an attribute name,
such as a letter, `$`, or `_`; whitespace before attributes;
or the end of the tag

  270 |
> 271 |     <class 'int'>
      |            ^
  272 |     <class 'str'>
  273 |

Link to error

The context is showing the result of some code. Link to this section in the old blog website..
image

Maybe we could wrap it in a code block? But then it would look out of place with the rest of the code results, unless the rest were also in a code block.


@gabalafou and I talked about it. The easiest solution would be to wrap the code output into code blocks as well, but that does not make the code input and output visually distinct.

Once we decide on a solution, I can help implement the changes to the rest of these PRs.

PRs with this issue:
#647
#657
#653
#654
#656
#658
#659
#661

@MarsBarLee
Copy link
Contributor Author

Gabriel and I tried using admonitions styling to format the code output. However Markdown doesn’t have it’s own admonition syntax. The website does not have it's own admonition styling either. Here is a link some other admonition stylings we tried on an blog PR.

In the meantime we decided it would be better to try out and possibly install code output formatting such as with python-console, python-traceback or doctest formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant