Skip to main content

HighlightResult

                            
                              
                                interface 
                                HighlightResult
                              
                              

Describes the result of a highlight operation.

Properties

color

                            
                              
                                color
                                : 
                                
                                  
                                    
                                      null
                                    
                                    
                                      string
                                    
                                  
                                
                              
                              

The color of the code at the given index.


skipAhead

                            
                              
                                skipAhead
                                : 
                                number
                              
                              

The number of characters to skip ahead.

This should be used to skip to the end of the currently highlighted token.The returned style will be used for the skipped characters, and they willbe drawn as one continuous string keeping emojis and ligatures intact.

The returned value is the number of characters to skip ahead, not theindex of the end of the token.