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.documentTypeattribute. If no match is found, the scheme wherescheme.documentType = "Text"is used. - Schemes can be nested if they specify
blockStart…blockEndpairs. All nestable schemes that have the current file extension listed in one of theblockStart.doctypesattribute are enabled for the current file and all others are disabled.NOTE
All
blockStart/blockEndcombinations should be unique.Schemes can nest within another scheme only if the
scheme.priorityis 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
blockStartstrings, Adobe Dreamweaver always uses the longest match. - After reaching the
blockEndstring for the current scheme, syntax coloring returns to the state where theblockStartstring is detected. For example, if a<%...%>block is found within an HTML string, then coloring resumes with the HTML string color.