TinyWiki headings related bug and oddness.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TinyWiki headings related bug and oddness.

timrowledge
After all the recent fun of getting a version of squeaksource running locally, fixing some bugs and slightly improving the security, I noticed that on the swiki pages the headings were just plain wrong. This problem is easily observable on the main squeaksource.com site too.

The parsing rules say that
!heading
should produce an html
<h1>heading</h1>
tag - but in fact we were getting some weird junk looking like
<heading></heading><level>1</level><with>heading</with>.
Which doesn't seem quite right. It renders as
1heading
- definitely not what we wanted.

I tracked it down to a fairly silly and very old bug in TWViewer>visitHeading: that took a bit of head-scratching to solve, for reasons largely to do with the fact that there are NO DAMN COMMENTS anywhere. Whoever wrote that - please accept this virtual nose-poke.

I found two other places where the same problem was occurring due to a different aspect of the same bug, but I can't see what on Earth the html is actually doing. For example, in TWWiki>renderWikiReferencesOn: the produced html is basically that shown above plus one or more internal wiki links. What we actually see on the page is
References: Home otherLink
where, a bit oddly, the References gets a colon added and bolded. There is one possibly significant difference in the html though, in that the <level> tags are actually <level1>. But I am no expert in current html and quick googling doesn't provide any immediately inspiring answers.

If I change the references listing to a more sensible looking (to me) use of #heading: and #list:do: then we get the list of references but in a vertical list instead of a horizontal row, and weirdly the heading is simply not displayed. It *is* in the html though. Gronk?




tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
All new: The software is not compatible with previous versions.





TinySwikiHeadings.1.cs (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: TinyWiki headings related bug and oddness.

timrowledge
Some discoveries in this matter;

the strangeness with the headings for the swiki actions and references lists was down to the not terribly obvious css provided by SSwiki>style method, wherein we have
.wikifooter h1 {
        display: none;
}
.wikifooter .list:before {
        content: "References: ";
        font-weight: bold;
}
which (as best I understand it) means anything in <h1> tags gets not-displayed and then the bolded 'References:' gets stuffed in before the actual list. So, pretty confusing by virtue of the same word being involved. And, let's be honest, by a not very helpful name for the method; something a bit more descriptive like #cssStyleInfo might have been nice.

> On 2019-09-23, at 5:31 PM, tim Rowledge <[hidden email]> wrote:
>
> After all the recent fun of getting a version of squeaksource running locally, fixing some bugs and slightly improving the security, I noticed that on the swiki pages the headings were just plain wrong. This problem is easily observable on the main squeaksource.com site too.
>
> The parsing rules say that
> !heading
> should produce an html
> <h1>heading</h1>
> tag - but in fact we were getting some weird junk looking like
> <heading></heading><level>1</level><with>heading</with>.
> Which doesn't seem quite right. It renders as
> 1heading
> - definitely not what we wanted.
>
> I tracked it down to a fairly silly and very old bug in TWViewer>visitHeading: that took a bit of head-scratching to solve, for reasons largely to do with the fact that there are NO DAMN COMMENTS anywhere. Whoever wrote that - please accept this virtual nose-poke.
>
> I found two other places where the same problem was occurring due to a different aspect of the same bug, but I can't see what on Earth the html is actually doing. For example, in TWWiki>renderWikiReferencesOn: the produced html is basically that shown above plus one or more internal wiki links. What we actually see on the page is
> References: Home otherLink
> where, a bit oddly, the References gets a colon added and bolded. There is one possibly significant difference in the html though, in that the <level> tags are actually <level1>. But I am no expert in current html and quick googling doesn't provide any immediately inspiring answers.
>
> If I change the references listing to a more sensible looking (to me) use of #heading: and #list:do: then we get the list of references but in a vertical list instead of a horizontal row, and weirdly the heading is simply not displayed. It *is* in the html though. Gronk?
>
> <TinySwikiHeadings.1.cs>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> All new: The software is not compatible with previous versions.
>
>


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: RCS: Read Card Sideways