[Solved]Alignment problem with Wikpedia's syntax highlighter

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
ari5_96
Apollo supporter
Apollo supporter
Posts: 39
Joined: 2014-07-26, 09:10
Location: Australia

[Solved]Alignment problem with Wikpedia's syntax highlighter

Unread post by ari5_96 » 2014-07-26, 10:18

I'm using Pale Moon 24.6.2 (x86) on Windows 7 Ultimate SP1 64-bit desktop, but I can also reproduce this problem on an separate laptop running 32-bit XP. In both cases the problem occurs even with a new default install of PM.

While editing Wikipedia articles, using the syntax highlighter tool described at https://www.mediawiki.org/wiki/User:Rem ... ighlighter, I find that the highlighting does not line up with the text in some cases. It works reliably in Firefox 30. An example of the problem is shown at http://tinypic.com/r/2ag93ih/8 - the image on the left is Pale Moon 24.6.2 , the image on the right is Firefox 30. I've added the red rectangle to show one instance of the problem. The exact degree of mismatch varies - in particular it seems to change with the word-wrapping as I resize the window horizontally.

Some history that might help isolate the problem:

Prior to April 2014 I used an earlier Firefox (I can't remember which, but probably either 14.0.1 or 24.5.0) and the syntax highlighter tool worked correctly. Then the syntax tool changed, dropping support for Firefox <29, and the above-described problem appeared. I updated to Firefox 29 and the syntax highlighter worked correctly again. I've been unhappy with FF's bloat, so I tried Pale Moon - which I'm quite happy with, except for this syntax highlight problem.

The code removed from the syntax highlighter suggests that the Firefox bug causing the problem might be https://bugzilla.mozilla.org/show_bug.cgi?id=157846 - but I am not knowledgeable on these matters, so it's only a guess on my part.

I've asked the developer of the syntax highlighter tool for help in pinpointing exactly which bug in the earlier Firefox caused the problem, on the presumption that it has not been fixed in Pale Moon, and the hope that you might be able to fix it. The discussion is at https://en.wikipedia.org/wiki/User_talk ... ersions.3F

Thanks
Last edited by Moonchild on 2015-01-18, 12:14, edited 1 time in total.
Reason: Marked Solved

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by Moonchild » 2014-07-26, 11:42

Thanks for reporting this. That's indeed a bug with CSS padding. The bugzilla bug mentioned is a good starting point, I'm surprised it was left to rot for so long at Mozilla.
It does have a number of dependencies in code that also need to be implemented, since fixing one thing breaks a few others.

I'll add it to my to-do list.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ari5_96
Apollo supporter
Apollo supporter
Posts: 39
Joined: 2014-07-26, 09:10
Location: Australia

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by ari5_96 » 2014-11-27, 11:33

Any thoughts on if/when this bug might be fixed?
It's the only thing stopping me from switching from Firefox to Pale Moon on one of my PCs - I do a lot of Wikipedia editing, and having the browser work with Syntax Highlighter is quite important for me.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by Moonchild » 2014-11-27, 12:19

As you can imagine, I've had a lot on my plate (split from Firefox, major updates required for websites to function) and unfortunately for you this is a minor bug in the grand scheme of things. It's not a question of "if" though, rather "when"; it's on my to-do list and I'll get to it :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ari5_96
Apollo supporter
Apollo supporter
Posts: 39
Joined: 2014-07-26, 09:10
Location: Australia

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by ari5_96 » 2014-11-28, 23:54

OK, thanks

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by Moonchild » 2014-12-07, 18:32

ari5_96 wrote:OK, thanks
You'll be pleased to know that the underlying problem for the syntax highlighter issue you've had should be fixed in Pale Moon 25.2
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ari5_96
Apollo supporter
Apollo supporter
Posts: 39
Joined: 2014-07-26, 09:10
Location: Australia

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by ari5_96 » 2015-01-18, 07:37

... the underlying problem for the syntax highlighter issue you've had should be fixed in Pale Moon 25.2
Thanks.
I've installed 25.2 and done a few quick checks, and it seems to render correctly now.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by Moonchild » 2015-01-18, 10:20

ari5_96 wrote:
... the underlying problem for the syntax highlighter issue you've had should be fixed in Pale Moon 25.2
Thanks.
I've installed 25.2 and done a few quick checks, and it seems to render correctly now.
Thank you for verifying! :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

x-15a2

Re: Alignment problem with Wikpedia's syntax highlighter

Unread post by x-15a2 » 2015-01-18, 12:09

Thanks Moonchild! For those of us that are Wikipedia contributors, this is a big deal and we appreciate your efforts regarding this issue!