2024-02-06 10:22:24 -07:00
// ignore-tidy-linelength
#![ crate_name = " foo " ]
#![ feature(lazy_type_alias) ]
#![ allow(incomplete_features) ]
2024-07-22 12:59:34 -07:00
//! # Basic [link](https://example.com) and *emphasis* and `code`
2024-02-06 10:22:24 -07:00
//!
//! This test case covers TOC entries with rich text inside.
//! Rustdoc normally supports headers with links, but for the
//! TOC, that would break the layout.
//!
//! For consistency, emphasis is also filtered out.
2024-07-22 12:59:34 -07:00
//@ has foo/index.html
2024-02-06 10:22:24 -07:00
// User header
2024-07-22 12:59:34 -07:00
//@ has - '//section[@id="TOC"]/h3' 'Sections'
//@ has - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]/@title' 'Basic link and emphasis and `code`'
//@ has - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]' 'Basic link and emphasis and code'
//@ count - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]/em' 0
//@ count - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]/a' 0
//@ count - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]/code' 1
//@ has - '//section[@id="TOC"]/ul[@class="block top-toc"]/li/a[@href="#basic-link-and-emphasis-and-code"]/code' 'code'