Advanced Codeblock

approved

by Lijyze

Add additional features to code blocks.

63 stars17,425 downloadsUpdated 2y agoMIT
View on GitHub

Obsidian Advanced Codeblock

Add additioinal features to code blocks.

Demo

demo

Feature

  1. Add line numbers to code block
  2. Add line highlight to code block

Usage

All features won't apply universally, if you need any feature, you need to correctly specify params to specific code block. Params should be split by ' '.

Featureparamdescription
show line numbersnums
highlight line{a, b-c}brackets matter

Notice

  • Code block won't update in preview mode if you only change params of blocks.

    Obsidian cache every section of artical, but it directly ignore anything follows the first space after ```language. Which means if you only change params of a code block, obsidian will think nothing has been changed, so it won't call any post processor in preview view render process.

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/obsidian-advanced-codeblock/.

Releases

1.1.0

  1. Funcitonalities are available in live-preview mode!

Donating

Buy Me A Coffee

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.