Skip to content

v2.3.0

Latest

Choose a tag to compare

@ProfPowell ProfPowell released this 19 Jan 22:50
· 3 commits to main since this release

What's New

Focus Mode

  • New focus-mode attribute dims non-highlighted lines to draw attention to specific code
  • Customizable with --cb-focus-dim-opacity and --cb-focus-blur CSS custom properties
  • Works in combination with highlight-lines attribute

Expanded Language Support

  • Added Python syntax highlighting
  • Added TypeScript syntax highlighting
  • Added Bash/Shell syntax highlighting

Testing

  • Comprehensive unit test suite with 41 tests covering all features
  • Tests for: basic functionality, line numbers, highlighting, focus mode, themes, collapsible blocks, downloads, sharing, diff support, code-block-group, and more

Documentation

  • Updated demos page with Focus Mode examples
  • Side-by-side comparisons showing Focus Mode effect
  • All language examples working correctly

Installation

```bash
npm install @profpowell/code-block
```

Or via CDN:
```html

<script type="module" src="https://unpkg.com/@profpowell/code-block"></script>

```