惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
小众软件
小众软件
博客园 - 叶小钗
宝玉的分享
宝玉的分享
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
U
Unit 42
F
Fortinet All Blogs
IT之家
IT之家
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell

tanscp

科学驾驭你的身体电量 (Body Battery) - tanscp 通俗易懂的解释什么是Agent - tanscp i18n in a Static Next.js Blog: Client-Side Toggle vs URL-Based Routing Multimedia Showcase: Video, Podcasts & Embeds Syntax Highlighting Mathematical Notation Visuals and Diagrams System Architecture 101 Syntax Highlighting Showcase 中文测试文章 Part 2: Routing Mastery Part 1: Getting Started with Next.js 15 多语言测试并且要测试以下超长的标题看如何处理,如果太长的话要考虑方案: Amytis Digital Garden The Kitchen Sink: Comprehensive Feature Test Mac 菜单栏武装计划:10 款免费开源的宝藏 App 推荐 Markdown Features Test Nested Image Test Legacy Markdown Support Asynchronous JavaScript QuickSort: An Algorithmic Deep Dive README Index Post Deeper Notes 在一个被屏幕和算法全面包围的时代,我们正逐渐失去对“注意力”的主权 - tanscp AI 是如何识别一只猫的?——图解神经网络的秘密 - tanscp 什么是真正的自我?它真的存在吗? - tanscp AI洞察从你的笔记中读出了什么? - tanscp 我尝试空腹有氧一个月后 - tanscp ISSUE 026 | 数独事件 - tanscp ISSUE 025|你喜欢哪个版本的自己? - tanscp ISSUE 024|认知失调 - tanscp
Code Block Features Showcase
Amytis Team · 2026-05-25 · via tanscp

The default Shiki pipeline applies build-time syntax highlighting with a dual github-light / github-dark theme. The features below are opt-in via fence metadata.

Title bar

Line numbers

Highlighted lines

Title + line numbers + highlights combined

Diff with red/green backgrounds

Word-wrap toggle

Long lines in code blocks overflow horizontally by default — the block grows a scrollbar at the bottom. Click the Wrap button in any block's header to soft-wrap long lines onto multiple visual lines instead; click again to restore horizontal scrolling.

Try the Wrap button in the header above ↑ to see the long line collapse into multiple soft-wrapped lines.

Mermaid still works (regression check)

Tabbed code groups

Group adjacent fences into a single tabbed widget by wrapping them in a :::code-group container directive. Tab names come from the [label] token after the language. The mechanism is pure CSS (radio inputs + sibling selectors) — zero JavaScript, zero hydration cost.

When a tab label matches a known package manager, language, or common config filename, an icon appears automatically before the label. Resolution is handled by resolveCodeGroupIcon in src/lib/code-group-icons.ts.

Filename labels also resolve — e.g. tsconfig.json, vite.config.ts, or Dockerfile:

tsconfig.jsonvite.config.tsDockerfile

Tabs work across languages too — handy for showing the same algorithm in multiple implementations:

Annotate individual lines with // [!code …] comments. Six markers are supported — focus, diff, highlight, error, warning — using the language's native comment style (// in C-family, # in Python, -- in SQL, etc.):

// [!code focus] dims the rest of the block so the focused subset stands out; hover the block to reveal the dimmed lines. // [!code error] / [!code warning] tint the line with a colored left-border (red / amber). [!code ++] / [!code --] color individual lines without needing a diff-language fence.

Notation comments work in any language — Python:

GitHub-flavored alerts

Add a [!TYPE] marker on the first line of a blockquote to render it as a GitHub-style callout. Five types are supported, each with its own color, icon, and label:

rST equivalents (.. note:: / .. tip:: / .. important:: / .. warning:: / .. caution::) render with matching colors via docutils' admonition directives — same visual treatment across both pipelines.

Explicit plaintext