mirror of
				https://github.com/cmur2/joe-syntax.git
				synced 2025-11-03 18:25:08 +01:00 
			
		
		
		
	Made CSS parser <?php?> aware when in html/php files
The HTML highlighter (called from php.jsf) will "inherit" the php-flag to css.jsf so it calls php.jsf again on <?php?>.
This commit is contained in:
		
							
								
								
									
										20
									
								
								css.jsf
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								css.jsf
									
									
									
									
									
								
							@@ -13,6 +13,9 @@
 | 
				
			|||||||
=Keyword  bold
 | 
					=Keyword  bold
 | 
				
			||||||
=HTML
 | 
					=HTML
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# from html.jsf to support <?php?>
 | 
				
			||||||
 | 
					=TagEdge        green
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:begin Idle
 | 
					:begin Idle
 | 
				
			||||||
	*	begin	noeat call=.css()
 | 
						*	begin	noeat call=.css()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -24,15 +27,26 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:reset HTML
 | 
					:reset HTML
 | 
				
			||||||
	*		  reset
 | 
						*		  reset
 | 
				
			||||||
	"<"	maybe_done
 | 
						"<"	maybe_done recolor=-1
 | 
				
			||||||
	"/"		slash
 | 
						"/"		slash
 | 
				
			||||||
	"#"   id_block recolor=-1
 | 
						"#"   id_block recolor=-1
 | 
				
			||||||
	"."   class_block recolor=-1
 | 
						"."   class_block recolor=-1
 | 
				
			||||||
	"a-zA-Z"  tag_block recolor=-1
 | 
						"a-zA-Z"  tag_block recolor=-1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:maybe_done HTML
 | 
					:maybe_done TagEdge
 | 
				
			||||||
	*	reset noeat
 | 
						*	reset_html noeat
 | 
				
			||||||
	"/"	reset noeat return recolor=-2
 | 
						"/"	reset noeat return recolor=-2
 | 
				
			||||||
 | 
					.ifdef php
 | 
				
			||||||
 | 
						"?%"	rtn_php call=php.php()
 | 
				
			||||||
 | 
					.endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# fix needed to produce similar output without php
 | 
				
			||||||
 | 
					:reset_html HTML
 | 
				
			||||||
 | 
						*	reset	noeat recolor=-2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# this state allows php and perl to recolor the ?> %> or &> properly.
 | 
				
			||||||
 | 
					:rtn_php TagEdge
 | 
				
			||||||
 | 
						*	reset noeat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:slash Idle
 | 
					:slash Idle
 | 
				
			||||||
	*		reset		noeat
 | 
						*		reset		noeat
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								html.jsf
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								html.jsf
									
									
									
									
									
								
							@@ -204,7 +204,11 @@ done
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:ytag_value TagValue
 | 
					:ytag_value TagValue
 | 
				
			||||||
	*			ytag_idle noeat recolor=-1
 | 
						*			ytag_idle noeat recolor=-1
 | 
				
			||||||
 | 
						"-A-Za-z0-9._:"		ytag_value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:ytag_end TagEdge
 | 
				
			||||||
.ifdef php
 | 
					.ifdef php
 | 
				
			||||||
 | 
						*	tag_begin	call=css.css(php)
 | 
				
			||||||
.else
 | 
					.else
 | 
				
			||||||
	*	tag_begin	call=css.css()
 | 
						*	tag_begin	call=css.css()
 | 
				
			||||||
.endif
 | 
					.endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user