Skip to main content

text_comment_opening

Function text_comment_opening 

Source
pub fn text_comment_opening(path: &str) -> &'static str
Expand description

The comment form a line-oriented text artifact opens its banner with, by suffix. A stylesheet or a script cannot start with #; an SVG is XML.

use majordomus_cli::generate::text_comment_opening;
assert_eq!(text_comment_opening("share/design/theme.css"), "/*");
assert_eq!(text_comment_opening("share/cockpit/favicon.svg"), "<!--");
assert_eq!(text_comment_opening("share/allow/policy.txt"), "#");