Skip to content

Commit

Permalink
Fixed bug in phrasey check for dotted rests.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonawicz committed Jul 16, 2019
1 parent 50ce8fd commit 2aa9093
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/phrase.R
Expand Up @@ -206,7 +206,11 @@ phrasey <- function(phrase){
if(!inherits(phrase, "phrase") & !inherits(phrase, "character")) return(FALSE)
i1 <- sum(attr(gregexpr("<", phrase)[[1]], "match.length"))
if(i1 < 1){
if(gsub(" |r\\d+|s\\d+", "", phrase) == "") return(TRUE) else return(FALSE)
if(gsub(" |r\\d+(\\.|)(\\.|)|s\\d+(\\.|)(\\.|)", "", phrase) == ""){
return(TRUE)
} else {
return(FALSE)
}
}
i2 <- sum(attr(gregexpr(">", phrase)[[1]], "match.length"))
if(i1 != i2) return(FALSE)
Expand Down

0 comments on commit 2aa9093

Please sign in to comment.