Zotero Firefox Bibliography hanging indents tag dropped
Up until a week or two ago, when I copied bibliography references to clipboard - ("Create bibliography from item..." in Zotero Firefox plugin) - it included the div class tags:
div class="csl-bib-body" style="line-height: 2; padding-left: 2em; text-indent: -2em;"
which created a hanging indent when pasted into most rich-text spaces.
Suddenly a week or two ago, I noticed the hanging indent was gone when I pasted a bib reference into my university's WYSIWYG Moodle forum. Checking the underlying code, I found the last two expressions were no longer being added by Zotero. The div class tag now only included:
div class="csl-bib-body" style="line-height: 2;"
If I add the missing two parameters, i.e.
padding-left: 2em; text-indent: -2em;
inside the quotes, hanging indents are restored as before. I conclude Zotero has changed, not Moodle's interpretation of the formatting tags.
What happened? Did the plugin get updated? Or is my copy corrupted?
How can I get Zotero to add the missing parameters back automatically? It's a bit of a pain to add them manually. The hanging indent feature is also missing when pasting into MS word, although that's something I seldom do, using the Word plug-in instead, which thankfully still includes the hanging indent for automatically generated Bibliography lists.
div class="csl-bib-body" style="line-height: 2; padding-left: 2em; text-indent: -2em;"
which created a hanging indent when pasted into most rich-text spaces.
Suddenly a week or two ago, I noticed the hanging indent was gone when I pasted a bib reference into my university's WYSIWYG Moodle forum. Checking the underlying code, I found the last two expressions were no longer being added by Zotero. The div class tag now only included:
div class="csl-bib-body" style="line-height: 2;"
If I add the missing two parameters, i.e.
padding-left: 2em; text-indent: -2em;
inside the quotes, hanging indents are restored as before. I conclude Zotero has changed, not Moodle's interpretation of the formatting tags.
What happened? Did the plugin get updated? Or is my copy corrupted?
How can I get Zotero to add the missing parameters back automatically? It's a bit of a pain to add them manually. The hanging indent feature is also missing when pasting into MS word, although that's something I seldom do, using the Word plug-in instead, which thankfully still includes the hanging indent for automatically generated Bibliography lists.
Going from 1.1.139 to 1.1.160, we're getting
hangingindent: true
instead ofhangingindent: 2
. Our code callsparseInt()
on the value followed byif (hangingIndent)
, and then uses the number directly as theem
value, butparseInt(true)
is NaN, and NaN is falsy, so the indent is omitted.From the docs, it does look like hangingindent is expected to return a number, no?
For those needing an immediate fix, you can get the updated processor by installing one of the Propachi plugins, removing it when the next Zotero update comes out.