On Sep 22, 7:46 am, RobS <[email protected]> wrote:
> On Wednesday, 21 September 2011 23:48:20 UTC-3, [email protected] wrote:
>
> > Works as described on a new BBEdit document but
> > not on an anonymous html document.
>
> I've been using BBE so long I can't find any non-BBE files to try it on. But
> yes, it certainly works on files from unknown sources -- I just tried it on
> a copy of the code of this very Google Groups page. But that, of course, was
> after I saved a copy in BBE.
As far as I know, BBEdit doesn't know (nor care) what application your
HTML was created by. All it cares about is whether or not it's valid
and/or well-formed HTML. If your code does not validate, it's going to
be pretty hard for BBEdit to know how to balance (and sometimes even
create fold points, etc.). For example, if you create this in BBEdit,
you can't balance the div tags:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled</title>
<meta name="generator" content="BBEdit 10" />
</head>
<body>
<div>This is some stuff
</p>
</div>
</body>
</html>
See that close p tag? It's not valid there, and as such, you can't
balance the div tags (div cannot contain a close p tag without a
corresponding open p tag, so that can't be a div element, and as such,
can't be balanced). If you get rid of the bad markup, you'll be able
to balance the tags properly. Markup -> Check -> Document Syntax
should help.
--Kerri
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>