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 +++++++++++----------- crates/ra_ide/src/syntax_highlighting/injection.rs | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) 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 diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs index dc12c8f5a..415f24a6d 100644 --- a/crates/ra_ide/src/syntax_highlighting/injection.rs +++ b/crates/ra_ide/src/syntax_highlighting/injection.rs @@ -168,7 +168,6 @@ pub(super) fn highlight_doc_comment( h.range.end() + end_offset.unwrap_or(start_offset), ); - h.highlight |= HighlightModifier::Documentation; stack.add(h); } } -- cgit v1.2.3