Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding line numbers to Highlight.js makes it trigger scrolling area #331

Closed
obilodeau opened this issue Feb 10, 2020 · 1 comment
Closed
Labels
Milestone

Comments

@obilodeau
Copy link
Member

Even though it would fit in the slide.

With line numbers:

arjs-hls-ugly

Without line numbers:

arjs-hls-pretty

It's caused by the use of tables in the "ugly" version. I'm going to try to tweak things until it looks like the pretty version.

Source:

= Highlight.js Linenums issue
:source-highlighter: highlight.js
:highlightjs-languages: x86asm
:icons: font
:customcss: col2.css
:revealjs_center: false
:revealjs_height: 1080
:revealjs_width: 1920

== ASM from Compiler (Pretty)

[source.col2,x86asm]
----
main        proc near
var_10      = dword ptr -10h
            push ebp                      <1>
            mov ebp, esp
            and esp, 0FFFFFFF0h
            sub esp, 10h
            mov eax, offset aHelloWorld   <2>
            mov [esp+10h+var_10], eax
            call _printf
            mov eax, 0                    <3>
            leave                         <4>
            retn
main        endp
----
[.col2]
--
<1> Function prologue
<2> Preparing arguments and calling `printf`
<3> Clean-up registers
<4> Function epilogue
--

== ASM from Compiler (Ugly)

[source.col2,x86asm,highlight="3..6|7..9|10|11,12"]
----
main        proc near
var_10      = dword ptr -10h
            push ebp                      <1>
            mov ebp, esp
            and esp, 0FFFFFFF0h
            sub esp, 10h
            mov eax, offset aHelloWorld   <2>
            mov [esp+10h+var_10], eax
            call _printf
            mov eax, 0                    <3>
            leave                         <4>
            retn
main        endp
----
[.col2]
--
<1> Function prologue
<2> Preparing arguments and calling `printf`
<3> Clean-up registers
<4> Function epilogue
--

col2.css:

.col2 {
  width:48% !important;
  margin: 0 1% !important;
  float:left;
}
.reveal .col2 ol, .reveal .col2  dl, .reveal .col2  ul {
    display:table;
}
@obilodeau obilodeau added this to the 4.0.0 milestone Feb 10, 2020
obilodeau added a commit to obilodeau/asciidoctor-reveal.js that referenced this issue Feb 11, 2020
@obilodeau
Copy link
Member Author

Tentative fix in #334

obilodeau added a commit that referenced this issue Feb 14, 2020
Cancel Asciidoctor line-height in highlight.js table (fixes #331)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant