Patch #1091 2006-05-31 15:40

sethjackson

HTML lexer
Download
1091-HTML_lexer.patch (6.7 KB)
Category
Lexer
Status
Accepted
Close date
2006-06-05 09:44
Assigned to
 
Index: src/sdk/resources/lexers/lexer_html.sample
===================================================================
--- src/sdk/resources/lexers/lexer_html.sample    (revision 0)
+++ src/sdk/resources/lexers/lexer_html.sample    (revision 0)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+                      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+    <title>Exapmle</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  </head>
+  <body>
+    <div id="wrapper">
+      <div id="header">
+        &nbsp;
+      </div>
+      <!-- end #header -->
+      <div id="navigation">
+        &nbsp;
+      </div>
+      <!-- end #navigation -->
+      <div id="content">
+        <p>
+          Loreum ipsum.
+        </p>
+      </div>
+      <!-- end #content -->
+      <div id="footer">
+        <p>
+          &copy; 2006 Code::Blocks.
+        </p>
+      </div>
+      <!-- end #footer -->
+      <bad />
+    </div>
+  </body>
+</html>
Index: src/sdk/resources/lexers/lexer_html.xml
===================================================================
--- src/sdk/resources/lexers/lexer_html.xml    (revision 0)
+++ src/sdk/resources/lexers/lexer_html.xml    (revision 0)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_lexer_properties>
+<CodeBlocks_lexer_properties>
+        <Lexer name="HTML"
+                index="4"
+                filemasks="*.htm,*.html,*.xhtml">
+                <Style name="Default"
+                        index="0"
+                        fg="0,0,0"
+                        bg="255,255,255"
+                        bold="0"
+                        italics="0"
+                        underlined="0"/>
+                <Style name="Tag"
+                        index="1"
+                        fg="128,0,128"
+                        bold="1"/>
+                <Style name="Unknown tag"
+                        index="2"
+                        fg="255,0,0"
+                        bold="1"/>
+                <Style name="Attribute name"
+                        index="3"
+                        fg="0,0,0"
+                        bold="1"/>
+                <Style name="Unknown attribute"
+                        index="4"
+                        fg="255,0,0"
+                        bold="1"/>
+                <Style name="Attribute value"
+                        index="5,6,7,8"
+                        fg="0,0,255"/>
+                <Style name="Comment"
+                        index="9"
+                        fg="0,128,0"/>
+                <Style name="Entity"
+                        index="10"
+                        fg="255,69,0"
+                        bold="1"/>
+                <Style name="Tag end"
+                        index="11"
+                        fg="0,0,0"/>
+                <Style name="XML Start"
+                        index="12"
+                        fg="128,0,128"/>
+                <Style name="XML End"
+                        index="13"
+                        fg="128,0,128"/>
+                <Style name="CDATA Section"
+                        index="17"
+                        fg="0,0,0"
+                        italics="1"/>
+                <Keywords>
+                        <!-- HTML elements and attributes -->
+                        <Set index="0"
+                            value="a abbr acronym address applet area b base basefont
+                                   bdo big blockquote body br button caption center
+                                   cite code col colgroup dd del dfn dir div dl dt em
+                                   fieldset font form frame frameset h1 h2 h3 h4 h5 h6
+                                   head hr html i iframe img input ins isindex kbd label
+                                   legend li link map menu meta noframes noscript
+                                   object ol optgroup option p param pre q s samp
+                                   script select small span strike strong style sub sup
+                                   table tbody td textarea tfoot th thead title tr tt u ul
+                                   var xml xmlns xml:lang
+                                   abbr accept-charset accept accesskey action align alink
+                                   alt archive axis background bgcolor border
+                                   cellpadding cellspacing char charoff charset checked cite
+                                   class classid clear codebase codetype color cols colspan
+                                   compact content coords
+                                   data datafld dataformatas datapagesize datasrc datetime
+                                   declare defer dir disabled enctype event
+                                   face for frame frameborder
+                                   headers height href hreflang hspace http-eq
download for full patch...
sethjackson 2006-05-31 15:41

I have seperated the XML and HTML lexing. I hope this is Ok. :)