aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorPaul Daniel Faria <[email protected]>2020-06-18 14:14:02 +0100
committerPaul Daniel Faria <[email protected]>2020-06-18 14:14:02 +0100
commit66fc084a86e8f5d207d63e33173d1e203cb5ce5e (patch)
tree2ec2cc04cc2d333e465623bc466a69bffca483eb /crates/ra_ide/src
parenta951108173349f9ff0b9936ec2af8881fd92fc98 (diff)
Remove logic to mark all doctest code as
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/snapshots/highlight_doctest.html26
-rw-r--r--crates/ra_ide/src/syntax_highlighting/injection.rs1
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
43 <span class="comment documentation">/// # Examples</span> 43 <span class="comment documentation">/// # Examples</span>
44 <span class="comment documentation">///</span> 44 <span class="comment documentation">///</span>
45 <span class="comment documentation">/// ```</span> 45 <span class="comment documentation">/// ```</span>
46 <span class="comment documentation">/// #</span> <span class="attribute documentation">#![</span><span class="function attribute documentation">allow</span><span class="attribute documentation">(unused_mut)]</span> 46 <span class="comment documentation">/// #</span> <span class="attribute">#![</span><span class="function attribute">allow</span><span class="attribute">(unused_mut)]</span>
47 <span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="keyword documentation">mut</span> <span class="variable declaration documentation mutable">foo</span>: <span class="struct documentation">Foo</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>(); 47 <span class="comment documentation">/// </span><span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">foo</span>: <span class="struct">Foo</span> = <span class="struct">Foo</span>::<span class="function">new</span>();
48 <span class="comment documentation">/// ```</span> 48 <span class="comment documentation">/// ```</span>
49 <span class="keyword">pub</span> <span class="keyword">const</span> <span class="keyword">fn</span> <span class="function declaration">new</span>() -&gt; <span class="struct">Foo</span> { 49 <span class="keyword">pub</span> <span class="keyword">const</span> <span class="keyword">fn</span> <span class="function declaration">new</span>() -&gt; <span class="struct">Foo</span> {
50 <span class="struct">Foo</span> { <span class="field">bar</span>: <span class="bool_literal">true</span> } 50 <span class="struct">Foo</span> { <span class="field">bar</span>: <span class="bool_literal">true</span> }
@@ -55,26 +55,26 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
55 <span class="comment documentation">/// # Examples</span> 55 <span class="comment documentation">/// # Examples</span>
56 <span class="comment documentation">///</span> 56 <span class="comment documentation">///</span>
57 <span class="comment documentation">/// ```</span> 57 <span class="comment documentation">/// ```</span>
58 <span class="comment documentation">/// </span><span class="keyword documentation">use</span> <span class="module documentation">x</span>::<span class="module documentation">y</span>; 58 <span class="comment documentation">/// </span><span class="keyword">use</span> <span class="module">x</span>::<span class="module">y</span>;
59 <span class="comment documentation">///</span> 59 <span class="comment documentation">///</span>
60 <span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">foo</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>(); 60 <span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">foo</span> = <span class="struct">Foo</span>::<span class="function">new</span>();
61 <span class="comment documentation">///</span> 61 <span class="comment documentation">///</span>
62 <span class="comment documentation">/// </span><span class="comment documentation">// calls bar on foo</span> 62 <span class="comment documentation">/// </span><span class="comment">// calls bar on foo</span>
63 <span class="comment documentation">/// </span><span class="macro documentation">assert!</span>(foo.bar()); 63 <span class="comment documentation">/// </span><span class="macro">assert!</span>(foo.bar());
64 <span class="comment documentation">///</span> 64 <span class="comment documentation">///</span>
65 <span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">bar</span> = <span class="variable documentation">foo</span>.<span class="field documentation">bar</span> || <span class="struct documentation">Foo</span>::<span class="constant documentation">bar</span>; 65 <span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">bar</span> = <span class="variable">foo</span>.<span class="field">bar</span> || <span class="struct">Foo</span>::<span class="constant">bar</span>;
66 <span class="comment documentation">///</span> 66 <span class="comment documentation">///</span>
67 <span class="comment documentation">/// </span><span class="comment documentation">/* multi-line 67 <span class="comment documentation">/// </span><span class="comment">/* multi-line
68 </span><span class="comment documentation">/// </span><span class="comment documentation"> comment */</span> 68 </span><span class="comment documentation">/// </span><span class="comment"> comment */</span>
69 <span class="comment documentation">///</span> 69 <span class="comment documentation">///</span>
70 <span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">multi_line_string</span> = <span class="string_literal documentation">"Foo 70 <span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">multi_line_string</span> = <span class="string_literal">"Foo
71 </span><span class="comment documentation">/// </span><span class="string_literal documentation"> bar 71 </span><span class="comment documentation">/// </span><span class="string_literal"> bar
72 </span><span class="comment documentation">/// </span><span class="string_literal documentation"> "</span>; 72 </span><span class="comment documentation">/// </span><span class="string_literal"> "</span>;
73 <span class="comment documentation">///</span> 73 <span class="comment documentation">///</span>
74 <span class="comment documentation">/// ```</span> 74 <span class="comment documentation">/// ```</span>
75 <span class="comment documentation">///</span> 75 <span class="comment documentation">///</span>
76 <span class="comment documentation">/// ```rust,no_run</span> 76 <span class="comment documentation">/// ```rust,no_run</span>
77 <span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">foobar</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>().<span class="function documentation">bar</span>(); 77 <span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">foobar</span> = <span class="struct">Foo</span>::<span class="function">new</span>().<span class="function">bar</span>();
78 <span class="comment documentation">/// ```</span> 78 <span class="comment documentation">/// ```</span>
79 <span class="comment documentation">///</span> 79 <span class="comment documentation">///</span>
80 <span class="comment documentation">/// ```sh</span> 80 <span class="comment documentation">/// ```sh</span>
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(
168 h.range.end() + end_offset.unwrap_or(start_offset), 168 h.range.end() + end_offset.unwrap_or(start_offset),
169 ); 169 );
170 170
171 h.highlight |= HighlightModifier::Documentation;
172 stack.add(h); 171 stack.add(h);
173 } 172 }
174 } 173 }