Skip to content

Commit

Permalink
Merge commit '22e725b90f107583dfe9d51f7ec93a6e1852b8e5' into morashift
Browse files Browse the repository at this point in the history
* commit '22e725b90f107583dfe9d51f7ec93a6e1852b8e5':
  Collapsed strings of whitespace that start with a newline to a single space. Fixes gregorio-project#1111.
  • Loading branch information
rpspringuel committed May 20, 2016
2 parents 2cf4fb4 + 22e725b commit 333123d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
[Unreleased][unreleased]
### Fixed
- The `900_gregorio.xml` file for Scribus now matches `main-lualatex.tex` again (see [#1087](https://github.com/gregorio-project/gregorio/issues/1087)).
- Multiple subsequent lines in gabc no longer cause TeX to fail (see [#1111](https://github.com/gregorio-project/gregorio/issues/1111)).
- Old bar spacing algorithm will no longer separate the text and bar when the bar is preceeded by a puncutm mora (see [#1078](https://github.com/gregorio-project/gregorio/issues/1078)).

### Added
Expand Down
24 changes: 16 additions & 8 deletions src/gabc/gabc-score-determination.l
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ double semicolon, (b) multi-line values, which end at a double
semicolon. */

%%
<INITIAL>^(\xBB|\xEF|\xBF)* {
<INITIAL>^(\xBB|\xEF|\xBF)+ {
/* BOM written by a lot of windows softwares when they write UTF-8 */
}
<INITIAL>^[\n\r]+ {
Expand All @@ -118,7 +118,7 @@ semicolon. */
<inicomments>(\n|\r)+ {
BEGIN(INITIAL);
}
<inicomments>[^\n\r]* {
<inicomments>[^\n\r]+ {
/* ignored */
}
<INITIAL>:(\ )? {
Expand Down Expand Up @@ -216,7 +216,11 @@ semicolon. */
_("unrecognized character: \"%c\" in definition part"),
gabc_score_determination_text[0]);
}
<score>[^-\{\}\(\[\]<%]+ {
<score>[\n\r][\n\r \t]* {
gabc_score_determination_lval.text = gregorio_strdup(" ");
return CHARACTERS;
}
<score>[^-\{\}\(\[\]<%\n\r]+ {
gabc_score_determination_lval.text =
gregorio_strdup(gabc_score_determination_text);
return CHARACTERS;
Expand Down Expand Up @@ -326,7 +330,11 @@ semicolon. */
}
return SP_END;
}
<style>[^<\{\}]* {
<style>[\n\r][\n\r \t]* {
gabc_score_determination_lval.text = gregorio_strdup(" ");
return CHARACTERS;
}
<style>[^<\{\}\n\r]+ {
gabc_score_determination_lval.text =
gregorio_strdup(gabc_score_determination_text);
return CHARACTERS;
Expand All @@ -337,7 +345,7 @@ semicolon. */
<comments>(\n|\r)+ {
BEGIN(score);
}
<comments>[^\n\r]* {
<comments>[^\n\r]+ {
/* ignored */
}
<style,score><v> {
Expand All @@ -352,7 +360,7 @@ semicolon. */
}
return VERB_END;
}
<verb>[^<]* {
<verb>[^<]+ {
gabc_score_determination_lval.text =
gregorio_strdup(gabc_score_determination_text);
return CHARACTERS;
Expand All @@ -372,7 +380,7 @@ semicolon. */
BEGIN(alt);
return ALT_BEGIN;
}
<alt>[^<]* {
<alt>[^<]+ {
gabc_score_determination_lval.text =
gregorio_strdup(gabc_score_determination_text);
return CHARACTERS;
Expand Down Expand Up @@ -400,7 +408,7 @@ semicolon. */
BEGIN(notes);
return OPENING_BRACKET;
}
<notes>[^|\)]* {
<notes>[^|\)]+ {
gabc_score_determination_lval.text =
gregorio_strdup(gabc_score_determination_text);
return NOTES;
Expand Down

0 comments on commit 333123d

Please sign in to comment.