Skip to content

Commit

Permalink
Improve literals with inline code are handled
Browse files Browse the repository at this point in the history
This avoids making the text smaller twice.
  • Loading branch information
pradyunsg committed Jul 15, 2023
1 parent 1680dbe commit f8db95b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/kitchen-sink/blocks.rst
Expand Up @@ -172,6 +172,21 @@ https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal-bloc
curl -O http://someurl/release-0.1.0.tar-gz
echo "This is an intentionally very long line because I want to make sure that we are handling scrollable code blocks correctly."
asyncio.set_event_loop_policy(
asyncio.WindowsSelectorEventLoopPolicy()
)
With inline code
~~~~~~~~~~~~~~~~

Here's a parsed literal containing nested inline code:

.. parsed-literal::
:obj:`asyncio.set_event_loop_policy`\ (
:obj:`asyncio.WindowsSelectorEventLoopPolicy`\ ()
)
Code Block
----------

Expand Down
4 changes: 4 additions & 0 deletions src/furo/assets/styles/content/_code.sass
Expand Up @@ -6,6 +6,10 @@ code.literal, .sig-inline
font-size: var(--font-size--small--2)
padding: 0.1em 0.2em

pre.literal-block &
font-size: inherit
padding: 0

p &
border: 1px solid var(--color-background-border)

Expand Down

0 comments on commit f8db95b

Please sign in to comment.