From 5830aa3030bfc44745b1d178cafdcdcfa8b3e36e Mon Sep 17 00:00:00 2001 From: christopher crew baker Date: Fri, 31 Aug 2018 18:32:20 -0400 Subject: [PATCH] look for so header in all lines, not just first --- R/reprex-undo.R | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/R/reprex-undo.R b/R/reprex-undo.R index d275dbd8..cf4a961b 100644 --- a/R/reprex-undo.R +++ b/R/reprex-undo.R @@ -232,9 +232,5 @@ classify_lines <- function(x, comment = "^#>") { wut <- ifelse(wut == "code" & grepl(comment, x), "output", wut) so_special <- "" - if (identical(x[1], so_special)) { - wut[1] <- "so_header" - } - - wut + ifelse(x == so_special, "so_header", wut) }