Creates a new MarkdownTransformer with optional configuration.
Optionaloptions: MarkdownTransformerOptionsTransformation options
Transforms raw Hashnode markdown into cleaned markdown.
Preserves valid markdown syntax including:
Raw markdown content from Hashnode export
Cleaned markdown with Hashnode-specific quirks removed
const transformer = new MarkdownTransformer();
// Remove align attributes
transformer.transform(' align="center"');
// Returns: ''
// Preserves valid markdown
transformer.transform('The "Start in" field—essentially the default path');
// Returns: 'The "Start in" field—essentially the default path'
Transforms Hashnode-specific markdown into clean, standard markdown.
Based on analysis of 48 real Hashnode blog posts, this processor removes the align attributes that Hashnode adds to images. Optional transformations for callouts and whitespace are available but not enabled by default.
Remarks
This processor preserves valid markdown syntax including:
Example
Example