Skip to content

Snippet sections in HTML/XML files #2622

Answered by joapuiib
joapuiib asked this question in Q&A
Discussion options

You must be logged in to vote

While I was writing this question, I figured out the solution. I'll post it anyway in case it helps someone.

  • From the docs:

The dashes can be as few as 1 (-8<-) or longer if desired (---8<---------); whatever your preference is. The important thing is that the notation must reside on a line(s) by itself, and the path, must be quoted in the case of the single line notation. If the file name is indented, the content will be indented to that level as well.

<!-- -8<- [start:mockito] -->
<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-junit-jupiter</artifactId>
    <version>5.14.2</version>
    <scope>test</scope>
</dependency>
<!-- -8<- [end:mockito] -->

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@facelessuser
Comment options

@joapuiib
Comment options

Answer selected by joapuiib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants