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

reveal.js' stretch class and source/listing blocks doesn't work #195

Closed
rakus opened this issue May 31, 2018 · 5 comments
Closed

reveal.js' stretch class and source/listing blocks doesn't work #195

rakus opened this issue May 31, 2018 · 5 comments

Comments

@rakus
Copy link

rakus commented May 31, 2018

When the stretch class is applied to a source block, the block is not stretched on the slide.

[source,xml, role="stretch"]
----
some xml here
----

From my understanding it seems, that the resulting html is to deeply nested:

<div class="listingblock stretch">
    <div class="content">
        <pre class="highlight">
            <code data-noescape>
                some xml here
            </code>
        </pre>
    </div>
</div>

Removing the two outer <div> results in proper display:

<pre class="highlight stretch">
    <code data-noescape>
        some xml here
    </code>
</pre>

A similar problem was reported for images in #82

@obilodeau obilodeau modified the milestones: 2.1.0, 2.0.0 Nov 7, 2018
@obilodeau
Copy link
Member

I'm going to look at this for the upcoming 2.0 since I'm already going to alter code blocks and I think code blocks are probably why reveal.js (and thus asciidoctor-reveal.js) is so popular compared to powerpoint.

obilodeau added a commit that referenced this issue Nov 14, 2018
Remove div nesting on listingblocks by default (fixes #195)
@refaelsh
Copy link
Contributor

Just wanted to point out that the documentation says to use the stretch thingy like this:

[.stretch]

And @rakus used it differently. What am I missing please?

@obilodeau
Copy link
Member

@refaelsh, roles are an important part of AsciiDoc and they have two syntaxes, a quick one to save typing time and a more verbose one. You can learn more about it here: https://asciidoctor.org/docs/user-manual/#role

@mojavelinux
Copy link
Member

Unless you have really good reason not to, you should always prefer the shorthand syntax (e.g., [.stretch]).

@refaelsh
Copy link
Contributor

I understand. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants