Moved static highlighting rule function to CodeBlockUtils class

@Benglin PTAL