Skip to content
프로젝트

소개

Syntax highlighting for Dart and Flutter

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

highlight.dart

A faithful Dart port of highlight.js — syntax highlighting for 192 languages with 257 themes.

Packages

Package Description
highlight Core Dart package — parsing engine, 192 languages, HTML output
flutter_highlight Flutter widget — HighlightView with 257 themes and line numbers

Quick Start

Dart

import 'package:highlight/highlight.dart';

void main() {
  ensureInitialized();
  final result = hljs.highlight('print("hello")', language: 'python');
  print(result.toHtml());
}

Flutter

import 'package:flutter_highlight/flutter_highlight.dart';
import 'package:flutter_highlight/themes/github.dart';
import 'package:highlight/highlight.dart';

HighlightView(
  sourceCode,
  language: 'python',
  theme: githubTheme,
  showLineNumbers: true,
)

Changelog Generation

This repo uses conventional-commit style subjects, so changelog sections can be generated from git history per package:

dart run tool/generate_changelog.dart \
  --package highlight \
  --version 0.7.1 \
  --from v0.7.0

Add --write to update the package CHANGELOG.md in place:

dart run tool/generate_changelog.dart \
  --package flutter_highlight \
  --version 0.7.1 \
  --from v0.7.0 \
  --write

Pub Score Checks

CI validates the publishable package quality gates with pana plus pub publish --dry-run. Run the same score checks locally with:

dart pub global activate pana 0.23.12
dart run tool/check_pub_score.dart

관련 프로젝트 살펴보기

불러오는 중…