From 6f2c3d595aa618a917976eca0b3feb79c5269157 Mon Sep 17 00:00:00 2001 From: mpadge Date: Thu, 12 Jan 2023 11:28:57 +0100 Subject: [PATCH] fix #34 --- DESCRIPTION | 2 +- R/dl-standards.R | 4 +++- codemeta.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c1fc4e6..78fd01d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: srr Title: 'rOpenSci' Review Roclets -Version: 0.0.1.186 +Version: 0.0.1.187 Authors@R: person("Mark", "Padgham", , "mark@ropensci.org", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/R/dl-standards.R b/R/dl-standards.R index 011ba1d..a4d899e 100644 --- a/R/dl-standards.R +++ b/R/dl-standards.R @@ -392,7 +392,9 @@ add_space_around_sections <- function (s) { # only index1 <- which (snew == "") index2 <- which (diff (index1) == 1) - snew <- snew [-(index1 [index2])] + if (length (index2) > 0) { + snew <- snew [-(index1 [index2])] + } return (snew) } diff --git a/codemeta.json b/codemeta.json index 974acda..4507a87 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "description": "Companion package to 'rOpenSci' statistical software review\n project.", "name": "srr: 'rOpenSci' Review Roclets", "license": "https://spdx.org/licenses/MIT", - "version": "0.0.1.186", + "version": "0.0.1.187", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",