Skip to main content

opens_with_banner

Function opens_with_banner 

Source
pub fn opens_with_banner(content: &str, banner: &str) -> bool
Expand description

Does the content open with banner, allowing for a first line the format reserves?

Usually the banner is the first thing in the file. Two artifacts cannot put it there, and neither is cutting a corner: an executable script must open with its #! line or the kernel will not run it, and a Markdown page the site projects must open with its own title, because the projection strips a document’s first heading and a banner above it would leave the page with none. Both carry the banner on the line after, which is still the opening of the file and still impossible to miss. Anything further down is a banner a reader scrolls past, and is refused.