Selecting the first line of each paragraph and adding code

Bolding the first line of each paragraph in a BBEdit document.
I’m trying to select the first line of each paragraph of a BBEdit document and add before the line (prefix) and at the end (suffix). I can’t seem to get the script right. Thanks for your help.

You need to be more specific in what you’re trying to make bold.

The issue is that each paragraph IS a line, as far as BBEdit is concerned.

If your document looks like:

Some header
Here's some body text related to the above header

is two paragraphs as far as BBEdit is concerned. According to your request you’d end up with:

<b>Some header</b>
<b>Here's some body text related to the above header</b>

which I’m guessing isn’t really what you want.

You need a more definitive way of identifying what it is you want to make bold.

More specific would be to bold the first line after a return. So if you have multilpe lines, then a return space, the first line after the return would be bold. so an example would be:

this is the end of a pararaph

Thiis is the first line of the next paragraph
This line is second and NOT bold
Neither is this third line

This line again woud be BOLD.
But again, not thiis one

Is that more clear. Thanks for the help.

What you mean to say is: add bold tags to the first line after a double hard return. This should do it:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Two Words for you…
YOU ROCK!

two more…
Thank you.

It works like magic, I really appreciate your help!
Brandon