ppshobi / psonic

Sonic is a super fast auto suggestion engine built by the team at crisp.chat, a customer engagement platform. its built in Rust and they officially support a javascript client, but if you want to use sonic via php, this is the library that you can look for. Completely unit tested, and adheres to modern coding standards, and offers a clean api to interact with sonic.
MIT License
130 stars 9 forks source link

Newlines in text getting pushed #19

Closed manavo closed 4 years ago

manavo commented 4 years ago

If there are newlines in the text that gets wrapped in quotes it needs to be normalized.

Otherwise the newline is the end of the command, which would be premature, and the quote isn't fully wrapped in double quotes!

codecov[bot] commented 4 years ago

Codecov Report

Merging #19 into master will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #19      +/-   ##
============================================
+ Coverage     95.25%   95.27%   +0.02%     
+ Complexity       84       83       -1     
============================================
  Files            22       22              
  Lines           232      233       +1     
============================================
+ Hits            221      222       +1     
  Misses           11       11              
Impacted Files Coverage Δ Complexity Δ
src/Commands/Command.php 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
src/Commands/Search/SuggestCommand.php 100.00% <100.00%> (ø) 2.00 <2.00> (-1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cce7868...97ce19d. Read the comment docs.

manavo commented 4 years ago

@ppshobi made a change to Scrutinizer so it doesn't actually run the tests, so all checks can pass now 🙂

manavo commented 4 years ago

Added an extra little fix too, the SUGGEST command doesn't take locale/lang as an option (https://github.com/valeriansaliou/sonic/blob/master/PROTOCOL.md)

ppshobi commented 4 years ago

Done, merged. Thank you

ppshobi commented 4 years ago

tagged v1.2.2 release

manavo commented 4 years ago

Thanks! Would it be OK to add the hacktoberfest-accepted tag on this one too? 🙂