Help talk:GeSHi: Difference between revisions

From Rosetta Code
Content added Content deleted
(suggestion)
Line 19: Line 19:


[[User:NevilleDNZ|NevilleDNZ]] 05:43, 23 February 2008 (MST)
[[User:NevilleDNZ|NevilleDNZ]] 05:43, 23 February 2008 (MST)
=== Suggestion x 2===
Hi!<br>
Currently, it seems D's (also others, like Java, C etc.) syntax coloring high-light a Statement keyword by color #b1b100,eg:<br>
<code><span style="color: #b1b100;"> return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>&nbsp;;</code><br>
It may be only me, it will be looked better if a darker color is used for Statement keyword, eg. that of <span style="color: #993333;">int</span> keyword (#993333):<br>
<code><span style="color: #993333;"> return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>&nbsp;;</code><br>
or, in similar but darker color(#666600):<br>
<code><span style="color: #666600;"> return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>&nbsp;;</code><br>
Besides, the origianl <code>&lt;pre></code> tag allowed attribute modifying, eg.<code>&lt;pre style="background-color:#ffe"></code>. But the syntax coloring tag will remove it, eg. <code>&lt;d style="background-color:#ffe"></code> => <code>&lt;pre class="d"></code>. It seems the ''class'' is redundant as coloring is already applied. It will be nice that the syntax coloring tag can be more flexible.<br>
Thank you. -- [[User:Badmadevil|badmadevil]] 02:40, 29 February 2008 (MST)

Revision as of 09:40, 29 February 2008

Suggestion

Hello.
I would suggest that any <pre> editing effect, ie.causing a <pre> pair to be inserted in the result html page, under a language header {{header|LANG_TAG}} be automatic converted to the corresponding language syntax highlight( LANG_TAG ) effect, so that any further conversion is not need. New code may still use old style editing.
Is it feasible?-badmadevil 02:36, 23 February 2008 (MST)
EXAMPLE:
{{header|C}}
<pre>
printf("Hello, World!") ;
</pre>
Result HTML page display as
{{header|C}}
<C>
printf("Hello, World!") ;
</C>

This is a good idea... saddly my PHP is non existent so I can not write the code at this point. Do you know anyone that could write this kind of filter? I also wonder if an undesirable side effect would be that <pre>date</pre> and <pre>output</pre> would get unexpectedly converted/formated as C code.

I will continue the evaluation, maybe by the end of this I will have an understanding and can do the coding easily, or... know the ramifications of why we shouldn't.

NevilleDNZ 05:43, 23 February 2008 (MST)

Suggestion x 2

Hi!
Currently, it seems D's (also others, like Java, C etc.) syntax coloring high-light a Statement keyword by color #b1b100,eg:
return new int[] ;
It may be only me, it will be looked better if a darker color is used for Statement keyword, eg. that of int keyword (#993333):
return new int[] ;
or, in similar but darker color(#666600):
return new int[] ;
Besides, the origianl <pre> tag allowed attribute modifying, eg.<pre style="background-color:#ffe">. But the syntax coloring tag will remove it, eg. <d style="background-color:#ffe"> => <pre class="d">. It seems the class is redundant as coloring is already applied. It will be nice that the syntax coloring tag can be more flexible.
Thank you. -- badmadevil 02:40, 29 February 2008 (MST)