Skip to content

Commit

Permalink
FIX: Coding interview fragments (#106)
Browse files Browse the repository at this point in the history
Let's celebrate the 600th commit in Cassandre GitHub repository !

This fixes issues resulting from layout removal (for interview transcripts) operated by commit b156198

* First paragraph of an interview can be coded as a fragment (#116).
* Interview memos exclude paragraph indents. This pursues the refactoring of interview transcripts (#104).
* Memo content excludes tabular (\t).
  • Loading branch information
christophe-lejeune committed Nov 10, 2021
1 parent 443cd32 commit 808bab6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ var shared = {
$('#existing_memo').modal('show');\
}\
} else {\
if (anchor > 1) ground = [{'_id': '{{_id}}', 'preview':[{'text': highlight, 'anchor': anchor}]}];\
if (anchor > 0) ground = [{'_id': '{{_id}}', 'preview':[{'text': highlight, 'anchor': anchor}]}];\
var data = {\
groundings: ground,\
history: [{\
Expand Down
2 changes: 2 additions & 0 deletions app/updates/update_memo_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ function (doc, req) {
"user": req.userCtx.name,
"date": new Date().toJSON()
});
doc.body = doc.body.replace(/\t/g, " ");
if (doc.type == "interview") doc.body = doc.body.replace(/ +/g, " ").replace(/\n \n /g, "\n \n");
delete doc.editing;
return [doc, 'Memo updated']
}

0 comments on commit 808bab6

Please sign in to comment.