diff --git a/R/hooks-asciidoc.R b/R/hooks-asciidoc.R index 4d888b55d4..08e414ce0b 100644 --- a/R/hooks-asciidoc.R +++ b/R/hooks-asciidoc.R @@ -37,7 +37,6 @@ render_asciidoc = function() { sprintf('+%s+', x) } hook.chunk = function(x, options) { - x = gsub("/{2,}", "", x) if (is.null(s = options$indent)) return(x) line_prompt(x, prompt = s, continue = s) } diff --git a/R/pattern.R b/R/pattern.R index 41c3d6c987..281bef3edd 100644 --- a/R/pattern.R +++ b/R/pattern.R @@ -43,7 +43,7 @@ all_patterns = list( inline.code = ":r:`([^`]+)`"), `asciidoc` = list(chunk.begin = '^/{2}\\s*begin\\.rcode$', - chunk.end = '^/{2}\\s*end\\.rcode$', + chunk.end = '^/{2}\\s*end\\.rcode$', chunk.code = '^/+', ref.chunk = '^\\s*<<(.+)>>\\s*$', inline.code = '`r +([^`\n]+)\\s*`', inline.comment = '^//.*',