]> git.lizzy.rs Git - rust.git/commitdiff
Fix trailing space showing up in example
authorTitus <tituswormer@gmail.com>
Mon, 15 Aug 2022 14:18:00 +0000 (16:18 +0200)
committerGitHub <noreply@github.com>
Mon, 15 Aug 2022 14:18:00 +0000 (16:18 +0200)
The current text is rendered as: U+005B ..= U+0060 ``[ \ ] ^ _ ` ``, or.
This patch changes that to render as: U+005B ..= U+0060 `` [ \ ] ^ _ ` ``, or

The reason for that, is that CommonMark has a solution for starting or ending inline code with a backtick/grave accent: padding both sides with a space, makes that padding disappear.

library/core/src/num/mod.rs

index f481399fdcf9255404ca6a4eef9e2105f36e5427..72b6dc28185404bce5fdcc17f148bb00f63935c7 100644 (file)
@@ -623,7 +623,7 @@ pub const fn is_ascii_hexdigit(&self) -> bool {
     ///
     /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or
     /// - U+003A ..= U+0040 `: ; < = > ? @`, or
-    /// - U+005B ..= U+0060 ``[ \ ] ^ _ ` ``, or
+    /// - U+005B ..= U+0060 `` [ \ ] ^ _ ` ``, or
     /// - U+007B ..= U+007E `{ | } ~`
     ///
     /// # Examples