Skip to content

Commit

Permalink
Merge pull request danielearwicker#14 from creately/line-break-bug-fix
Browse files Browse the repository at this point in the history
 BR tag should close itself to avoid browser standard issues
  • Loading branch information
thisunravisara authored Feb 8, 2019
2 parents 2c15215 + 3c667a2 commit 65807c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@creately/carota",
"author": "Daniel Earwicker ([email protected])",
"description": "Simple, flexible rich text rendering/editing on HTML Canvas",
"version": "1.3.7",
"version": "1.3.8",
"repository": {
"type": "git",
"url": "https://github.com/danielearwicker/carota.git"
Expand Down
2 changes: 1 addition & 1 deletion src/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ exports.html = function( texts ) {
var span = document.createElement( 'span' );
Object.keys(obj).forEach(function(k, i) {
if ( k === 'text' ) {
var brAdded = obj[ k ].replace(/\n/g, '<br>');
var brAdded = obj[ k ].replace(/\n/g, '<br/>');
span.innerHTML = brAdded;
}
if ( k === 'bold' ) {
Expand Down

0 comments on commit 65807c8

Please sign in to comment.