[LibreWriter] Recording macro doesn't capture deletion of paragraphs

Hello!

I am having a problem with the results after recording a macro to format some text in a certain way.

This is what the text looks like before applying the recorded macro.

I click ‘record macro’ then do a ‘search and replace’ for the space-space & space+space to replace them with just - & +.

Next I do a ‘search and replace’ for the TITLE1 & TITLE2 with nothing. Then I click in the first and second line and delete the paragraph.

After this I stop the recording of the macro, save it and bind it to shift+space.

When I press shift+space it runs the macro but doesn’t delete the paragraphs like I recorded.

This is what is looks like after the macro ran and this is what I want it to look like.

Can anybody please help me figure out what I am doing wrong? Or provide me with another solution for my problem.

On my old pc I had a macro that did exactly that but I forgot to import it before wiping it clean and selling it.

I’m not sure I understand this action. I just repeated the sequence of actions you indicated with a small addition - when, after replacing TITLE1 and TITLE2, I got what is shown in your second screenshot, I turned on the “Regular expressions” option and replaced all ^$ with an empty string.

1 Like

I’m not sure I understand this action

What I meant was that I moved the cursor to the first line and hit backspace to delete the paragraph manually which the macro didn’t record.

Your search & replace with ^$ worked like a charm.

Thank you so much!