@@ -67,6 +67,7 @@ case class PreparsedComment(
67
67
hideImplicitConversions : List [String ],
68
68
shortDescription : List [String ],
69
69
syntax : List [String ],
70
+ strippedLinesBeforeNo : Int ,
70
71
)
71
72
72
73
case class DokkaCommentBody (summary : Option [DocPart ], body : DocPart )
@@ -78,7 +79,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
78
79
protected def markupToDokkaCommentBody (t : T ): DokkaCommentBody
79
80
protected def filterEmpty (xs : List [String ]): List [T ]
80
81
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
82
83
83
84
lazy val snippetChecker = dctx.snippetChecker
84
85
@@ -141,7 +142,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
141
142
142
143
final def parse (preparsed : PreparsedComment ): Comment =
143
144
val markup = stringToMarkup(preparsed.body)
144
- val body = markupToDokkaCommentBody(processSnippets(markup))
145
+ val body = markupToDokkaCommentBody(processSnippets(markup, preparsed ))
145
146
Comment (
146
147
body = body.body,
147
148
short = body.summary,
@@ -193,8 +194,8 @@ class MarkdownCommentParser(repr: Repr)(using dctx: DocContext)
193
194
.filterNot { case (_, v) => v.isEmpty }
194
195
.mapValues(stringToMarkup).to(SortedMap )
195
196
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 )
198
199
}
199
200
200
201
class WikiCommentParser (repr : Repr )(using DocContext )
@@ -249,6 +250,6 @@ class WikiCommentParser(repr: Repr)(using DocContext)
249
250
xs.view.mapValues(stringToMarkup).to(SortedMap )
250
251
.filterNot { case (_, v) => v.blocks.isEmpty }
251
252
252
- def processSnippets (root : wiki.Body ): wiki.Body =
253
+ def processSnippets (root : wiki.Body , preparsed : PreparsedComment ): wiki.Body =
253
254
// Currently not supported
254
255
root
0 commit comments