1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! AST transformation and manipulation utilities
//!
//! This module provides a comprehensive set of tools for transforming and querying Markdown AST:
//! - Visitor pattern for read-only traversal
//! - Transformer pattern for AST modifications
//! - Query API for finding elements by conditions
//! - Convenience methods for common transformations
//! - Pipeline builder for composing complex transformations
//!
//! # Examples
//!
//! ```rust
//! use markdown_ppp::ast::*;
//! use markdown_ppp::ast_transform::*;
//!
//! // Create a simple document
//! let doc = Document {
//! blocks: vec![
//! Block::Paragraph(vec![
//! Inline::Text("hello world".to_string()),
//! ]),
//! ],
//! };
//!
//! // Transform all text to uppercase
//! let doc = doc.transform_text(|text| text.to_uppercase());
//!
//! // Find all autolinks (in a document that has them)
//! let autolinks = doc.find_all_inlines(|inline| {
//! matches!(inline, Inline::Autolink(_))
//! });
//!
//! // Complex pipeline
//! let result = TransformPipeline::new()
//! .transform_text(|s| s.trim().to_string())
//! .transform_image_urls(|url| format!("https://cdn.example.com{}", url))
//! .apply(doc);
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;