Monday, August 10, 2020

Google Lemonade: trying to work around last weeks new bug

Last week, we got a new lemon in Google's new software which I explained in this lemonade.

Having slept on it, I wondered if I could work around the "everything is in <p>'s bug" by starting a new post in HTML mode than switching back to the Compose mode.

When I switched to HTML mode, I saw "<p>nbsp;</p>". That is the blank that I complained about that is inserted at the beginning of a post. I thought I found the root cause of the problem. I thought all I had to do was remove that bogus HTML.  So I replaced that bogus text with "Hello". Unfortunately, subsequent lines were embedded in <div>'s.  This was true even if I entered "Hello<br/>" in HTML mode. And "Hello<br/><br/>" didn't help.

Hello<br />World<div>xxx</div><div>yyy</div><div><br /></div>

At least <div>'s don't force everything to be double spaced like the <p>'s do.

As another test, I tried just removing the <p>nbsp;</p> and adding Hello in the compose mode. No joy. I got: "<p>&nbsp;Hello</p><p>World</p>".



Now that I'm looking at the HTML, I'm seeing other horrors such as <span>'s gone nuts. And I'm reminded that the new HTML viewer does the worse formatting of HTML I have ever seen.  (And it  doesn't allow me to use the browser's ctrl-F search like the old one did.) For example, in silage, I added the screenshot photo after the previous two photos in this excerpt.

Below is the corresponding HTML.

The first <table> is the first photo, and it was produced by the legacy version. As with most HTML viewers, <table> starts a new line and </table> is at the end of a line. Also, <tr> (table row) and </tr> influence new line formatting.

The new viewer makes no attempt to make the HTML readable. And what is with all of the spans??? For example, two spans to format a space!!!

While I was wasting my time with the new version, I decided to try removing the formatting from the caption.

That did get rid of the bogus <span>'s. But it left justified the caption, which is incompatible with the legacy version. More significantly, the new version is still destroying the content of the URLs in the selected text! (I did not select the "Screenshot" line, that is why its href is still valid.) This URL corruption problem has been reported a few moons ago. Note that the new version still won't add newlines in reasonable places.

Now that I'm thinking about it, the <span>'s are because I copied the text from Facebook. Because of these spans, I generally remove formatting of captions with the legacy version. But the URL corruption bug in the new version prevents me from removing  the Facebook formatting.



I'm loosing sleep because of dreading Google's Doomsday of Sept 1. Back in the 1990's I decided that if I was loosing sleep because of volunteer work, I needed to rethink whether or not I'm going to continue doing that work.

No comments:

Post a Comment