reveal-code-focus icon indicating copy to clipboard operation
reveal-code-focus copied to clipboard

line indentations/breaks are somewhat broken for xml elements

Open adroste opened this issue 4 years ago • 2 comments

With plugin:

Screenshot 2019-09-03 at 16 21 20

Without plugin:

Screenshot 2019-09-03 at 16 29 10

adroste avatar Sep 03 '19 14:09 adroste

It might be related, so I post it here. With the current version of reveal.js adding focus library causes the code to be displayed in one line only. Any idea how to solve it?

Without the library: before With the library: after

harnen avatar Feb 26 '20 09:02 harnen

Sorry for the late reply:

@progmem64 not sure what the issue is there, a small repro could be helpful. Are you using tabs or space for indentation? Will try to look into it ASAP.

@harnen: See https://github.com/bnjmnt4n/reveal-code-focus#styling. You need to add some styles since each line of code is converted into a span which are not inline elements, hence the code is merged into one long line. Try the following:

.line { display: block; }
.line.focus { background: yellow; }

bnjmnt4n avatar Apr 08 '20 08:04 bnjmnt4n