2

When I put some text in markdown, by default it is wrapped inside paragraph, what makes some problems sometimes (when we don't want to have margins from paragraph and be forced to remove them manually each time). My question is - are we able to force react-markdown to work in that way, that it puts paragraphs only when there is a line break before? So

"Blabla" should be wrapped in span and
"\nBlabla" should be wrapped in paragraph

Right now, every text is by default wrapped in paragraph in react-markdown (and I know that it is correct from markdown docs perspective, but problematic for devs and UI)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sheppard25
  • 493
  • 1
  • 7
  • 22
  • I don't know about the React version, but I've had problems with `

    ` tags also. Using the `marked.js` tool, it's possible to plug in alternatives (for me it was to use basically `

    `). One of the issues with `

    ` is that any block-level tags (like `

    `) implicitly end the paragraph, regardless of style. For embedding some kinds of content that was not workable for me.
    – Pointy Feb 02 '23 at 14:54

0 Answers0