Skip to content

rustdoc + rust.css preserves line breaks in inline code #19323

Closed
@kmcallister

Description

@kmcallister
$ cat foo.md
% title

The first change is to disallow importing macros from an `extern
crate` that is not at the crate root.

$ rustdoc --html-in-header=<(echo '<link rel="stylesheet" href="http://doc.rust-lang.org/rust.css">') -o . foo.md

produces

<p>The first change is to disallow importing macros from an <code>extern
crate</code> that is not at the crate root.</p>

and, since code is white-space: pre-wrap in rust.css, the line break appears in the rendered document. Probably code shouldn't set white-space independently of pre, but I'm not quite sure what the best fix is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions