Skip to content

Updated Markdown-it render options#1988

Merged
corinagum merged 4 commits intomicrosoft:masterfrom
tdurnford:1429
May 17, 2019
Merged

Updated Markdown-it render options#1988
corinagum merged 4 commits intomicrosoft:masterfrom
tdurnford:1429

Conversation

@tdurnford
Copy link
Copy Markdown
Contributor

@tdurnford tdurnford commented May 14, 2019

Fixes #1429

Changelog Entry

Fix #1429. Changed Markdown-it options to render newline characters correctly, by @tdurnford in PR #1988

Description

When Markdown-it's breaks option is set to true, the renderer interprets all newline characters (\n) as line break elements (<br />), which is not the desired behavior for Web Chat. Setting the option to false changes the renderer's interpretation of a newline character to a new line within the paragraph tag unless it is preceded by two space characters. In that case, the renderer converts the newline character to a line break.

image

Specific Changes

  • Changed the Markdown-it breaks option from true to false in renderMarkDown

  • Testing Added

Comment thread packages/bundle/src/__tests__/renderMarkdown.spec.js Outdated
@corinagum corinagum merged commit 03ffb82 into microsoft:master May 17, 2019
@tdurnford tdurnford deleted the 1429 branch June 3, 2019 21:59
@compulim compulim mentioned this pull request Jul 8, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown render texts in single paragraph into two lines

3 participants