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.
pradyunsg committed Jul 15, 2023

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
1 parent 1680dbe commit f8db95b
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/kitchen-sink/blocks.rst
Original file line number Diff line number Diff line change
@@ -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
----------

4 changes: 4 additions & 0 deletions src/furo/assets/styles/content/_code.sass
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit f8db95b

Please sign in to comment.