pub fn lint_for(raw: &str, filename_or_ext: &str) -> LintResult
Expand description

Lint a file content with filetype.

Example:

let raw = r#"
<article>
  <h1>这是 Heading 标题</h1>
  <div class="content">
    <p>你好 Rust 世界<strong>Bold 文本</strong></p>
    <p>这是第二行 p 标签</p>
  </div>
</article>
"#;
autocorrect::lint_for(raw, "html");
autocorrect::lint_for(raw, "index.html");