writing such a macro is possible and is in fact quite easy. The key is to use "Find and Replace".
- Open "Find and Replace"
- Select "Using: PowerFind"
- Enter your opening tag, i.e.,
- From the gear menu choose Match > Capture(). The cursor should be between the two parts of the Capture()
- From the gear menu choose Wild Card > AnyCharacter
- From the gear menu choose Repeat > 1+ Shortest
- Place the cursor at the end of the find expression and enter your closing tag, i.e.,
- Move to the Replace box and from the (replace) gear menu choose Match > Captured1
- Select the replace expression and apply bold formatting as usual. The "Replace Attributes" box should become "clicked"
The find box should look like this:
If you do "Replace All" now on a file with that kind of mark up you should have your mark up turned into formatting.
NB: Since "Ignore Case" is checked, this will work for tags with either "b" or "B" in any mixed combination. (This seems to be what you want.)
To get a macro, you do the following.
- From the gear menu choose "Macroize…"
- In the macroize window specify "Replace All" and then do "Save as Macro"
Repeat the whole thing for the other tags.
Make sure to apply the formatting you want -- and to clear out any formatting you don't want -- in the replace box.
You'll have to use copy/paste to combine the 3 macros into 1.