I encountered a surprising behavior when knitting an .Rmd document.
Below the code.
When running only the chunk, the result of str_count
is 1.
When I knit the document, the result is 0.
When I change the search pattern to a term without cyrillic letters, e.g. "decision" there is no difference.
Any idea what's going on? Is this a bug, or am I missing something? Many thanks.
title: "test"
author: ""
date: "1/3/2022"
output: html_document
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
txt <- "30. In a decision of 18 April 2006 (реш. № 4 от 18 април 2006 г. по конституционно дело № 11 от 2005 г., обн., ДВ, бр. 36 от 2 май 2006 г.) the Constitutional Court declared unconstitutional section 132d(3) of the ESA, which had almost identical wording as the one of section 33(1)(c) but concerned accused detainees. Since the subject-matter of the case was limited to the former provision, section 33(1)(c) was not reviewed for constitutionality."
str_count(txt, regex("обн\\."))