Skip to content

A syntax highlighting library written in Dart, ported from PrismJS

License

Notifications You must be signed in to change notification settings

tagnote-app/dart_prism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Usage

import 'package:dart_prism/dart_prism.dart';

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

  // Parse text to AST nodes.
  final nodes = prism.parse('const name = "dart"', 'dart');

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

  print(html);
}

Development Tips

Update language proto files

./tool/update_languages.sh

Test coverage and update the per-test results

Updating test cases and stats when changing the implementation:

dart tool/update_test_files.dart

It will update the test case files and output the test summary to test_cases_stats.txt.

About

A syntax highlighting library written in Dart, ported from PrismJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published