citation-style-language / csl-editor

cslEditorLib - A HTML 5 library for searching and editing CSL styles
http://editor.citationstyles.org
MIT License
186 stars 34 forks source link

Retain original comments in CSL files #160

Open SteveRidout opened 12 years ago

SteveRidout commented 12 years ago

Currently comments are stripped out of the CSL file on import since this makes it easier to match the XML node numbering used in citeproc's reverse mapping support.

These comments should be retained.

It appears especially disrespectful now that we add our own "This style was edited with..." comment to output files.

rmzelle commented 12 years ago

FWIW, in my own script to standardize the ordering of elements in the cs:info section I do the following: I keep comments (plural) at the top and any comment (singular) at the bottom of the cs:info section at their respective positions. Other comments are kept with the preceding XML element.

https://github.com/citation-style-language/utilities/blob/master/csl-reindenting-and-info-reordering.py#L71

rmzelle commented 9 years ago

@SteveRidout, I would be ever so grateful if you could fix this. See e.g. https://github.com/citation-style-language/styles/pull/1504/files for an example where comment removal is especially problematic.

Is there anything in citeproc-js that could be changed to make this easier to fix?