From Bluefish Wiki
Jump to: navigation, search

this page is updated for Manual 2. It needs to be verified! once you have verified this page (and corrected if necessary) please modify the status to v (verified), i.e. st=v (see Guidelines for Writing this Manual)

Man2 icon 48.png
Chapter XII. Development guidelines
6. Bflang



<element pattern="//" highlight="php-comment">
	<context id="c.php.short.linecomment" symbols="?&gt;&#10;&#13;" highlight="php-comment">
<!-- dos has \r\n -> we should never end a pattern between these two chars  -->
		<element pattern="(&#10;|&#13;|&#13;&#10;)" is_regex="1" ends_context="1" />
		<element pattern="?&gt;" ends_context="2" ends_block="1" blockstartelement="" highlight="php-block-tag" mayfold="1" />
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends 
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
<element pattern="#" highlight="php-comment">
	<context idref="c.php.short.linecomment"/>


a pattern like: -?[0-9]+ fails, and [0-9]+(\.[0-9]+)? fails too.
we need:

  • [0-9]+\.[0-9]+
  • -[0-9]+\.[0-9]+
  • [0-9]+
  • -[0-9]+

5. New files
Home | ToC
 7. Patches