dart_prism 0.2.1 copy "dart_prism: ^0.2.1" to clipboard
dart_prism: ^0.2.1 copied to clipboard

A syntax highlighting library written in Dart, ported from PrismJS.

example/dart_prism_example.dart

import 'package:dart_prism/dart_prism.dart';

void main() {
  final prism = Prism();

  // Output a series of AST nodes.
  final nodes = prism.parse('const name = "dart"', 'dart');

  // Output an HTML string.
  final html = nodes.toHtml();

  print(html);
}
2
likes
160
pub points
7%
popularity

Publisher

verified publishertagnote.app

A syntax highlighting library written in Dart, ported from PrismJS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on dart_prism