markdown-here icon indicating copy to clipboard operation
markdown-here copied to clipboard

add option to force insert line breaks to highlighting code.

Open dindinw opened this issue 9 years ago • 7 comments

option_highlight_line_break

Add a option which allow force insert <br> into the <pre> of the syntax highlighting code in the case when CSS "write-space:pre" not work. The option is off by default.

screen shot 2016-02-09 at 1 30 45 am

enable the option, let the line breaks work in the case.

after_hightlight_break

dindinw avatar Feb 08 '16 17:02 dindinw

+1

@adam-p And if you want to merge this, I'll add a Chinese translation for this patch.

liudongmiao avatar Mar 17 '16 14:03 liudongmiao

I really think so. +1

concefly avatar Oct 01 '16 03:10 concefly

In what scenario does "write-space:pre" not work? I don't mind adding this, but I need to know why.

adam-p avatar Oct 27 '17 19:10 adam-p

@adam-p originally, the issue I had faced when I tried to use wechat's editor(https://mp.weixin.qq.com/) to publish my articles, which failed to handle the line-breaks of the syntax highlighted code lines. I can't remember the details and reason why"write-space:pre"not work in the case after a long period of time, Sorry for my bad memory. Anyway, force to replace '\n' to <br> fix the issue. hope this helps -Alex

dindinw avatar Oct 31 '17 03:10 dindinw

+1

lonnyzhang423 avatar Nov 06 '17 06:11 lonnyzhang423