From aae26bc5b864971ef54f4d95d5ed89a6436334e2 Mon Sep 17 00:00:00 2001 From: Paul Daniel Faria Date: Mon, 15 Jun 2020 20:17:26 -0400 Subject: Add highlighting support for doc comments --- crates/ra_ide/src/snapshots/highlight_doctest.html | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'crates/ra_ide/src/snapshots/highlight_doctest.html') diff --git a/crates/ra_ide/src/snapshots/highlight_doctest.html b/crates/ra_ide/src/snapshots/highlight_doctest.html index 13a5d1b12..f1e007b09 100644 --- a/crates/ra_ide/src/snapshots/highlight_doctest.html +++ b/crates/ra_ide/src/snapshots/highlight_doctest.html @@ -38,48 +38,48 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd impl Foo { pub const bar: bool = true; - /// Constructs a new `Foo`. - /// - /// # Examples - /// - /// ``` - /// # #![allow(unused_mut)] - /// let mut foo: Foo = Foo::new(); - /// ``` + /// Constructs a new `Foo`. + /// + /// # Examples + /// + /// ``` + /// # #![allow(unused_mut)] + /// let mut foo: Foo = Foo::new(); + /// ``` pub const fn new() -> Foo { Foo { bar: true } } - /// `bar` method on `Foo`. - /// - /// # Examples - /// - /// ``` - /// use x::y; - /// - /// let foo = Foo::new(); - /// - /// // calls bar on foo - /// assert!(foo.bar()); - /// - /// let bar = foo.bar || Foo::bar; - /// - /// /* multi-line - /// comment */ - /// - /// let multi_line_string = "Foo - /// bar - /// "; - /// - /// ``` - /// - /// ```rust,no_run - /// let foobar = Foo::new().bar(); - /// ``` - /// - /// ```sh - /// echo 1 - /// ``` + /// `bar` method on `Foo`. + /// + /// # Examples + /// + /// ``` + /// use x::y; + /// + /// let foo = Foo::new(); + /// + /// // calls bar on foo + /// assert!(foo.bar()); + /// + /// let bar = foo.bar || Foo::bar; + /// + /// /* multi-line + /// comment */ + /// + /// let multi_line_string = "Foo + /// bar + /// "; + /// + /// ``` + /// + /// ```rust,no_run + /// let foobar = Foo::new().bar(); + /// ``` + /// + /// ```sh + /// echo 1 + /// ``` pub fn foo(&self) -> bool { true } -- cgit v1.2.3 From a951108173349f9ff0b9936ec2af8881fd92fc98 Mon Sep 17 00:00:00 2001 From: Paul Daniel Faria Date: Wed, 17 Jun 2020 09:33:21 -0400 Subject: Ensure all existing doctest code highlights have documentation modifier --- crates/ra_ide/src/snapshots/highlight_doctest.html | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'crates/ra_ide/src/snapshots/highlight_doctest.html') diff --git a/crates/ra_ide/src/snapshots/highlight_doctest.html b/crates/ra_ide/src/snapshots/highlight_doctest.html index f1e007b09..106c93077 100644 --- a/crates/ra_ide/src/snapshots/highlight_doctest.html +++ b/crates/ra_ide/src/snapshots/highlight_doctest.html @@ -43,8 +43,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd /// # Examples /// /// ``` - /// # #![allow(unused_mut)] - /// let mut foo: Foo = Foo::new(); + /// # #![allow(unused_mut)] + /// let mut foo: Foo = Foo::new(); /// ``` pub const fn new() -> Foo { Foo { bar: true } @@ -55,26 +55,26 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd /// # Examples /// /// ``` - /// use x::y; + /// use x::y; /// - /// let foo = Foo::new(); + /// let foo = Foo::new(); /// - /// // calls bar on foo - /// assert!(foo.bar()); + /// // calls bar on foo + /// assert!(foo.bar()); /// - /// let bar = foo.bar || Foo::bar; + /// let bar = foo.bar || Foo::bar; /// - /// /* multi-line - /// comment */ + /// /* multi-line + /// comment */ /// - /// let multi_line_string = "Foo - /// bar - /// "; + /// let multi_line_string = "Foo + /// bar + /// "; /// /// ``` /// /// ```rust,no_run - /// let foobar = Foo::new().bar(); + /// let foobar = Foo::new().bar(); /// ``` /// /// ```sh -- cgit v1.2.3 From 66fc084a86e8f5d207d63e33173d1e203cb5ce5e Mon Sep 17 00:00:00 2001 From: Paul Daniel Faria Date: Thu, 18 Jun 2020 09:14:02 -0400 Subject: Remove logic to mark all doctest code as --- crates/ra_ide/src/snapshots/highlight_doctest.html | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'crates/ra_ide/src/snapshots/highlight_doctest.html') diff --git a/crates/ra_ide/src/snapshots/highlight_doctest.html b/crates/ra_ide/src/snapshots/highlight_doctest.html index 106c93077..f1e007b09 100644 --- a/crates/ra_ide/src/snapshots/highlight_doctest.html +++ b/crates/ra_ide/src/snapshots/highlight_doctest.html @@ -43,8 +43,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd /// # Examples /// /// ``` - /// # #![allow(unused_mut)] - /// let mut foo: Foo = Foo::new(); + /// # #![allow(unused_mut)] + /// let mut foo: Foo = Foo::new(); /// ``` pub const fn new() -> Foo { Foo { bar: true } @@ -55,26 +55,26 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd /// # Examples /// /// ``` - /// use x::y; + /// use x::y; /// - /// let foo = Foo::new(); + /// let foo = Foo::new(); /// - /// // calls bar on foo - /// assert!(foo.bar()); + /// // calls bar on foo + /// assert!(foo.bar()); /// - /// let bar = foo.bar || Foo::bar; + /// let bar = foo.bar || Foo::bar; /// - /// /* multi-line - /// comment */ + /// /* multi-line + /// comment */ /// - /// let multi_line_string = "Foo - /// bar - /// "; + /// let multi_line_string = "Foo + /// bar + /// "; /// /// ``` /// /// ```rust,no_run - /// let foobar = Foo::new().bar(); + /// let foobar = Foo::new().bar(); /// ``` /// /// ```sh -- cgit v1.2.3