Jump to content

Extension talk:SyntaxHighlight GeSHi/Archive 2014

From mediawiki.org

Highlight multiple lines

I can use highlight="5" to highlight line 5 of the code. Is there a way to highlight multiple lines? Maybe something like highlight="5,6,10,20" --Iynque (talk) 15:05, 18 January 2014 (UTC)Reply

  • Well... Let's test and see what we have...
  • Just line #5
This is line {{{1}}}
This is line {{{2}}}
This is line {{{3}}}
This is line {{{4}}}
This is line {{{5}}}
This is line {{{6}}}
This is line {{{7}}}
This is line {{{8}}}
This is line {{{9}}}
  • Lines #4-6
This is line {{{1}}}
This is line {{{2}}}
This is line {{{3}}}
This is line {{{4}}}
This is line {{{5}}}
This is line {{{6}}}
This is line {{{7}}}
This is line {{{8}}}
This is line {{{9}}}
  • Lines #3, 6, 9
This is line {{{1}}}
This is line {{{2}}}
This is line {{{3}}}
This is line {{{4}}}
This is line {{{5}}}
This is line {{{6}}}
This is line {{{7}}}
This is line {{{8}}}
This is line {{{9}}}
Seems to be working (although I can barely see the highlighting color, it is there) on my FireFox26 screen. Hope this helps! Technical 13 (talk) 16:29, 18 January 2014 (UTC)Reply

inhibit new paragraphs when inlining tags

Is there a way to stop the extension from creating a new paragraph when inlining <syntaxhight> tags?

Right now, if I do: Lorem ipsum dolor sit amet, <syntaxhighlight lang="c">#include <stdio.h></syntaxhighlight> elit. Pellentesque blandit suscipit accumsan.

The result is:

Lorem ipsum dolor sit amet,

#include <stdio.h>

elit. Pellentesque blandit suscipit accumsan.

As you can see the text within the tags gets it's own paragraph. I want it to be highlighted, but remain in the sentence.

Does this highlight Mediawiki code?

For example if I'm editing a page, does it highlight the standard Mediawiki code? Headings, bullets, templates, b old, italics, etc. --Choshi (talk) 14:23, 27 April 2014 (UTC)Reply

+1 Thats a big question. I also asked direct for years at https://sourceforge.net/projects/geshi/ for a Mediwiki syntax and they said they will do it. The name would be Creole (markup). -- Perhelion (talk) 18:42, 9 June 2014 (UTC)Reply
PS: Someone has already written this file here (2012) it need only be tested! -- Perhelion (talk) 18:54, 9 June 2014 (UTC)Reply

Does not work with MediaWiki 1.16.2 ?

Hello, ive got this error with MediaWiki 1.16.2 and the last version of this gadget :
Fatal error: Call to undefined method ParserOutput::addModuleStyles() in /ap01/appl/mediawiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php on line 122
Any idea ? Thanks in advance :) Haroun al Mouwahid (talk) 14:26, 6 July 2014 (UTC)Reply

Noone for helping me ? :) Haroun al Mouwahid (talk) 07:29, 10 July 2014 (UTC)Reply

Issue with html character codes &gt; &lt;

I've not got to the bottom of the reason, but < and > are being rendered as &lt; and &gt; and in the source they are &amp;lt; and &amp;gt;

I've fixed this with the lines:

		$out = Html::rawElement( $encloseTag, $attribs, $out );
		// have a bug showing < and > as &gt;/&lt;
		$out = str_replace( "&amp;gt;", '&gt;', $out );
		$out = str_replace( "&amp;lt;", '&lt;', $out );

These should be safe in all circumstances as that text string is almost never correct (except, oddly, in describing this issue!).

using 1.0.8.11-wmf1 (4959271) on:

MediaWiki 1.23.2
PHP 5.5.0 (cgi-fcgi)
MySQL 5.0.24-community-nt-log

--Hoggle42 (talk) 10:33, 4 December 2014 (UTC)Reply