typora-issues
typora-issues copied to clipboard
Feature Request: Highlight specific lines and/or line ranges
Hello, Thanks for such a great app. Typora is at the core of my daily workflow and I love it. I author md files that I pass to websites I have built or to an ebook authoring app. In both cases the md files are parsed and the code blocks are highlighted using prism.js
Prism has a feature called: Highlight specific lines and/or line ranges .
I can indicate which lines in a code block I want the reader to focus attention on by appending the lines the language specifier in the code block in the md file, for example...
```javascript{12-43}
wraps the lines 12 to 43 in a class I use to focus the reader on those lines within a code block
This will ensure that those lines get wrapped in a class that I can target with css to call them out to the readers attention.
Unfortunately this breaks the code highlighting in Typora...
If anything is appended to the language type specifier for the code block like {1, 25-27}
Typora doesn't highlight the entire code block..
Can you implement this in Typora... Or, can you allow this kind of line specification in curly braces to follow the language specification for code blocks without breaking Typora highlighting?
Thanks, Smerth
I think this is what I am looking for also. If we can highlight in code fence that will be perfect
Just started using Typora and this is also the first thing I was searching for.
Hi, this is something I am also looking for. Would be great to be able to highlight text within a code block. Thanks
I look forward to it. I am using the prism highlighter with line highlight. If the typora has this feature, it would be great!!
I'd also find the ability to highlight within code fences very useful.
Just started using Typora, and it was the first feature I looked for. That would be great if you add it sooner.
If we can mark some code pieces in code fence. That will be a great feature !
Vote for this. Atom's Markdown Preview Enhanced has these feature supported.
```gas {.line-numbers, highlight=4}
targetFunc:
stmdb sp!, {r4-r12, lr}
sub sp, sp, #0x20
add r1, sp, #4
str r1, [sp, #8]
ldr r3, [sp, #8]
ldr r4, [sp, #0xc]
add sp, sp, #0x20
ldmia sp!, {r4-r12, pc}
Which yields the following result.
Hope Typora can have this feature in the future.
I'ld love this feature too. In my case to highlight the comments inside the code because I use typora to take notes and document my projects.
This is a very useful feature for documentation in markdown, please can you work on it 🙏
Please integrate syntax highlighter such as shiki or prism
我也希望有这个功能,这个功能非常有用!
It would be so so great if you could integrate this feature, it is incredibly useful.
Please add the Highlight specific lines and/or line ranges to the next release
Hope can be integrated shiki inside, for editing code documentation has a lot of help