lenn...@getcoding.de writes: > (not subscribed to the list) > > Ever since the initial revision of devel/pcre2/Makefile, PCRE2 is > compiled with --enable-newline-is-any. Why is that? Does anything > depend on it? Is that written down anywhere?
pcre2build(3): NEWLINE RECOGNITION This explains --enable-newline-is-any as a flexibile combination of CR, LF, CRLF, plus unicode newline sequences. Whatever default line ending convention is selected when PCRE2 is built can be overridden by applications that use the library. At build time it is recommended to use the standard for your operating system. It also says it can be overwritten. For example, pcre2grep (tool) and pcre2_compile (function) both have ways to do it. pcre2grep(1): -N newline-type, --newline=newline-type When the PCRE2 library is built, a default line-ending sequence is specified. This is normally the standard sequence for the operating system. Unless otherwise specified by this option, pcre2grep uses the library's default pcre2_compile(3): NEWLINES and PCRE2 CONTEXTS When PCRE2 is built, a default can be specified... However, the newline convention can be changed by an application when calling pcre2_compile(), or it can be specified by special text at the start of the pattern itself; A compile context is required if you want to provide an external function for stack checking during compilation or to change the default values of any of the following compile-time parameters: What \R matches (Unicode newlines or CR, LF, CRLF only) PCRE2's character tables The newline character sequence > > MediaWiki, which I am trying to set up, complains about that. mediawiki might have to be adapted. --enable-newline-is-any seems reasonable as a default since it is flexible and can be overridden by consumers.