wickedest / Mergely

Merge and diff documents online
http://www.mergely.com
Other
1.17k stars 228 forks source link

Have a direction for the search #207

Closed hadithmv closed 1 month ago

hadithmv commented 2 months ago

In the docs page: https://www.mergely.com/doc

it mentions the following:

scrollToDiff(direction: string) Scrolls to the next change specified by direction.

Parameters Name Type Description direction string The direction to scroll, either prev or next. Example doc.scrollToDiff('next');

search(side: string, needle: string) Search the editor for needle, scrolling to the next available match. Repeating the call will find the next available token.

Parameters Name Type Description side string The editor side, either lhs or rhs. needle string The text for which to search. Example doc.search('lhs', 'banana');

Shouldn't search also have a direction in its parameter, so as to be able to go to previous matches, instead of only next matches?

Also note that in the example it mentions "needle" in the text, but "banana" in the code.

Furthermore, in places like: search(side: string, needle: string)

and

Parameters Name Type Description needle string The text for which to search.

maybe it should say something else other than needle

wickedest commented 2 months ago

I think it exists, but direction is undocumented. I'll leave this ticket open to make sure it gets documented.

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 5.3.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: