Вход Регистрация
Файл: error-kitty/node_modules/highlight.js/lib/languages/nginx.js
Строк: 72
<?php
module
.exports = function(hljs) {
  var VAR = {
    
className'variable',
    
variants: [
      {
begin: /$d+/},
      {
begin: /${/, end: /}/},
      {
begin'[\$\@]' hljs.UNDERSCORE_IDENT_RE}
    ]
  };
  var DEFAULT = {
    
endsWithParenttrue,
    
lexemes'[a-z/_]+',
    
keywords: {
      
built_in:
        
'on off yes no true false none blocked debug info notice warn error crit ' +
        
'select break last permanent redirect kqueue rtsig epoll poll /dev/poll'
    
},
    
relevance0,
    
illegal'=>',
    
contains: [
      
hljs.HASH_COMMENT_MODE,
      {
        
className'string',
        
contains: [hljs.BACKSLASH_ESCAPE, VAR],
        
variants: [
          {
begin: /"/, end: /"/},
          {
begin: /'/, end: /'/}
        ]
      },
      {
        
className'url',
        
begin'([a-z]+):/'end'\s'endsWithParenttrueexcludeEndtrue,
        
contains: [VAR]
      },
      {
        
className'regexp',
        
contains: [hljs.BACKSLASH_ESCAPE, VAR],
        
variants: [
          {
begin"\s\^"end"\s|{|;"returnEndtrue},
          
// regexp locations (~, ~*)
          
{begin"~\*?\s+"end"\s|{|;"returnEndtrue},
          
// *.example.com
          
{begin"\*(\.[a-z\-]+)+"},
          
// sub.example.*
          
{begin"([a-z\-]+\.)+\*"}
        ]
      },
      
// IP
      
{
        
className'number',
        
begin'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b'
      
},
      
// units
      
{
        
className'number',
        
begin'\b\d+[kKmMgGdshdwy]*\b',
        
relevance0
      
},
      VAR
    ]
  };

  return {
    
aliases: ['nginxconf'],
    
contains: [
      
hljs.HASH_COMMENT_MODE,
      {
        
beginhljs.UNDERSCORE_IDENT_RE '\s'end';|{'returnBegintrue,
        
contains: [
          {
            
className'title',
            
beginhljs.UNDERSCORE_IDENT_RE,
            
starts: DEFAULT
          }
        ],
        
relevance0
      
}
    ],
    
illegal'[^\s\}]'
  
};
};
?>
Онлайн: 0
Реклама