Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Unsupported languages  
4 comments  




2 What is wrong with friendly interactive shell?  
2 comments  




3 Syntax highlighting errors  
13 comments  




4 Initial effort to clear this category  
1 comment  




5 User scripts  
2 comments  













Category talk:Pages with syntax highlighting errors




Page contents not supported in other languages.  









Category
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Unsupported languages[edit]

At this writing, the following languages used in Wikipedia articles appear to be unsupported by Pygments:

Any others? – Jonesey95 (talk) 20:48, 4 September 2016 (UTC)[reply]

Yes, "text" for starters. If you figure out out to get that supported, please show us how you did it. Thanks, wbm1058 (talk) 10:34, 14 September 2016 (UTC)[reply]
See mw:Extension:SyntaxHighlight#Supported languages, and [expand] the Previously supported lexers box. The documentation seems to erroneously think that text (Plain text) is still supported. – wbm1058 (talk) 10:58, 14 September 2016 (UTC)[reply]
Never mind. text seems to work, as long as the code fragment isn't larger than 100 kB. See § Syntax highlighting errors. – wbm1058 (talk) 12:15, 14 September 2016 (UTC)[reply]

What is wrong with friendly interactive shell?[edit]

Infriendly interactive shell, I find lang=fish, console, and bash, all of which are on the supported language list. What am I missing? – Jonesey95 (talk) 20:52, 4 September 2016 (UTC)[reply]

It had a couple of <source> tags that didn't specify a language. This edit fixed it. – wbm1058 (talk) 11:45, 14 September 2016 (UTC)[reply]

Syntax highlighting errors[edit]

Do you have any idea why User:Magioladitis/WikiProjects is in Category:Pages with syntax highlighting errors? I'm trying to clear that category, not that I know what I'm doing. I've fixed several of them by replacing the <source> tags with <pre> (preformatted text) tags, such as here. – wbm1058 (talk) 20:04, 4 September 2016 (UTC)[reply]

(talk page stalker) @Wbm1058: Wrong fix - try this. --Redrose64 (talk) 20:26, 4 September 2016 (UTC)[reply]
Redrose64, what is moin and what difference does it make? Cosmetically, the page appears the same. wbm1058 (talk) 20:31, 4 September 2016 (UTC)[reply]
See User talk:Cedar101#languages for source. One reason to avoid <pre>...</pre> is that in some circumstances, its contents can still be parsed as wikitext. <source>...</source> - which is essentially synonymous with <syntaxhighlight>...</syntaxhighlight> - prevents such parsing. --Redrose64 (talk) 20:41, 4 September 2016 (UTC)[reply]
It just seems silly to claim that the code is in something obscure like MoinMoin... the code is in MediaWiki !! And if we should avoid <pre>...</pre> and use <source>...</source>or<syntaxhighlight>...</syntaxhighlight>, then the latter two shouldn't dump every page that uses those into Category:Pages with syntax highlighting errors! Sorry if I seem annoyed (I am), but it's a joke that our documentation of this – Wikipedia:Syntax highlighting – is a disambiguation page. {{dabconcept}}! – wbm1058 (talk) 21:27, 4 September 2016 (UTC)[reply]
Cedar101, you have plenty of experience of this, what do you suggest? --Redrose64 (talk) 22:03, 4 September 2016 (UTC)[reply]
See bug ticket T29828. – Jonesey95 (talk) 00:25, 5 September 2016 (UTC)[reply]
Back to the OP's question, I haven't figured out a fix for the User page in question. I tried lang="c#", which appears to be a supported language, but the category persists. – Jonesey95 (talk) 21:03, 4 September 2016 (UTC)[reply]
csharp should be supported, it's listed at mediawiki-extensions-SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.lexers.php --Redrose64 (talk) 21:58, 4 September 2016 (UTC)[reply]

Maybe the text is too long? -- Magioladitis (talk) 22:00, 4 September 2016 (UTC)[reply]

I think there are size limitations. -- Magioladitis (talk) 22:17, 4 September 2016 (UTC)[reply]

That makes sense, as I found a couple other long pages with syntax highlight errors, such as User:BattyBot/CS1 errors-dates. Is this a bug in Pygments? Is there a workaround? If syntax highlighting doesn't work for long pages, then there seems to be no benefit to using <source>...</source>or<syntaxhighlight>...</syntaxhighlight>, and we may as well just replace them with <pre>...</pre> to clear the category so people don't go chasing down spurious errors. wbm1058 (talk) 22:41, 4 September 2016 (UTC)[reply]
"Highlighting large blocks of code can easily generate enough of them to crash a browser. As a guard, syntax highlighting is turned off for code fragments larger than 100 kB." Can we guess that such code fragments also put the article in the maintenance category? It would be nice to find confirmation of that. – Jonesey95 (talk) 00:27, 5 September 2016 (UTC)[reply]

Initial effort to clear this category[edit]

On Sept. 4, 2016 I started working to clear this category, whereupon I reported the issues discussed above. Anyone is welcome to review my edits, the relevant edit history is here. wbm1058 (talk) 12:53, 14 September 2016 (UTC)[reply]

User scripts[edit]

One cause that occasionally comes up (which I encountered myself a little over a year ago) is that a user script contains a string constant like '<syntaxhighlight'. This didn't seem to be a problem with GeSHi for some reason. The solution is usually to split the string constant into '<syntaxh' + 'ighlight' or similar.

Should we amend the description of the category to clarify that this is an issue? Should we warn affected users? --SoledadKabocha (talk) 18:53, 26 November 2016 (UTC)[reply]

On second thought, never mind. A quick look through the category shows that extant cases in JavaScript files include MediaWiki:LAPI.js, User:Cacycle/wikEd.js (and a couple forked copies), and MediaWiki:Robots.txt. None of these match the exact problem I described; all may be due to the aforementioned length limit. --SoledadKabocha (talk) 22:28, 19 December 2016 (UTC)[reply]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Category_talk:Pages_with_syntax_highlighting_errors&oldid=755740856"





This page was last edited on 19 December 2016, at 22:28 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki