FrankensteinVariorum / fv-web

new web front-end for the Frankenstein Variorum project, working with Astro & React
https://frankensteinvariorum.org/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Note element issue with interface #9

Closed ebeshero closed 1 year ago

ebeshero commented 1 year ago

In at least two places a <note> element is displayed (as a hotspot) in the reading view, but does not respond on click to open the sidepanel. Looking at the standoff spine files, there seems no reason they should not display / be available for display? Passages so far: (The analogous passage in the other editions is also not clickable.) These are both notes by MWS, so they are permanently displayed.

Here is a note that responds properly and on click displays the side panel. This note is from fv-team (wonder if those work differently?) https://frankensteinvariorum.org/viewer/1818/vol_2_chapter_iii/

Yuying-Jin commented 1 year ago

@ebeshero I have fixed the problem about note elements. The reason why it did not work is the normalization string is not a valid JSON structure. Python script sometimes wraps the tokens with single quotes sometimes with double ones. Usually, when the tokens includes double quotes, Python is more likely to use single quotes to wrap this token, so I only escape the double quotes between the single quotes; however, after we fixed the longToken in this passage, Python uses double quotes to wrap the token including double quotes, and my old regex did not match and escape them, so normalization could not be converted to the valid JSON structure.