Skip to content

Commit

Permalink
Merge branch 'dev' into bhajneet/issue175
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Nov 2, 2020
2 parents 44f2cbb + 4adbf3f commit aac5778
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 44 deletions.
11 changes: 7 additions & 4 deletions lib/stripEndings.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ const numberClass = getRegexClass( [
// Rahao in English, ASCII, Unicode
const pauseGroup = getRegexGroup( [ 'ਰਹਾਉ', toAscii( 'ਰਹਾਉ' ), 'Pause' ] )

// Matchers to strip out of input string
const matchers = [
// || Rahao || style endings
` ?${endingClass} ?${pauseGroup}( .*)?${endingClass}`,
// Endings followed by any number => match the rest of the line
` ?(${endingClass}|${optionalEndingClass}?)${numberClass}.*`,
// Any pause (ending + pause word) => match the rest of the line
` ?${endingClass} ?${pauseGroup}.*`,
// Any ending followed by any number => match the rest of the line
` ?(${endingClass}|${optionalEndingClass})${numberClass}.*`,
// Any sequence at the end of a line with numbers, periods, and spaces beginning with a number
` ?${numberClass}(${numberClass}|[. ])*$`,
// Clean up any lingering ending characters
` ?${brokenEndingClass}`,
` ?${endingClass}`,
Expand Down
Loading

0 comments on commit aac5778

Please sign in to comment.