Hi Felix,
Interesting behavior.
I searched for that file and line, and see that the rtrim is being used in another fucntion called untrailingslashit. I searched for that in s2, but nothing.
That function “removes trailing forward slashes and backslashes if they exist.” So it’s used on URLs, and if it’s for the navigation, obviously is in the links to the pages.
s2 uses the horizontal lines to separate parts of the navigation, and maybe that has something to do with it? I’d have to try and inspect that plugin’s code to find out…
I do plan to remove those separating lines, and also add navigation in the page itself, not just the sidebar. Maybe that’ll help.