Skip to content

Commit

Permalink
Experiment: show blank lines in LyricsPane
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmorris committed Mar 7, 2017
1 parent bc10a23 commit 9c1e51e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/LyricsPane.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ textarea {
min-height: 25vh;
column-width: 15em;
}

.line {
min-height: .6em;
}
2 changes: 1 addition & 1 deletion src/LyricsPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LyricsPane extends Component {
x.push(word);
x.push(" ");
}
return <div key={idx}>{x.slice(0,-1)}</div>;
return <div className="line" key={idx}>{x.slice(0,-1)}</div>;
}

componentWillUnmount() {
Expand Down
2 changes: 1 addition & 1 deletion src/verse.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Verse {
var last_word;
var i = 0;
var lala;
for (const line of text.split(/[\n\r]+/)) {
for (const line of text.split(/\n\r|\r\n|\n|\r/)) {
for (const word of line.trim().split(/\s+/)) {
if (!word) {
continue;
Expand Down

0 comments on commit 9c1e51e

Please sign in to comment.