dating extraction: adjust getDatingSpan to consume nested array of dating strings
follow up to #16 (closed) and #17 (closed)
- on function getDatingSpan in datingExtraction.js
- handle nested array of dating strings as parameter
- is: consumes flat array
- shoud be: consumes nested array
the code is confused right now: there is one line with a fix to flatten the already nested array, that needs to be removed. also it did not work as intended before. since the dating items from entries could not be distinguished until now, the dating parser ran across the whole array of dating items for an entity. this caused dating items referring to different things to get mixed up.
- remove code for flattening the consumed array
- add another loop over each array of dating items, so each array coming from one entry is parsed and turned into a span individually
those changes also imply changing the return value to an array of spans
- change return value from single span to array of spans