virastar icon indicating copy to clipboard operation
virastar copied to clipboard

فاصله‌ی مجازی اضافی

Open arashbm opened this issue 14 years ago • 4 comments

وقتی دو جداکننده با عرض صفر (ZWNJ) پشت سر هم می‌آیند یکی باید حذف شود وقتی جداکننده با عرض صفر قبل از حرفی که به قبلی نمی‌چسبد می‌چسبد می‌آید باید حذف شود.

این مدتی که به عنوان ویراستار فعالیت می‌کنم بین نویسنده‌هایی که به تازگی با جداکننده آشنا شده‌اند وسواس عجیبی دیده‌ام که باعث می‌شود از جداکننده‌ی اضافی استفاده کنند. این از آنجایی که پیداکردن این‌ها با چشم آسان نیست ویرایش ظاهری این متن‌ها به مراتب سخت‌تر می‌شود!

مثال: بین رود و ها و ی در کلمه‌ی رودهای

arashbm avatar Jul 28 '11 08:07 arashbm

Thanks for reporting this. it should be fairly easy to implement these two new rules. I hope I can update the gem this weekend. I would be grateful if you can help me by adding new rules and guidelines. I also appreciate if you tell me how you're using this gem and how can I change it to serve you better.

aziz avatar Jul 28 '11 12:07 aziz

I'd be glad to participate in development of this gem.

I just started to use this gem to correct user input data when rendering view. It would not be a good practice to correct and save the corrected form in database but this sort of correcting same data every time may result in heavy loud on server.

2011/7/28 aziz < [email protected]>

Thanks for reporting this. it should be fairly easy to implement these two new rules. I hope I can update the gem this weekend. I would be grateful if you can help me by adding new rules and guidelines. I also appreciate if you tell me how you're using this gem and how can I change it to serve you better.

Reply to this email directly or view it on GitHub: https://github.com/aziz/virastar/issues/1#issuecomment-1672047

arashbm avatar Jul 28 '11 13:07 arashbm

The whole process should NOT take a long time and put overhead on the server. although I don't have any benchmark (maybe something you can help me with) to support my idea. (needs benchmarking)

The other solution is to convert the whole suite to javascript and run it on the client side before submitting forms. I wrote it in ruby cause we had gigantic amount of Persian text in our database that needed to be cleaned up.

aziz avatar Jul 28 '11 14:07 aziz

I think there is a workaround for this issue. simply by caching those gigantic and most-wanted use-input data in another field or something like this so the process is only performed once and the raw input data is protected.

however after reviewing the code, I agree with you that it should not put any overhead on the server. it's precess is nothing compared to something like "RedCloth". Must of the projects using RedCloth render the text before showing in view to protect raw input data and it doesn't have a great effect on server performance.

Thank you for the great gem! :)

2011/7/28 aziz < [email protected]>

The whole process should NOT take a long time and put overhead on the server. although I don't have any benchmark (maybe something you can help me with) to support my idea. (needs benchmarking)

The other solution is to convert the whole suite to javascript and run it on the client side before submitting forms. I wrote it in ruby cause we had gigantic amount of Persian text in our database that needed to be cleaned up.

Reply to this email directly or view it on GitHub: https://github.com/aziz/virastar/issues/1#issuecomment-1672958

arashbm avatar Jul 28 '11 14:07 arashbm