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

@@snip: support multiple sections #21

Closed
jonas opened this issue Sep 12, 2016 · 4 comments
Closed

@@snip: support multiple sections #21

jonas opened this issue Sep 12, 2016 · 4 comments

Comments

@jonas
Copy link
Contributor

jonas commented Sep 12, 2016

In the Akka docs a lot of snippets refer to multiple sections, e.g. to list imports along with the code, either using multiple labels:

.. includecode:: code/docs/actorlambda/MyActor.java
   :include: imports,my-actor

or by using the same label multiple times:

//#example
import a.A
//#example

object B {
  //#example
  def b(a: A): Int = ???
  //#example
}

For akka/akka-http#1, the second case is more important and currently causes a block not closed error.

@ktoso
Copy link
Contributor

ktoso commented Sep 12, 2016

Hey @dwijnand @eed3si9n @pvlugter,
do you think you could help us out on this one?

We've spread crazy thin the next 3 weeks and this would be something that would allow us to release the first stable Akka HTTP with paradox docs right away.

(Trying to understand if we need to somehow make time to implement this or if we can count on help while adopting paradox).

@jonas
Copy link
Contributor Author

jonas commented Sep 13, 2016

OK, the second case actually works. The error was caused by space between the marker symbol and the label:

-    //# path-dsl
+    //#path-dsl

@ktoso
Copy link
Contributor

ktoso commented Sep 13, 2016

Uff, very glad about that :)
We use that a lot, so perhaps we're all good here?

@jonas
Copy link
Contributor Author

jonas commented Sep 13, 2016

I've only managed to convert the includecode directives. Will wait to see how conversion ofincludecode2 goes.

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

No branches or pull requests

3 participants