Opened 6 years ago

Closed 6 years ago

#1709 closed enhancement (fixed)

[patch] citeproc-js 1.0.51 compatibility patch: makeBibliography() return value

Reported by: fbennett Owned by: simon
Priority: major Milestone:
Component: word integration Version: 2.1
Keywords: Cc:

Description

After some waffling, I have decided it makes sense for the makeBibliography() command to simply return false when no cs:bibliography node is available in the style.

This will break the current trunk code. The attached patch fixes things up, and should be safe to apply before the updated processor is merged. If the change in the return value is undesirable, I'm open to suggestions. Documentation on the behavior of the current tip of citeproc-js is in the manual online:

http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#handling-items-with-no-rendered-form

Attachments (1)

error_api.patch (1.1 KB) - added by fbennett 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by fbennett

comment:1 Changed 6 years ago by fbennett

  • Component changed from uncategorized to word integration
  • Owner changed from dstillman to simon
  • Version changed from 1.0 to 2.1

comment:2 Changed 6 years ago by fbennett

  • Summary changed from Change in return of makeBibliography() when no cs:bibliography node to [patch] citeproc-js compatibility patch (makeBibliography() return value)

comment:3 Changed 6 years ago by fbennett

  • Summary changed from [patch] citeproc-js compatibility patch (makeBibliography() return value) to [patch] citeproc-js 1.0.51 compatibility patch: makeBibliography() return value

comment:4 Changed 6 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed

(In [6393]) update to citeproc-js 1.0.52
closes #1709: [patch] citeproc-js 1.0.51 compatibility patch: makeBibliography() return value
closes #1712: [patch] citeproc-js 1.0.52 compatibility patch

From Frank's notes for 1.0.52:

In this release, the following change may require accomodation
within the calling application:

The processor quashes double spaces in the output.
RTF control words can be terminated with a space, but
this causes an immediately following space to be lost
from the output. To avoid this, the RTF output mode of
the processor has been adjusted to terminate RTF control
words with {} rather than space. Applications that convert
processor output between other formats (such as HTML)
may need to be adjusted to accomodate this new behavior.

Also in this release:

Reverse the RTF-related conservatism in the quashing
of duplicate spaces that was introduced in 1.0.51.

Add missing parens to suspect test condition (not
related to any known bug).

From Frank's notes for 1.0.51:

The API return value changes slightly with this version:

For styles that have no bibliography element, the command
makeBibliography() now returns false, rather than a
stub bibliography object. Code adjustments in the
calling application may be required to accommodate
this change in behavior.

In other bibliography and citation returns, the processor
now provides new arrays, bibliography_errors and
citation_errors respectively, with information on
bibliography entries or cites that produce no meaningful
rendered output. Details are in the processor manual:

http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#handling-items-with-no-rendered-form

Also in this release:

Fix string breakage affecting text-case="title".

Fix over-aggressive quashing of spaces, which affected
spacing following RTF entities.

Note: See TracTickets for help on using tickets.