Check alle échte Black Friday-deals Ook zo moe van nepaanbiedingen? Wij laten alleen échte deals zien

[Feat] syntax highlighter alias voor xhtml?

Pagina: 1
Acties:

  • BasieP
  • Registratie: Oktober 2000
  • Laatst online: 19-10 08:18
een korte request, maar je kan wel code=html en code=xml doen, maar geen code=xhtml
opzich geen super belangrijk iets, maar xhtml wordt toch echt als wat anders dan html geprofileerd (vooral hier op got), zodoende zou het ook een eigen highlighter moeten hebben (of iig een alias)

This message was sent on 100% recyclable electrons.


  • Snake
  • Registratie: Juli 2005
  • Laatst online: 07-03-2024

Snake

Los Angeles, CA, USA

* Snake is voor
ik script zelf ook altijd in XHTML (ik vind het nu eenmaal goed dat ieder tag een close tag heeft).En het is handig hier op GoT.

[ Voor 4% gewijzigd door Snake op 24-04-2007 21:07 ]

Going for adventure, lots of sun and a convertible! | GMT-8


  • Victor
  • Registratie: November 2003
  • Niet online
Waarom niet gewoon de XML highlighter gebruiken? XHTML is nou eenmaal XML.

  • Snake
  • Registratie: Juli 2005
  • Laatst online: 07-03-2024

Snake

Los Angeles, CA, USA

King_Louie schreef op dinsdag 24 april 2007 @ 21:08:
Waarom niet gewoon de XML highlighter gebruiken? XHTML is nou eenmaal XML.
XML:
1
2
3
4
5
6
7
8
<html>
   <head>
      <title>test</title>
   </head>
   <body>
      <div class="sinterklaas">test</div>
   </body>
</html>

Geeft niet zo mooie kleurtjes :P

Going for adventure, lots of sun and a convertible! | GMT-8


  • Victor
  • Registratie: November 2003
  • Niet online
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Foobar</title>

        <style type="text/css">
            html {
                font: 11px Arial, Sans-Serif;
            }

            p.foobar {
                color: #f00;
            }
        </style>

        <script type="application/x-javascript">
            alert("foobar");
        </script>
    </head>

    <body>
        <h1>Foobar</h1>
        <p class="foobar">Oh noes!</p>
    </body>
</html>


HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
    <head>
        <title>Foobar</title>

        <style type="text/css">
            html {
                font: 11px Arial, Sans-Serif;
            }

            p.foobar {
                color: #f00;
            }
        </style>

        <script type="application/x-javascript">
            alert("foobar");
        </script>
    </head>

    <body>
        <h1>Foobar</h1>
        <p class="foobar">Oh noes!</p>
    </body>
</html>


Zo te zien wordt alleen de syntax highlighting voor JavaScript en CSS niet herkend in een XML code block.

  • crisp
  • Registratie: Februari 2000
  • Laatst online: 11:06

crisp

Devver

Pixelated

Omdat XHTML in 99% van de gevallen op het web toch als text/html wordt verstuurd en dus door browsers gewoon als HTML wordt geinterpreteerd geeft [code=html] de juiste highlighting :P

Als HTML5 REC wordt dan overweeg ik wel verschillende highlighters voor de HTML- en de XML-serialisatie ;)

[ Voor 24% gewijzigd door crisp op 25-04-2007 01:26 ]

Intentionally left blank


  • BasieP
  • Registratie: Oktober 2000
  • Laatst online: 19-10 08:18
ik dacht idd ook aan een alias naar html ipv xml
XHTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
    <head>
        <title>Foobar</title>

        <style type="text/css">
            html {
                font: 11px Arial, Sans-Serif;
            }

            p.foobar {
                color: #f00;
            }
        </style>

        <script type="application/x-javascript">
            alert("foobar");
        </script>
    </head>

    <body>
        <h1>Foobar</h1>
        <p class="foobar">Oh noes!</p>
    </body>
</html>

This message was sent on 100% recyclable electrons.

Pagina: 1