Docs.stripmd() question

I’m trying to use the @doc macro to extract help text in a certain form, close to what Docs.stripmd() does. For example, “@doc strip”. The issue is, what modification do I need to make to stripmd() to make it preserve newlines?

I tried

Docs.stripmd(x::Markdown.LineBreak) = println()

but it doesn’t work in the “@doc strip” example.

How about Docs.stripmd(x::Markdown.LineBreak) = "\n"

Same behavior, newlines are still stripped.