httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elu...@apache.org
Subject svn commit: r1808224 - in /httpd/httpd/trunk/docs/manual/style: css/prettify.css scripts/prettify.js scripts/prettify.min.js
Date Wed, 13 Sep 2017 09:54:37 GMT
Author: elukey
Date: Wed Sep 13 09:54:37 2017
New Revision: 1808224

URL: http://svn.apache.org/viewvc?rev=1808224&view=rev
Log:
docs: allow Directive/<Directive> naming in prettify.js/css

Creditis to Humbedooh for all the work.


Modified:
    httpd/httpd/trunk/docs/manual/style/css/prettify.css
    httpd/httpd/trunk/docs/manual/style/scripts/prettify.js
    httpd/httpd/trunk/docs/manual/style/scripts/prettify.min.js

Modified: httpd/httpd/trunk/docs/manual/style/css/prettify.css
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/css/prettify.css?rev=1808224&r1=1808223&r2=1808224&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/css/prettify.css (original)
+++ httpd/httpd/trunk/docs/manual/style/css/prettify.css Wed Sep 13 09:54:37 2017
@@ -119,3 +119,7 @@ pre.lang-perl{
 .lang-perl .str { color: #009606 } /* string content */
 .lang-perl .kwd { color: #00C; font-weight: bold }  /* a keyword */
 .lang-perl .typ { color: #808 }  /* a type name */
+
+.hidden {
+  display: none;
+}
\ No newline at end of file

Modified: httpd/httpd/trunk/docs/manual/style/scripts/prettify.js
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/scripts/prettify.js?rev=1808224&r1=1808223&r2=1808224&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/scripts/prettify.js (original)
+++ httpd/httpd/trunk/docs/manual/style/scripts/prettify.js Wed Sep 13 09:54:37 2017
@@ -350,7 +350,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?
       // -> [[1, 12], [14, 14], [16, 17]]
       ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
       var consolidatedRanges = [];
-      var lastRange = [];
+      var lastRange = [0,0];
       for (var i = 0; i < ranges.length; ++i) {
         var range = ranges[i];
         if (range[0] <= lastRange[1] + 1) {
@@ -917,7 +917,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?
         [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*|\bNULL\b/i, null],
         [PR_LITERAL,     CONFIG_OPTIONS, null],
         //[PR_STRING,     CONFIG_ENVS, null],
-        [PR_TAG,     /^\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion|SSLPolicy|ManagedDomain)\b/,
null],
+        [PR_TAG,     /^<\/?\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion|SSLPolicy|ManagedDomain).*?>/,
null],
         [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req|module)\b)/, null],
         [PR_TAG,     /^apr_[a-z_0-9]+|ap_[a-z_0-9]+/i, null],
         [PR_PLAIN,       /^[a-z_$][a-z_$@0-9\-]*/i, null],
@@ -1188,7 +1188,10 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?
           textNode.nodeValue = styledText;
           var document = textNode.ownerDocument;
           var span = document.createElement('span');
-          span.className = decorations[decorationIndex + 1];
+          // prettify may break locally and make duplicates.
+          // These don't have a className, so we'll simply hide them
+          // by defaulting to 'hidden' class.
+          span.className = decorations[decorationIndex + 1] || "hidden"; 
           var parentNode = textNode.parentNode;
           parentNode.replaceChild(span, textNode);
           span.appendChild(textNode);

Modified: httpd/httpd/trunk/docs/manual/style/scripts/prettify.min.js
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/scripts/prettify.min.js?rev=1808224&r1=1808223&r2=1808224&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/scripts/prettify.min.js (original)
+++ httpd/httpd/trunk/docs/manual/style/scripts/prettify.min.js Wed Sep 13 09:54:37 2017
@@ -15,7 +15,7 @@ function caseFoldCharset(charSet){var ch
 for(var i=inverse?1:0,n=charsetParts.length;i<n;++i){var p=charsetParts[i];if(/\\[bdsw]/i.test(p)){out.push(p);}else{var
start=decodeEscape(p);var end;if(i+2<n&&'-'===charsetParts[i+1]){end=decodeEscape(charsetParts[i+2]);i+=2;}else{end=start;}
 ranges.push([start,end]);if(!(end<65||start>122)){if(!(end<65||start>90)){ranges.push([Math.max(65,start)|32,Math.min(end,90)|32]);}
 if(!(end<97||start>122)){ranges.push([Math.max(97,start)&~32,Math.min(end,122)&~32]);}}}}
-ranges.sort(function(a,b){return(a[0]-b[0])||(b[1]-a[1]);});var consolidatedRanges=[];var
lastRange=[];for(var i=0;i<ranges.length;++i){var range=ranges[i];if(range[0]<=lastRange[1]+1){lastRange[1]=Math.max(lastRange[1],range[1]);}else{consolidatedRanges.push(lastRange=range);}}
+ranges.sort(function(a,b){return(a[0]-b[0])||(b[1]-a[1]);});var consolidatedRanges=[];var
lastRange=[0,0];for(var i=0;i<ranges.length;++i){var range=ranges[i];if(range[0]<=lastRange[1]+1){lastRange[1]=Math.max(lastRange[1],range[1]);}else{consolidatedRanges.push(lastRange=range);}}
 for(var i=0;i<consolidatedRanges.length;++i){var range=consolidatedRanges[i];out.push(encodeEscape(range[0]));if(range[1]>range[0]){if(range[1]+1>range[0]){out.push('-');}
 out.push(encodeEscape(range[1]));}}
 out.push(']');return out.join('');}
@@ -71,7 +71,7 @@ var types=options['types'];if(types){fal
 if(options['strings']){var strings=(""+options['strings']).replace(/^ | $/g,'').replace(/-/g,'\\-');fallthroughStylePatterns.push([PR_STRING,new
RegExp('(?:'+strings.replace(/[\s,]+/g,'|')+')'),,null]);}
 var keywords=(""+options['keywords']).replace(/^ | $/g,'');if(keywords.length){fallthroughStylePatterns.push([PR_KEYWORD,new
RegExp('^(?:'+keywords.replace(/[\s,]+/g,'|')+')\\b'),null]);}
 shortcutStylePatterns.push([PR_PLAIN,/^\s+/,null,' \r\n\t\xA0']);if(options['httpdComments']){fallthroughStylePatterns.push([PR_PLAIN,/^.*\S.*#/i,null]);}
-fallthroughStylePatterns.push([PR_LITERAL,/^@[a-z_$][a-z_$@0-9]*|\bNULL\b/i,null],[PR_LITERAL,CONFIG_OPTIONS,null],[PR_TAG,/^\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion|SSLPolicy|ManagedDomain)\b/,null],[PR_TYPE,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req|module)\b)/,null],[PR_TAG,/^apr_[a-z_0-9]+|ap_[a-z_0-9]+/i,null],[PR_PLAIN,/^[a-z_$][a-z_$@0-9\-]*/i,null],[PR_LITERAL,new
RegExp('^(?:'
+fallthroughStylePatterns.push([PR_LITERAL,/^@[a-z_$][a-z_$@0-9]*|\bNULL\b/i,null],[PR_LITERAL,CONFIG_OPTIONS,null],[PR_TAG,/^<\/?\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion|SSLPolicy|ManagedDomain).*?>/,null],[PR_TYPE,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req|module)\b)/,null],[PR_TAG,/^apr_[a-z_0-9]+|ap_[a-z_0-9]+/i,null],[PR_PLAIN,/^[a-z_$][a-z_$@0-9\-]*/i,null],[PR_LITERAL,new
RegExp('^(?:'
 +'0x[a-f0-9]+'
 +'|[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+'
 +'|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
@@ -100,7 +100,7 @@ decorations[decPos++]=startPos;decoratio
 nDecorations=decorations.length=decPos;var sourceNode=job.sourceNode;var oldDisplay;if(sourceNode){oldDisplay=sourceNode.style.display;sourceNode.style.display='none';}
 try{var decoration=null;var X=0;while(spanIndex<nSpans){X=X+1;if(X>5000){break;}
 var spanStart=spans[spanIndex];var spanEnd=spans[spanIndex+2]||sourceLength;var decEnd=decorations[decorationIndex+2]||sourceLength;var
end=Math.min(spanEnd,decEnd);var textNode=spans[spanIndex+1];var styledText;if(textNode.nodeType!==1&&(styledText=source.substring(sourceIndex,end))){if(isIE8OrEarlier){styledText=styledText.replace(newlineRe,'\r');}
-textNode.nodeValue=styledText;var document=textNode.ownerDocument;var span=document.createElement('span');span.className=decorations[decorationIndex+1];var
parentNode=textNode.parentNode;parentNode.replaceChild(span,textNode);span.appendChild(textNode);if(sourceIndex<spanEnd){spans[spanIndex+1]=textNode=document.createTextNode(source.substring(end,spanEnd));parentNode.insertBefore(textNode,span.nextSibling);}}
+textNode.nodeValue=styledText;var document=textNode.ownerDocument;var span=document.createElement('span');span.className=decorations[decorationIndex+1]||"hidden";var
parentNode=textNode.parentNode;parentNode.replaceChild(span,textNode);span.appendChild(textNode);if(sourceIndex<spanEnd){spans[spanIndex+1]=textNode=document.createTextNode(source.substring(end,spanEnd));parentNode.insertBefore(textNode,span.nextSibling);}}
 sourceIndex=end;if(sourceIndex>=spanEnd){spanIndex+=2;}
 if(sourceIndex>=decEnd){decorationIndex+=2;}}}finally{if(sourceNode){sourceNode.style.display=oldDisplay;}}}
 var langHandlerRegistry={};function registerLangHandler(handler,fileExtensions){for(var i=fileExtensions.length;--i>=0;){var
ext=fileExtensions[i];if(!langHandlerRegistry.hasOwnProperty(ext)){langHandlerRegistry[ext]=handler;}else
if(win['console']){console['warn']('cannot override language handler %s',ext);}}}



Mime
View raw message