DISSINET / InkVisitor

An open-source, browser-based front-end application for the collection of complex structured data from textual resources in history and the social sciences into a RethinkDB database for further analysis.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Avoid adding extra whitespace characters around anchors #2204

Closed davidzbiral closed 3 months ago

davidzbiral commented 3 months ago

It seems that adding statement anchors sometimes adds an extra whitespace which should not be there (screenshot, before Interrogatus; I am almost sure I did not add it manually). Can you please check whether this is not happening, and if it is, avoid that behaviour?

obrazek

jancimertel commented 3 months ago

few whitespace chars on the left side (before the anchor tag) - is this part of the issue?

davidzbiral commented 3 months ago

@jancimertel The chars before the anchor tag are not part of the issue, because they are in the original. Adding anchors should leave the full text as it is now. But thinking about it, perhaps it is not that the app adds whitespace, but that the user (me) added the anchor imprecisely because of the uncertainty of text selection in current annotator, described in another issue. Needs your testing.

jancimertel commented 3 months ago

Tested it in various scenarios, there should not be any functionality that adds new whitespace character anywhere during the anchor-adding operation.

However i noticed situation which causes the selected area to select also the newline character (\n) which could push one blank space to the anchored area. Fixed & closing this issue for now.