I have a lot of HTML files that have do-nothing blocks in them.
I'd like to select all the text -- including the opening and closing
tags -- and then strip HTML. Actually I'd like to just strip the
opening and closing span tags, and leave what's inside them alone.
The problem I'm running into is
Will there be nested tags?
ie foobarbaz
If not, a script or macro that starts at the current insertion point,
backtracks until it finds a block, removes it, and then moves forward
until it finds a and removes that should do the trick.
Matt.
--
You received this message because you are sub
Here is an AppleScript that will do most of what you want:
This will look at the current cursor position, and use the 'balance tags'
command to select the content of the current tag.
It will then extend that selection to contain the and , and if
it is indeed the tags is a tag, it will remove
On Aug 23, 7:25 pm, DaveHein wrote:
> I have a lot of HTML files that have do-nothing blocks in them.
> I'd like to select all the text -- including the opening and closing
> tags -- and then strip HTML. Actually I'd like to just strip the
> opening and closing span tags, and leave what's inside
Hi,
Am 24.08.2011 um 24, 01:25 schrieb DaveHein:
> The problem I'm running into is that Balance Tags will select the
> innner HTML but not the span tags themselves. So if I put the cursor
> somewhere on or in "some normal text here" and did a Cmd-
> B, the "some normal text here" would be selecte
Whoops: bit of a bug in that last one. If you weren't in a tag, or weren't
in a span tag, it moves the insertion point.
Also note that it will not re-select text if you had a selection.
This one fixes the first bug, but not the second.
*tell* *application* "BBEdit"
*tell* *front* *window*
*se
OK, with help from Roland Küffner and Christopher Stone, I've been able to
create the script I need. More on that in a bit.
There have been a number of suggestions that using find/replace with grep
should work. That only works well if there are no nested spans (with inner
spans that I want to k