Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jul 5, 2021
1 parent 06b2c64 commit c61b88f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<br>` 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
5 changes: 4 additions & 1 deletion code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ function getChartStyle(node, index) {
}

function getCopyRanges(html) {
return html.split(/<[^>]+>/).filter((value) => value !== "");
return html
.replaceAll(/\s*(<br \/>|<br>)\s*/g, "\n")
.split(/<[^>]+>/)
.filter((value) => value !== "");
}

function getTextNodes(nodes: (PageNode | SceneNode)[]): TextNode[] {
Expand Down

0 comments on commit c61b88f

Please # to comment.