📄 actiprosoftware.html.xml
字号:
<SyntaxLanguage Key="HTML" LanguageDefinitionVersion="4.0" Secure="True"
SyntaxLanguageTypeName="CodeHighlighterTest.HtmlDynamicSyntaxLanguage, CodeHighlighterTest"
xmlns="http://ActiproSoftware/SyntaxEditor/4.0/LanguageDefinition">
<!-- String Properties -->
<Properties>
<Property Key="Creator" Value="Actipro Software LLC" />
<Property Key="Copyright" Value="Copyright (c) 2001-2006 Actipro Software LLC. All rights reserved." />
</Properties>
<!-- Triggers -->
<Triggers>
<KeyPressTrigger Key="TagListTrigger" Character="<">
<KeyPressTriggerValidStates>
<KeyPressTriggerValidState State="DefaultState" />
</KeyPressTriggerValidStates>
</KeyPressTrigger>
<KeyPressTrigger Key="TagAutoCompleteTrigger" Character=">">
<KeyPressTriggerValidStates>
<KeyPressTriggerValidState State="StartTagState" />
<KeyPressTriggerValidState State="StartTagAttributeState" />
<KeyPressTriggerValidState State="StartTagAttributeValueState" />
</KeyPressTriggerValidStates>
</KeyPressTrigger>
<KeyPressTrigger Key="TagAttributeListTrigger" Character=" ">
<KeyPressTriggerValidStates>
<KeyPressTriggerValidState State="StartTagState" />
<KeyPressTriggerValidState State="StartTagAttributeState" />
<KeyPressTriggerValidState State="StartTagAttributeValueState" />
</KeyPressTriggerValidStates>
</KeyPressTrigger>
<KeyPressTrigger Key="TagAttributeValueListTrigger" Character="=">
<KeyPressTriggerValidStates>
<KeyPressTriggerValidState State="StartTagAttributeState" />
</KeyPressTriggerValidStates>
</KeyPressTrigger>
</Triggers>
<!-- Highlighting Styles -->
<Styles>
<Style Key="DefaultStyle" ForeColor="Black" />
<Style Key="EntityStyle" ForeColor="Red" />
<Style Key="TagDelimiterStyle" ForeColor="Blue" />
<Style Key="TagNameStyle" ForeColor="Maroon" />
<Style Key="TagAttributeStyle" ForeColor="Red" />
<Style Key="TagAttributeValueStyle" ForeColor="Blue" />
<Style Key="CommentDelimiterStyle" ForeColor="Green" />
<Style Key="CommentDefaultStyle" ForeColor="Green" />
<Style Key="ProcessingInstructionDelimiterStyle" ForeColor="Blue" />
<Style Key="ProcessingInstructionDefaultStyle" ForeColor="Magenta" />
<Style Key="DeclarationDelimiterStyle" ForeColor="Blue" />
<Style Key="DeclarationDefaultStyle" ForeColor="Magenta" />
<Style Key="ASPDelimiterStyle" ForeColor="Black" BackColor="Yellow" />
</Styles>
<!-- Macros -->
<Macros>
<!-- Redefine word macros to include hyphens -->
<Macro Key="WordMacro" Value="[a-zA-Z_0-9\-]" />
<Macro Key="NonWordMacro" Value="[^a-zA-Z_0-9\-]" />
<!-- Tag name macro to include hyphens and colons -->
<Macro Key="TagNameMacro" Value="[a-zA-Z_0-9\-:]" />
</Macros>
<!-- States -->
<States>
<!-- Text -->
<State Key="DefaultState">
<!-- Patterns Groups -->
<PatternGroups>
<!-- Entities -->
<RegexPatternGroup TokenKey="EntityToken" Style="EntityStyle" PatternValue="& {WordMacro}+ ;?" />
<!-- Identifier -->
<RegexPatternGroup TokenKey="IdentifierToken" PatternValue="{AlphaMacro}({WordMacro})*" />
<!-- Whitespace -->
<RegexPatternGroup TokenKey="WhitespaceToken" PatternValue="{WhitespaceMacro}+" IsWhitespace="True" />
</PatternGroups>
<!-- Child States -->
<ChildStates>
<ChildState Key="EndTagState" />
<ChildState Key="CommentState" />
<ChildState Key="DeclarationState" />
<ChildState Key="ProcessingInstructionState" />
<ChildState Key="ASPDirectiveResponseWriteState" />
<ChildState Key="ASPDirectiveCodeState" />
<ChildState Key="StyleStartTagState" />
<ChildState Key="VBScriptStartTagState" />
<ChildState Key="JScriptStartTagState" />
<ChildState Key="StartTagState" />
</ChildStates>
</State>
<!-- Start Tags -->
<State Key="StartTagState" TokenKey="StartTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="<" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? >" />
</Scope>
</Scopes>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
<!-- Start Tag Attributes -->
<State Key="StartTagAttributeState" TokenKey="StartTagDefaultToken" Style="TagAttributeStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<RegexPatternGroup Type="StartScope" TokenKey="StartTagNameToken" Style="TagNameStyle" PatternValue="{LineTerminatorWhitespaceMacro}* {TagNameMacro}+ {LineTerminatorWhitespaceMacro}*" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<!-- Brackets -->
<RegexPatternGroup TokenKey="StartTagAttributeToken" Style="TagAttributeStyle" LookAhead="{NonWordMacro}|\z" PatternValue="{WordMacro}+" />
</PatternGroups>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeStringValueState" />
<ChildState Key="StartTagAttributeValueState" />
</ChildStates>
</State>
<!-- Start Tag Attribute Values -->
<State Key="StartTagAttributeValueState" TokenKey="StartTagAttributeValueDefaultToken" Style="TagAttributeValueStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<RegexPatternGroup Type="StartScope" TokenKey="StartTagAttributeValueStartToken" Style="TagAttributeValueStyle" PatternValue="= {LineTerminatorWhitespaceMacro}*" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagAttributeValueEndToken" Style="TagAttributeValueStyle" PatternValue="{LineTerminatorWhitespaceMacro}+" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="StartTagAttributeValueDefaultToken" PatternValue="{WordMacro}+" />
</PatternGroups>
</State>
<!-- Start Tag Attribute String Values -->
<State Key="StartTagAttributeStringValueState" TokenKey="StartTagAttributeStringValueDefaultToken" Style="TagAttributeValueStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<RegexPatternGroup Type="StartScope" TokenKey="StartTagAttributeStringValueStartToken" Style="TagAttributeValueStyle" PatternValue="= {LineTerminatorWhitespaceMacro}* \"" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagAttributeStringValueEndToken" Style="TagAttributeValueStyle" PatternValue="\"" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="StartTagAttributeStringValueDefaultToken" PatternValue="[^"]+" />
</PatternGroups>
</State>
<!-- End Tags -->
<State Key="EndTagState" TokenKey="EndTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="</" />
<ExplicitPatternGroup Type="EndScope" TokenKey="EndTagEndToken" Style="TagDelimiterStyle" PatternValue=">" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="EndTagDefaultToken" PatternValue="[^>]+" />
</PatternGroups>
</State>
<!-- ASP Response.Write Block -->
<State Key="ASPDirectiveResponseWriteState" Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="ASPDirectiveStartToken" Style="ASPDelimiterStyle" PatternValue="<%" LookAhead="=" />
<ExplicitPatternGroup Type="EndScope" TokenKey="ASPDirectiveEndToken" Style="ASPDelimiterStyle" PatternValue="%>" />
</Scope>
</Scopes>
</State>
<!-- ASP Code Block -->
<State Key="ASPDirectiveCodeState" Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="ASPDirectiveStartToken" Style="ASPDelimiterStyle" PatternValue="<%" />
<ExplicitPatternGroup Type="EndScope" TokenKey="ASPDirectiveEndToken" Style="ASPDelimiterStyle" PatternValue="%>" />
</Scope>
</Scopes>
</State>
<!-- Style Start Tags -->
<State Key="StyleStartTagState" TokenKey="StyleStartTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="<" LookAhead="style" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? >"/>
<StateTransition Filename="ActiproSoftware.CSS.xml" ChildLanguageBackColor="WhiteSmoke">
<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="</" LookAhead="style" />
</StateTransition>
</Scope>
</Scopes>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
<!-- JScript Start Tags -->
<State Key="JScriptStartTagState" TokenKey="JScriptStartTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="<" LookAhead="script" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? >" />
<StateTransition Filename="ActiproSoftware.JScript.xml" ChildLanguageBackColor="WhiteSmoke">
<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="</" LookAhead="script" />
</StateTransition>
</Scope>
</Scopes>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
<!-- VBScript Start Tags -->
<State Key="VBScriptStartTagState" TokenKey="StartTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="<" LookAhead="script {LineTerminatorWhitespaceMacro}* language=\" ("VBS" | "VBScript")" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? >" />
<StateTransition Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="</" LookAhead="script" />
</StateTransition>
</Scope>
</Scopes>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
<!-- Comments -->
<State Key="CommentState" TokenKey="CommentDefaultToken" Style="CommentDefaultStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="CommentStartToken" Style="CommentDelimiterStyle" PatternValue="<!--" />
<ExplicitPatternGroup Type="EndScope" TokenKey="CommentEndToken" Style="CommentDelimiterStyle" PatternValue="-->" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="CommentDefaultToken" PatternValue="[^\-]+" />
</PatternGroups>
</State>
<!-- Processing Instructions -->
<State Key="ProcessingInstructionState" TokenKey="ProcessingInstructionDefaultToken" Style="ProcessingInstructionDefaultStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="ProcessingInstructionStartToken" Style="ProcessingInstructionDelimiterStyle" PatternValue="<?" />
<ExplicitPatternGroup Type="EndScope" TokenKey="ProcessingInstructionEndToken" Style="ProcessingInstructionDelimiterStyle" PatternValue="?>" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="ProcessingInstructionDefaultToken" PatternValue="[^\?]+" />
</PatternGroups>
</State>
<!-- Declarations -->
<State Key="DeclarationState" TokenKey="DeclarationDefaultToken" Style="DeclarationDefaultStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="DeclarationStartToken" Style="DeclarationDelimiterStyle" PatternValue="<!" />
<ExplicitPatternGroup Type="EndScope" TokenKey="DeclarationEndToken" Style="DeclarationDelimiterStyle" PatternValue=">" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="DeclarationDefaultToken" PatternValue="[^>]+" />
</PatternGroups>
</State>
</States>
<!-- Example Text -->
<ExampleText>
<![CDATA[
<html>
<head>
<title>This is a title.</title>
<style>
/* CSS Block */
a { color: Red; }
</style>
</head>
<body background="Background.gif" text="Black">
<script language="JScript">
// JScript block
for (int i = 0; i < 3; i++)
window.alert('This is some JScript code: ' + i);
</script>
<script language="VBScript">
'VBScript block
Dim i
For i = 0 To 3
window.alert("This is some VBScript code: " & CStr(i));
Next
</script>
<%
'ASP Block
Dim i
For i = 1 To 100
Response.Write("Item " & CStr(i) & vbCRLF)
Next
%>
Entity test: & > : Test over
<singlevals>
<a href="http://www.actiprosoftware.com" target="_top" />
</singlevals>
</body>
</html>
<!-- This is a comment -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<?xml version="1.0" encoding="utf-8" ?>
]]>
</ExampleText>
</SyntaxLanguage>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -