dart_prism 0.1.0+1 copy "dart_prism: ^0.1.0+1" to clipboard
dart_prism: ^0.1.0+1 copied to clipboard

outdated

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
0
pub points
7%
popularity

Publisher

verified publishertagnote.app

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

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dart_prism