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

Aggregate from multiple snip labels #22

Merged
merged 3 commits into from
Sep 13, 2016

Conversation

jonas
Copy link
Contributor

@jonas jonas commented Sep 13, 2016

No description provided.

Also adds tests for symbols after snippet markers.
Example:

    @@ snip [Code.scala](../scala/Code.scala) { #imports #functions }

Fixes lightbend#21
@@ -1 +1,3 @@
@@ snip [multiple snippet](../../test/scala/Multiple.scala) { #multiple }

@@ snip [comma separated snippet](../../test/scala/Multiple.scala) { #parseint-imports #parseint-def }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a test for the case that has type=conf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Let me know if you want me to squash it.

@eed3si9n
Copy link
Contributor

Thanks a lot for adding this feature!

@ktoso
Copy link
Contributor

ktoso commented Sep 13, 2016

Thanks a lot for helping out on this front @jonas!

@eed3si9n
Copy link
Contributor

LGTM

@eed3si9n eed3si9n merged commit 8388b80 into lightbend:master Sep 13, 2016
@jonas jonas deleted the 21-support-multiple-snip-sections branch September 13, 2016 19:46
@eed3si9n
Copy link
Contributor

@jonas Do you want me to cut a release out as is, or are you working on more a PR for the other issue?

@jonas
Copy link
Contributor Author

jonas commented Sep 13, 2016

@eed3si9n Two potential things would help a lot converting the Akka HTTP docs to Paradox at this point.

  • Cross-references which automatically show the titles being linked to. Right now the @ref[] directive requires the link text. It would be nice to support something like @ref[title-anchor] but this might be a lot of work since there would have to be some @anchor[title-anchor] etc.
  • Allow custom start/end delimiters or regexes for snippets. This will help a lot with extracting the API for the many directives. This is currently handled by includecode2 which supports def and val. Note this might be all moot since I think there's a long-term goal to move more of the directive documentation to java/scala doc AFAIK (see Create @example "include" pre-processor feature for java/scala-doc akka/akka-http#11)

The first one can be considered nice-to-have and might even be out of scope for Paradox, however, the latter would remove the need to mess up the API code with lots of markers or extract the snippets via an SBT task before running Paradox.

@eed3si9n
Copy link
Contributor

@jonas Could you open new Github issues to discuss them?

@jonas
Copy link
Contributor Author

jonas commented Sep 14, 2016

@eed3si9n Opened related tickets. When you have time please cut a release so this won't block akka/akka-http#1

@eed3si9n eed3si9n changed the title Aggregate from multiple snip sections Aggregate from multiple snip labels Sep 14, 2016
@eed3si9n
Copy link
Contributor

@jonas Paradox 0.2.2 is pushed to Sonatype on its way to Maven Central.
https://oss.sonatype.org/content/repositories/public/com/lightbend/paradox/paradox_2.10/

jonas added a commit to jonas/sphinx2paradox that referenced this pull request Sep 15, 2016
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.

3 participants