Skip to content

Native Notes 2.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 16:59
· 6 commits to main since this release

Native Notes 2.4.0

Code highlighting is now built into Native Notes. You can disable the separate Shiki Highlighter plugin and keep highlighted code, filename and terminal frames, Copy controls, and editable Live Preview headers in one plugin.

  • Adds bundled syntax highlighting in rendered blocks and the editor, plus inline code using a prefix such as `{js} const count = 1`.
  • Adds line/text markers, line numbers with configurable starting numbers, wrapping, and collapsible sections through code-fence metadata.
  • Adds a Code blocks settings section. Highlighting and inline highlighting start on; line numbers and wrapping start off; the default frame is Auto. Per-block options override these defaults, and all choices travel in settings profiles.
  • Uses the Native Notes palette and Obsidian's light/dark mode. No separate code-theme selector, custom theme/grammar folders, or runtime downloads are required.
  • Preserves independent filename/language editing, normal undo, viewport position, and static Reading-view headers. Code is displayed, not executed.

The bundled set contains 197 language definitions plus plain text and ANSI output. Thirty-eight upstream languages are excluded because their grammars or dependencies do not have reviewed permissive redistribution notices. Unavailable languages remain readable as plain code. C++, Ruby, Julia, Just, reStructuredText, and Twig remain supported through adapted dependencies; embedded GLSL in C++ raw strings has no separate GLSL highlighting. See the language list and usage guide for supported languages, metadata, and limits.

Turn off Shiki Highlighter before using built-in highlighting to avoid competing renderers. Native Notes does not import or change that plugin's preferences. Existing supported fence metadata can remain in notes. The verified macOS installation preserved the existing Native Notes data.json; Shiki Highlighter's files were retained while its plugin was disabled for the replacement.

Code-block Copy and Profiles → Export → Copy are intentional clipboard writes performed only after the user selects them. Native Notes does not read the clipboard. The capability advisory remains disclosed.

Built with Shiki and Expressive Code, with original package, grammar, and Oniguruma notices preserved in third-party notices and embedded in the distributed main.js. The integration investigation records the inspected Shiki Highlighter 0.7.7 reference and the limits of that evidence.

Validation passes on Node.js 24.22.1: 331 automated tests, lint without errors or warnings, production build, portable packaging, and a full dependency audit with zero reported vulnerabilities. Live macOS Obsidian 1.14.5 checks with Shiki Highlighter disabled verified TypeScript, Python, shell, inline code, line numbers, collapsed sections, and independent filename/language editing with a measured 0px scroll change. Frame defaults and per-block overrides, wrapping, disable/re-enable cleanup, and inline toggles passed without reopening the note or changing its bytes. Full plugin unload removed all owned styles, frames, inline highlighting, and body classes before successful re-enable. Reading-view headers stayed static, including the retained hidden editor. The code prepared for Copy matched the source, including collapsed content; the operating system clipboard was not exercised. See the validation record for exact scope. No native Windows/Linux or physical iPhone/iPad testing is claimed.