mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
fix: Fix outline modules spilling inner doc injections into their parent
This commit is contained in:
parent
47591f0fb2
commit
b32f611b6e
3 changed files with 40 additions and 5 deletions
|
@ -641,11 +641,14 @@ fn main() {
|
|||
fn test_highlight_doc_comment() {
|
||||
check_highlighting(
|
||||
r#"
|
||||
//- /main.rs
|
||||
//! This is a module to test doc injection.
|
||||
//! ```
|
||||
//! fn test() {}
|
||||
//! ```
|
||||
|
||||
mod outline_module;
|
||||
|
||||
/// ```
|
||||
/// let _ = "early doctests should not go boom";
|
||||
/// ```
|
||||
|
@ -771,6 +774,13 @@ pub fn block_comments() {}
|
|||
[`block_comments`] tests these without indentation
|
||||
*/
|
||||
pub fn block_comments2() {}
|
||||
|
||||
//- /outline_module.rs
|
||||
//! This is an outline module whose purpose is to test that its inline attribute injection does not
|
||||
//! spill into its parent.
|
||||
//! ```
|
||||
//! fn test() {}
|
||||
//! ```
|
||||
"#
|
||||
.trim(),
|
||||
expect_file!["./test_data/highlight_doctest.html"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue