BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

[bug] Fenced HTML codeblock reformatting attributes broken out over multiple lines. #2667

Open milesbigbluedoor opened 5 years ago

milesbigbluedoor commented 5 years ago

Current behavior

When using a HTML fenced codeblock and you break multiple attributes over multiple lines, it currently renders all attributes onto a single lines and simultaneously adds those linebreaks to the end of the codeblock.

Editor:

screenshot 2018-12-02 at 15 27 42

Preview:

screenshot 2018-12-02 at 15 28 23

Expected behavior

The fenced block should preview as it is formatted in the editor.

Steps to reproduce

  1. Create a fenced HTML codeblock
  2. Define a tag such as a <div>
  3. Add multiple attributes and break them out over multiple lines

Environment

IssueHuntBot commented 5 years ago

@issuehuntfest has funded $20.00 to this issue. See it on IssueHunt

richardtks commented 5 years ago

@milesbigbluedoor, Hi, I am not able to reproduce in the current master branch, maybe this has been fixed? Can you provide your .md file, so that I can test your .md in master branch as well?

Editor mode: image

Preview: image

milesbigbluedoor commented 5 years ago

@richardtks I just messed around with my preferences and discovered this is an issue caused by the Sanitization option under Interface being set to Allow dangerous html tags. Can you try setting your Sanitization setting to the same and see if that breaks it?