@@ -67,6 +67,7 @@ case class PreparsedComment(
6767 hideImplicitConversions : List [String ],
6868 shortDescription : List [String ],
6969 syntax : List [String ],
70+ strippedLinesBeforeNo : Int ,
7071)
7172
7273case class DokkaCommentBody (summary : Option [DocPart ], body : DocPart )
@@ -78,7 +79,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
7879 protected def markupToDokkaCommentBody (t : T ): DokkaCommentBody
7980 protected def filterEmpty (xs : List [String ]): List [T ]
8081 protected def filterEmpty (xs : SortedMap [String , String ]): SortedMap [String , T ]
81- protected def processSnippets (t : T ): T
82+ protected def processSnippets (t : T , preparsed : PreparsedComment ): T
8283
8384 lazy val snippetChecker = dctx.snippetChecker
8485
@@ -141,7 +142,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
141142
142143 final def parse (preparsed : PreparsedComment ): Comment =
143144 val markup = stringToMarkup(preparsed.body)
144- val body = markupToDokkaCommentBody(processSnippets(markup))
145+ val body = markupToDokkaCommentBody(processSnippets(markup, preparsed ))
145146 Comment (
146147 body = body.body,
147148 short = body.summary,
@@ -193,8 +194,8 @@ class MarkdownCommentParser(repr: Repr)(using dctx: DocContext)
193194 .filterNot { case (_, v) => v.isEmpty }
194195 .mapValues(stringToMarkup).to(SortedMap )
195196
196- def processSnippets (root : mdu.Node ): mdu.Node =
197- FlexmarkSnippetProcessor .processSnippets(root, snippetCheckingFunc(owner), withContext = true )
197+ def processSnippets (root : mdu.Node , preparsed : PreparsedComment ): mdu.Node =
198+ FlexmarkSnippetProcessor .processSnippets(root, Some (preparsed), snippetCheckingFunc(owner), withContext = true )
198199}
199200
200201class WikiCommentParser (repr : Repr )(using DocContext )
@@ -249,6 +250,6 @@ class WikiCommentParser(repr: Repr)(using DocContext)
249250 xs.view.mapValues(stringToMarkup).to(SortedMap )
250251 .filterNot { case (_, v) => v.blocks.isEmpty }
251252
252- def processSnippets (root : wiki.Body ): wiki.Body =
253+ def processSnippets (root : wiki.Body , preparsed : PreparsedComment ): wiki.Body =
253254 // Currently not supported
254255 root
0 commit comments