Use two lines for extracted annotation header and fix title extraction
Fixes #2095
This commit is contained in:
parent
b5edc0d9c1
commit
47f897fe8c
4 changed files with 4 additions and 3 deletions
|
@ -39,6 +39,7 @@ Zotero.Notes = new function() {
|
|||
this.noteToTitle = function(text) {
|
||||
var origText = text;
|
||||
text = text.trim();
|
||||
text = text.replace(/<br\s*\/?>/g, ' ');
|
||||
text = Zotero.Utilities.unescapeHTML(text);
|
||||
|
||||
// If first line is just an opening HTML tag, remove it
|
||||
|
|
|
@ -1268,7 +1268,7 @@ class EditorInstance {
|
|||
jsonAnnotation.attachmentItemID = attachmentItem.id;
|
||||
jsonAnnotations.push(jsonAnnotation);
|
||||
}
|
||||
let html = `<h1>${Zotero.getString('noteEditor.annotationsWithDate', new Date().toLocaleString())}</h1>\n`;
|
||||
let html = `<h1>${Zotero.getString('noteEditor.annotationsWithDate', new Date().toLocaleString()).replace(/\n/g, '<br/>')}</h1>\n`;
|
||||
let { html: serializedHTML, citationItems } = await editorInstance._serializeAnnotations(jsonAnnotations, true);
|
||||
html += serializedHTML;
|
||||
citationItems = encodeURIComponent(JSON.stringify(citationItems));
|
||||
|
|
|
@ -1267,7 +1267,7 @@ retraction.citeWarning.text2 = You can view the item in your library for further
|
|||
retraction.citationWarning = A citation in your document has been retracted:
|
||||
retraction.citationWarning.dontWarn = Don’t warn me about this item again
|
||||
|
||||
noteEditor.annotationsWithDate = Annotations (%S)
|
||||
noteEditor.annotationsWithDate = Annotations\n(%S)
|
||||
noteEditor.cut = Cut
|
||||
noteEditor.copy = Copy
|
||||
noteEditor.paste = Paste
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0651ded628bb5a00b0b471ea5d43cf9fac015361
|
||||
Subproject commit f0b0689790ea09498e9fc2063649163c992f9bf0
|
Loading…
Add table
Reference in a new issue