mdbook-lint-core 0.6.0

Core linting engine for mdbook-lint - library for markdown linting with mdBook support
Documentation

Core linting engine for mdbook-lint

This library provides markdown linting functionality with mdBook support. It includes both standard markdown rules (MD001-MD059) and mdBook-specific rules (MDBOOK001-007).

Basic Usage

use mdbook_lint_core::{create_engine_with_all_rules, Document};
use std::path::PathBuf;

let engine = create_engine_with_all_rules();
let document = Document::new("# Hello".to_string(), PathBuf::from("test.md"))?;
let violations = engine.lint_document(&document)?;
# Ok::<(), Box<dyn std::error::Error>>(())

Custom Rule Sets

use mdbook_lint_core::{PluginRegistry, StandardRuleProvider, MdBookRuleProvider};

let mut registry = PluginRegistry::new();
registry.register_provider(Box::new(StandardRuleProvider))?;
registry.register_provider(Box::new(MdBookRuleProvider))?;
let engine = registry.create_engine()?;
# Ok::<(), Box<dyn std::error::Error>>(())