awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
googlearchive avatar

googlearchive/code-prettifyArchived

0
View on GitHub↗
5,767 星标·885 分支·JavaScript·Apache-2.0·3 次浏览

Code Prettify

Code-prettify 是一个基于浏览器的工具和 HTML 语法高亮器,可为网页上的原始代码块添加视觉格式和行号。它作为一个客户端代码格式化程序和用于定义特定语言高亮规则的可定制词法分析器库。

该系统允许创建自定义词法分析器,为专有或不常见的编程语言提供语法高亮。视觉呈现通过自定义代码样式和集成外部 CSS 样式表来定义颜色和字体进行管理。

该项目为嵌入在 HTML 中的源代码片段提供自动语法高亮和顺序行号。它支持添加自定义语言支持以及技术文档的样式设置。

Features

  • Syntax Highlighting - Adds readable syntax highlighting to source code snippets embedded in HTML pages for better readability.
  • Language Support - Enables the addition of custom lexers to provide syntax highlighting for languages not supported by default.
  • Regex-Based Colorizers - Uses regular expression patterns to identify language tokens and wrap them in HTML spans for styling.
  • Regular Expression Lexer Libraries - Provides a system for defining language-specific rules to highlight syntax using regular expression patterns.
  • Pluggable Lexer Architectures - Provides a pluggable architecture for adding new language definitions via custom tokenization rules.
  • Syntax Highlighters - Applies syntax highlighting to source code snippets embedded in HTML pages via CSS styling.
  • CSS Class-Based - Maps identified syntax tokens to predefined CSS classes to separate highlighting logic from visual presentation.
  • Custom Highlight Rules - Allows the creation of specialized syntax highlighting rules for proprietary or uncommon programming languages.
  • Syntax Highlighting Styles - Defines the visual appearance of highlighted code elements by applying specific CSS classes to marked-up text.
  • Client-Side Code Formatters - Functions as a browser-based tool that adds line numbers and visual formatting to raw code blocks.
  • Code Formatting - Organizes and numbers lines of code within web pages to help users follow complex scripts.
  • Technical Documentation Styling - Improves the visual presentation of code examples in guides and manuals using customizable CSS themes.
  • Code Line Numbering - Calculates line breaks in source text to insert sequential numbering at the start of each code block.
  • Compatible Stylesheets - Integrates external CSS stylesheets to define specific colors, fonts, and print appearances for highlighted code.

Star 历史

googlearchive/code-prettify 的 Star 历史图表googlearchive/code-prettify 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Code Prettify 的开源替代方案

相似的开源项目,按与 Code Prettify 的功能重合度排序。
  • bensadeh/tailspinbensadeh 的头像

    bensadeh/tailspin

    7,875在 GitHub 上查看↗

    Tailspin is a regex-based text colorizer and terminal log viewer designed to transform plain text streams into colorized output. It functions as a command line log highlighter and tailer that applies syntax highlighting to logs using regular expressions. The tool distinguishes itself through its ability to monitor files in real time and pipe live output through a highlighter. It recognizes and colors common data types such as IP addresses, UUIDs, HTTP methods, JSON objects, dates, and memory pointers. Users can define custom highlight styles and regex patterns to assign specific colors to uni

    Rustcczecolorizercolors
    在 GitHub 上查看↗7,875
  • alecthomas/chromaalecthomas 的头像

    alecthomas/chroma

    4,960在 GitHub 上查看↗

    Chroma is a syntax highlighter written in Go that converts raw source code into colorized text or HTML. It identifies programming languages and tokens using language-specific lexers to produce highlighted output for various environments. The project utilizes a theme-driven colorization system that decouples token types from final colors through an intermediate style mapping layer. This allows for custom code theming by mapping specific token categories to foreground and background colors. The system covers language identification, terminal text formatting for ANSI-compatible viewers, and web

    Goconsolegogolang
    在 GitHub 上查看↗4,960
  • conorhastings/react-syntax-highlighterconorhastings 的头像

    conorhastings/react-syntax-highlighter

    4,663在 GitHub 上查看↗

    react-syntax-highlighter is a component for rendering source code with syntax highlighting in React applications. It acts as a wrapper for the PrismJS and Highlight.js engines to provide formatted code display and language-specific colors. The project provides a customizable code block renderer that supports custom DOM injection, line numbering, and inline styling. It allows users to replace default HTML tags with custom React components to control how code is injected into the document object model. The library covers code presentation management through visual themes and line numbering. It

    JavaScript
    在 GitHub 上查看↗4,663
  • zsh-users/zsh-syntax-highlightingzsh-users 的头像

    zsh-users/zsh-syntax-highlighting

    22,737在 GitHub 上查看↗

    zsh-syntax-highlighting is a Zsh shell extension and plugin that provides real-time syntax highlighting and visual feedback. It functions as an interactive command-line visual aid and regular expression text colorizer that distinguishes between commands, string literals, and shell constructs during input. The project allows for extensive customization through user-defined highlight rules, custom regular expression patterns, and predicate logic. It includes specific capabilities for path-based filtering and the assignment of custom colors to text segments. The system provides real-time comman

    Shellscreenshotshellsyntax-highlighting
    在 GitHub 上查看↗22,737
查看 Code Prettify 的所有 30 个替代方案→

常见问题解答

googlearchive/code-prettify 是做什么的?

Code-prettify 是一个基于浏览器的工具和 HTML 语法高亮器,可为网页上的原始代码块添加视觉格式和行号。它作为一个客户端代码格式化程序和用于定义特定语言高亮规则的可定制词法分析器库。

googlearchive/code-prettify 的主要功能有哪些?

googlearchive/code-prettify 的主要功能包括:Syntax Highlighting, Language Support, Regex-Based Colorizers, Regular Expression Lexer Libraries, Pluggable Lexer Architectures, Syntax Highlighters, CSS Class-Based, Custom Highlight Rules。

googlearchive/code-prettify 有哪些开源替代品?

googlearchive/code-prettify 的开源替代品包括: bensadeh/tailspin — Tailspin is a regex-based text colorizer and terminal log viewer designed to transform plain text streams into… alecthomas/chroma — Chroma is a syntax highlighter written in Go that converts raw source code into colorized text or HTML. It identifies… conorhastings/react-syntax-highlighter — react-syntax-highlighter is a component for rendering source code with syntax highlighting in React applications. It… zsh-users/zsh-syntax-highlighting — zsh-syntax-highlighting is a Zsh shell extension and plugin that provides real-time syntax highlighting and visual… prismjs/prism — Prism is a JavaScript syntax highlighter and web-based code formatter. It functions as an extensible syntax engine… syntaxhighlighter/syntaxhighlighter — Syntaxhighlighter is a JavaScript-based frontend library used to render readable source code on web pages. It…