Search packages, repositories and app categories

Package detailsv0.6.0

marker

A renderer (printer) for the markdown library. Renders the parsed AST back into markdown.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
40.4K
Likes
5
Pub points
150

Install package

flutter pub add marker

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Marker is a Flutter/Dart package that renders Markdown by converting a parsed Abstract Syntax Tree (AST) back into Markdown text. It serves as a printer for the markdown library, enabling accurate re-output of structured Markdown content. Designed for developers working with Markdown parsing and transformation, it ensures fidelity when reconstructing Markdown from its AST representation. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it suitable for cross-platform applications.

Use cases

  • Reconstructing Markdown from parsed AST
  • Preserving formatting during Markdown transformations
  • Building Markdown editors with round-trip editing
  • Generating Markdown from structured data
  • Implementing Markdown preview features

Key features

  • Reverses markdown parsing to generate source text
  • Maintains original formatting and structure
  • Cross-platform compatibility
  • Lightweight and focused on rendering
  • Integrates with the markdown package

Suitable for

  • Markdown processing tools
  • Code editors with Markdown support
  • Documentation generators
  • Content management systems
  • Apps requiring bidirectional Markdown handling

Considerations

  • Requires the markdown package for AST input
  • Limited to rendering; not for parsing
  • Not designed for HTML output
  • Best used in conjunction with other Markdown utilities
  • No built-in syntax highlighting

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

marker

Marker is a Markdown renderer (printer) for Dart. It takes a list of Node objects produced by the parser and renders it back to a string.

Supported markdown flavors:

The renderer supports both inline and reference links and images.

Example
import 'dart:io';

import 'package:markdown/markdown.dart';
import 'package:marker/marker.dart';

/// Renders CHANGELOG.md with all links inline
void main() {
  final file = File('CHANGELOG.md');
  /// Contains parsed tree
  final nodes = Document().parseLines(file.readAsLinesSync());
  /// Contains markdown text
  final markdown = render(nodes);
  print(markdown);
}

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.