Remove period after URL

I am customising an existing csl file, below is an example journal article reference.

Author A. 2019. Assessing the role of off-take and source-sink dynamics in the extinction of the amphidromous New Zealand grayling (Prototroctes oxyrhynchus). Freshwater Biology. 64(10):1747–1754. https://doi.org/10.1111/fwb.13366.

It all looks good, but I want to remove the final period, but only if the reference finishes with a url. So the above would become:

Author A. 2019. Assessing the role of off-take and source-sink dynamics in the extinction of the amphidromous New Zealand grayling (Prototroctes oxyrhynchus). Freshwater Biology. 64(10):1747–1754. https://doi.org/10.1111/fwb.13366

But other references which don't end in a url would maintain the final period, e.g.:

Author A. 2021. Spatially structured ecosystems, connectivity and movement. In: Author B, editors. The Routledge Handbook of Landscape Ecology. London: Taylor & Francis; p. 91–117.

Any advice would be much appreciated.
  • You put the dot as a suffix on a group that contains everything BUT the DOI/URL stuff and remove the dot set in layout.
  • (if you need help beyond that, please put your style on pastebin or so and link to it)
  • Thanks for the response. I had a go at adding a group but couldn't figure it out (first attempt at creating/editing a style). Here is a link to the style: https://pastebin.com/xJ2s2XZx

    Thank you for your help.
  • Delete the suffix you have on line 178.

  • I removed the suffix and nothing changed, I then also removed the suffix on 184, that got rid of the final period, but it did it for all references, not just the one ending with a url. I guess I need to remove the suffix on lines 178 and 184 and then add a groups that contains everything except the DOI/URL?
  • Move the DOI call from line 229 into the access macro. Then it'll work. The rest should be fine then.
    (next time please share your whole code, easier for us to help)
  • Perfect, thank you!
  • Hello, I am new to Zotero and ignorant of code adjustments. I am using "Cite Them Right 12th edition—Harvard" and have the same issue. I need to remove the hard stops (periods) from the end of my URLs.
Sign In or Register to comment.