Skip to content

Commit

Permalink
FIX: Passages may be on a single line (fixes #192).
Browse files Browse the repository at this point in the history
  • Loading branch information
benel committed Aug 31, 2024
1 parent fda765b commit 2a87193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/views/lib/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports.getRelatedDocuments = ({isPartOf, links}) =>
);

exports.emitPassages = ({text, isPartOf, related}) => {
const PASSAGE = /{(.+)} ([^{]+)/g;
const PASSAGE = /{([^{]+)} ([^{]+)/g;
let passages = [...text.matchAll(PASSAGE)];
passages = (passages.length || !text) ? passages : [[null, null, text]];
passages.forEach(([_, rubric, passage]) => {
Expand Down

0 comments on commit 2a87193

Please sign in to comment.