[LH1443] RegEx replacement in compile not working

Found in 2.9.0.16.

Steps to reproduce:

  1. Compile to MMD.
  2. Add a replacement rule replacing \n with \n\n. Check the RegEx box.
  3. Compile.

Actual result: MMD is produced with no blank lines between paragraphs.
Expected result: MMD should include a blank line between each paragraph.

I really hope this gets fixed by the time the final product is released. I have some very particular find-and-replace functions that only RegEx can handle.

FYI, the behavior you’re talking about is the same as the Mac version. Here’s a discussion on an alternative way to make paragraph separation work without actually adding empty lines between each paragraph:

https://forum.literatureandlatte.com/t/best-way-to-get-basic-paragraph-separation-in-pandoc/45978/2

Those instructions refer to

With my beta 22 install the Override text setting is disabled.

Your replacements are not RegEx. You may try switching to non RegExp replacement.

If all you need is carriage return duplication, then you can just use literals for that, you don’t need regular expressions. You can’t actually type a “return” into the fields because that does stuff with forms—but you can copy one from another window and then paste them into the fields. It works fine in my testing, though it does create a confusingly empty looking entry in the replacement table.

And yes, as Robert notes, the intended method for doing this would involve the use of paragraph formatting to create visual space, and then the formatting to whitespace conversion tool to make the visual spacing literal. That’s going to work better in most cases, since a blind duplication of carriage returns can sometimes make a mess of things (e.g. if you use Markdown and type in a table, the syntax for the table will get blown apart, but with a formatting-based approach you could create a “raw markup” style that protects everything about styled text like a raw table).

But as you say there are a few missing pieces to the puzzle at the moment. We’ve got all of these problems logged.

As for searching for carriage returns with this RegEx implementation, it’s not possible. It regards a line as being within those delimiters and doesn’t work across them.