Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtl support #15

Open
danbete opened this issue Jul 11, 2019 · 1 comment
Open

rtl support #15

danbete opened this issue Jul 11, 2019 · 1 comment

Comments

@danbete
Copy link

danbete commented Jul 11, 2019

hi,
please add rtl support.
just add an option to lang
and dont do the reverse in lines 21 and 22;

// rtl support

if(dir === 'rtl' ){
lines = lines;
rawText = raw;
}
else{
// reverse to use lifo, because array.shift() will consume 0(n)
lines = lines.reverse();
rawText = rawText.reverse();
}

@sshniro
Copy link
Owner

sshniro commented Jul 11, 2019

Hi @danbete ,

Thank you for the suggestion, as mentioned it will be good to have as a configuration parameter to the library.

algorithm.initLineSegmentation(api_data, lang_configuration))

The default value for this can be left to right.

I will try to add support to the configurations sooner. Bu if you are interested then you can send a PR with the aforementioned changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants