shabados / gurmukhi-utils

Utilities library for converting, analyzing, and testing Gurmukhi strings.
MIT License
30 stars 9 forks source link

fix(toEnglish): properly detect word boundaries #177

Closed bhajneet closed 3 years ago

bhajneet commented 3 years ago

Fixes #175

Summary

Found this bug while @Harjot1Singh was working on single word translits in presenter

Tests for unexpected behavior

All old tests pass, as do these new ones:

  [ 'ਹਰਿ', 'har' ],
  [ 'ਸਚੁ', 'sach' ],
  [ 'ਰਾਹੁ', 'raahu' ],
  [ 'ਭਾਉ', 'bhaau' ],
  [ 'ਸਤਿਗੁਰੁ ਸਤਿਗੁਰੁ ਸਚੁ; ਸਚੁ ਹਰਿ ਹਰਿ ਹਿੰਙੁ', 'satigur satigur sach; sach har har hing' ],
  [ 'ਸੁ ਉ ਜੁ', 'su u ju' ],

Time spent on PR

one hour

Reviewers

@Harjot1Singh @Sarabveer

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 341893072

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 336089287: 0.0%
Covered Lines: 153
Relevant Lines: 153

💛 - Coveralls
bhajneet commented 3 years ago

Since you implemented that and we are not quite fluent in it, perhaps you can propose something more concrete/actionable?

Else you can file an issue and do it later

bhajneet commented 3 years ago

https://github.com/shabados/gurmukhi-utils/blob/f0a2bfae4a927306f5a9670ea3d39eb06f8c13e5/lib/toShahmukhi.js#L108

This would also need to be updated.

Perhaps best to open a new issue for you to work on, I don't know how to fix the tests on this

image

Please allow this PR to be merged in for the time being

Harjot1Singh commented 3 years ago

Moved to #180 and releasing as is.