]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/highlight.rs
Inline CSS background images directly into the CSS
[rust.git] / src / librustdoc / html / highlight.rs
index 8a9e6caf611bad111308874cd8bd3d7685cb130d..1644d1c5a29a78e561f2da29c5fa1004e9e93aec 100644 (file)
@@ -58,11 +58,11 @@ pub(crate) fn render_example_with_highlighting(
     write_footer(out, playground_button);
 }
 
-/// Highlights `src` as a macro, returning the HTML output.
-pub(crate) fn render_macro_with_highlighting(src: &str, out: &mut Buffer) {
-    write_header(out, "macro", None, Tooltip::None);
+/// Highlights `src` as an item-decl, returning the HTML output.
+pub(crate) fn render_item_decl_with_highlighting(src: &str, out: &mut Buffer) {
+    write!(out, "<pre class=\"rust item-decl\">");
     write_code(out, src, None, None);
-    write_footer(out, None);
+    write!(out, "</pre>");
 }
 
 /// Highlights `src` as a source code page, returning the HTML output.