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

Allow adding classes to snippets #189

Merged
merged 1 commit into from
Feb 13, 2018
Merged

Allow adding classes to snippets #189

merged 1 commit into from
Feb 13, 2018

Conversation

raboof
Copy link
Contributor

@raboof raboof commented Feb 7, 2018

No description provided.

|</div>""")
|@@snip[example2.java](core/src/test/scala/com/lightbend/paradox/markdown/example2.java){ #example2 .red .blue }
|""") shouldEqual html("""
|<pre class="prettyprint red blue">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to also propagate the id for completeness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The confusing thing is the id is already also used to select the part of the file that needs to be included in the snippet. Would it make sense to also put it on the enclosing pre as id?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, true. Didn't think about that. It could make sense, but on the other hand it is not necessarily unique in the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, probably safer to leave it be indeed

Copy link
Member

@pvlugter pvlugter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raboof raboof merged commit 58cf5d4 into master Feb 13, 2018
@raboof raboof deleted the snippetClasses branch February 13, 2018 12:50
@2m 2m added this to the 0.3.4 milestone Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants