Skip to content

Multiple spaces in inline code are getting converted to single space #1962

Open
@learnbyexample

Description

@learnbyexample

It would be nice if spaces are preserved as is in inline code. For example, the line below in GitHub

Spacing in inline code `printf 'apple    banana\n'`

will be rendered as shown below:

image

Here's a sample test case with mdBook:

$ mdbook --version
mdbook v0.4.25

$ mdbook init test-book
$ cd test-book/

$ cat src/chapter_1.md
# Chapter 1

Spacing in inline code `printf 'apple    banana\n'`

$ mdbook serve

The above test produces this for me:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-StyleArea: Style (CSS, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions