Scheme precedence
Adobe Dreamweaver uses the following algorithm to color text syntax in Code view:
- Adobe Dreamweaver determines the initial syntax scheme based on the document type of the current file. The file document type is matched against the
scheme.documentType
attribute. If no match is found, the scheme wherescheme.documentType = "Text"
is used. - Schemes can be nested if they specify
blockStart
…blockEnd
pairs. All nestable schemes that have the current file extension listed in one of theblockStart.doctypes
attribute are enabled for the current file and all others are disabled.NOTE
All
blockStart/blockEnd
combinations should be unique.Schemes can nest within another scheme only if the
scheme.priority
is equal to or greater than the outer scheme. If the priority is equal, the scheme can nest only in the body state of the outer scheme. For example, the<script>...</script>
block can nest only inside the<html>...</html>
block where tags are legal--not inside a tag, attribute, string, comment, and so on.Schemes with a higher priority than the outer scheme can nest almost anywhere within the outer scheme. For example, in addition to nesting in the body state of the
<html>...</html>
block, the<%...%>
block can also nest inside a tag, attribute, string, comment, and so on.The maximum nesting level is 4.
- When matching
blockStart
strings, Adobe Dreamweaver always uses the longest match. - After reaching the
blockEnd
string for the current scheme, syntax coloring returns to the state where theblockStart
string is detected. For example, if a<%...%>
block is found within an HTML string, then coloring resumes with the HTML string color.