notable / notable

The Markdown-based note-taking app that doesn't suck.
https://notable.app
22.54k stars 1.14k forks source link

Code block line numbers #493

Open CavalloneChen opened 5 years ago

CavalloneChen commented 5 years ago

Feature description

Add option to enable line numbers in code blocks.

Feature motivation

Helps to refer to certain lines.

fabiospampinato commented 5 years ago

Would you like them in preview mode, edit mode, or both?

CavalloneChen commented 5 years ago

IMHO just display them in preview mode is a good option.

fabiospampinato commented 5 years ago

It looks like there's a plugin for our highlighter for adding line numbers, but maybe it would be better to just render a read-only editor in place of those codeblocks, so that also the highlighting would be perfectly consistent between preview and edit mode #167. 🤔

fabiospampinato commented 5 years ago

Closing this in favor of https://github.com/notable/notable/issues/719

fabiospampinato commented 5 years ago

I'm reopening this has now code blocks are rendered via Monaco, but not by embedding a whole editor for each code block, which wouldn't have been great for performance.

skostojohn commented 4 years ago

I agree that this would be a valuable feature. Thanks Scott

exislow commented 4 years ago

+1 please implement this.