diff --git a/CHANGELOG.md b/CHANGELOG.md index 59945b6..22236ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 0.1.0 - 2021-06-29 +## [0.1.1] - 2021-07-05 +### Added +- Support for `
` tags, to create line breaks. + +### Changed +- Replaced proxy url. +## 0.1.0 - 2021-06-29 First version + +[0.1.1]: https://github.com/marketgoo/figma-copies/compare/v0.1.0...v0.1.1 diff --git a/code.ts b/code.ts index 9ffb515..8e0d425 100644 --- a/code.ts +++ b/code.ts @@ -185,7 +185,10 @@ function getChartStyle(node, index) { } function getCopyRanges(html) { - return html.split(/<[^>]+>/).filter((value) => value !== ""); + return html + .replaceAll(/\s*(
|
)\s*/g, "\n") + .split(/<[^>]+>/) + .filter((value) => value !== ""); } function getTextNodes(nodes: (PageNode | SceneNode)[]): TextNode[] {