Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DEB079FC0 for ; Wed, 25 Apr 2012 08:33:55 +0000 (UTC) Received: (qmail 28846 invoked by uid 500); 25 Apr 2012 08:33:55 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 28788 invoked by uid 500); 25 Apr 2012 08:33:55 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 28764 invoked by uid 99); 25 Apr 2012 08:33:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 08:33:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 08:33:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7B78323888CD; Wed, 25 Apr 2012 08:33:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1330154 - /httpd/httpd/trunk/docs/manual/style/scripts/prettify.js Date: Wed, 25 Apr 2012 08:33:31 -0000 To: cvs@httpd.apache.org From: humbedooh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120425083331.7B78323888CD@eris.apache.org> Author: humbedooh Date: Wed Apr 25 08:33:31 2012 New Revision: 1330154 URL: http://svn.apache.org/viewvc?rev=1330154&view=rev Log: Identify Apache specific functions and constants in C. Treat true and false as boolean types (not keywords) in Lua. Modified: httpd/httpd/trunk/docs/manual/style/scripts/prettify.js 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=1330154&r1=1330153&r2=1330154&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/style/scripts/prettify.js (original) +++ httpd/httpd/trunk/docs/manual/style/scripts/prettify.js Wed Apr 25 08:33:31 2012 @@ -887,7 +887,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.? fallthroughStylePatterns.push( // TODO(mikesamuel): recognize non-latin letters and numerals in idents [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*|NULL/i, null], + [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req)\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( @@ -1263,7 +1265,8 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.? 'keywords': CPP_KEYWORDS, 'hashComments': true, 'cStyleComments': true, - 'types': C_TYPES + 'types': C_TYPES, + 'functions': "apr_[a-z_]+,ap_rputs" }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']); registerLangHandler(sourceDecorator({ 'keywords': 'null,true,false' @@ -1537,10 +1540,10 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.? // A comment is either a line comment that starts with two dashes, or // two dashes preceding a long bracketed block. [PR['PR_COMMENT'], /^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/], - [PR['PR_TYPE'], /^nil/], + [PR['PR_TYPE'], /^nil|false|true/], // A long bracketed block not preceded by -- is a string. [PR['PR_STRING'], /^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/], - [PR['PR_KEYWORD'], /^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|not|or|repeat|return|then|true|until|while)\b/, null], + [PR['PR_KEYWORD'], /^(?:and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/, null], // A number is a hex integer literal, a decimal real literal, or in // scientific notation. [PR['PR_LITERAL'],