question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having inline code in chapter title outputs additional strange text in top left corner

See original GitHub issue

Describe the bug I’m currently running 0.7.0b. I have a chapter in Zero 2 Data 8 called “The datascience Package” (link). Having inline code in the chapter title causes this strange text to appear on the page (see below).

Screen Shot 2020-06-24 at 2 40 13 PM

To Reproduce Steps to reproduce the behavior:

  1. Changing the working directory to root zero-to-data-8
  2. Running jupyter-book build .
  3. Looking at the file locally.

Expected behavior Building should not have the upper left text to show up.

Link to book repository: https://github.com/data-8/zero-to-data-8

Environment (please complete the following information):

  • Python Version 3.7
  • Output of jupyter-book --version: 0.7.0b

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
choldgrafcommented, Jun 24, 2020

have a fix for this in the SBT here: https://github.com/executablebooks/sphinx-book-theme/pull/126...I’m still not sure if this is a bug in the parser though

0reactions
choldgrafcommented, Jun 24, 2020

Alright I figured out where the issue is, but I’m thinking this could be myst-parser bug or it could be expected Sphinx behavior.

Right here, we set the title of the page: https://github.com/executablebooks/sphinx-book-theme/blob/master/sphinx_book_theme/layout.html#L17

but if there is formatting in a title, then the HTML for the title gets included in the title variable:

E.g. if I make the theme title The `Sphinx Book` theme, then title equals:

'The <code class="docutils literal notranslate"><span class="pre">Sphinx</span> <span class="pre">Book</span></code> Theme'

This is causing the second half of the title to spill out into the page body

Read more comments on GitHub >

github_iconTop Results From Across the Web

R Markdown Syntax: Headings & Lists - UCSB Carpentry
First Things First - Line Breaks. It seems strange to have to talk about line breaks when writing text, but this is very...
Read more >
4 R Markdown - Getting used to R, RStudio, and R Markdown
An introduction into using R, RStudio, and R Markdown for new users.
Read more >
first-line - CSS: Cascading Style Sheets - MDN Web Docs
The ::first-line CSS pseudo-element applies styles to the first line of a block-level element.
Read more >
Inline Code - R Markdown - RStudio
Inline Code. Code results can be inserted directly into the text of a . ... As a result, inline output is indistinguishable from...
Read more >
HTML and CSS Tutorial - Nanyang Technological University
</strong> . There are two types of elements: Container Element: A container element has an opening tag <tag-name> that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found