Skip to content
pubscout

marker

0.6.0, released 3 years ago by karapetov.com

Renders a markdown AST back to markdown string

WASM-ready
$ flutter pub add marker
Source repository

What it does

Marker takes a list of markdown AST nodes and converts them back into a markdown string. It supports multiple markdown flavors and handles inline and reference links and images.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to regenerate markdown from a parsed AST
  • You want to customize or post-process markdown output
  • You are working with the markdown package and need a reverse renderer

Skip it when

  • You need to render markdown to HTML or other formats
  • You are building a UI widget that displays markdown

Strengths

  • Supports original, changelog, and custom markdown flavors
  • Handles inline and reference links and images
  • Fully null‑safe and compatible with Dart 3
  • No build_runner or code generation required

Weaknesses

  • Only renders to markdown, not to HTML or other formats
  • No UI components or styling
  • Limited to the markdown package AST

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'dart:io';
import 'package:markdown/markdown.dart';
import 'package:marker/marker.dart';

void main() {
  final file = File('CHANGELOG.md');
  final nodes = Document().parseLines(file.readAsLinesSync());
  final markdown = render(nodes);
  print(markdown);
}

Alternatives

Packages that do the same job and could replace marker.

  • dart_markdown

    A portable Markdown library written in Dart that parses Markdown into AST and HTML.

Works with

Packages commonly used together with marker: ones it builds on, ones built on it, and its own family.