├── .dockerignore ├── .jshintignore ├── .npmrc ├── .gitignore ├── template ├── img │ └── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── vendor │ ├── prettify │ │ ├── prettify.css │ │ ├── lang-rd.js │ │ ├── lang-latex.js │ │ ├── lang-tex.js │ │ ├── lang-go.js │ │ ├── lang-proto.js │ │ ├── lang-ll.js │ │ ├── lang-llvm.js │ │ ├── lang-yaml.js │ │ ├── lang-yml.js │ │ ├── lang-cbm.js │ │ ├── lang-basic.js │ │ ├── lang-wiki.js │ │ ├── lang-lua.js │ │ ├── lang-erl.js │ │ ├── lang-erlang.js │ │ ├── lang-hs.js │ │ ├── lang-tcl.js │ │ ├── lang-pascal.js │ │ ├── lang-r.js │ │ ├── lang-s.js │ │ ├── lang-Splus.js │ │ ├── lang-cl.js │ │ ├── lang-el.js │ │ ├── lang-ss.js │ │ ├── lang-lisp.js │ │ ├── lang-lsp.js │ │ ├── lang-rkt.js │ │ ├── lang-scm.js │ │ ├── lang-lgt.js │ │ ├── lang-logtalk.js │ │ ├── lang-clj.js │ │ ├── lang-mumps.js │ │ ├── lang-css.js │ │ ├── lang-scala.js │ │ ├── lang-aea.js │ │ ├── lang-agc.js │ │ ├── lang-apollo.js │ │ ├── lang-dart.js │ │ ├── lang-fs.js │ │ ├── lang-ml.js │ │ ├── lang-swift.js │ │ ├── lang-vhd.js │ │ ├── lang-vhdl.js │ │ ├── lang-n.js │ │ ├── lang-nemerle.js │ │ ├── lang-rust.js │ │ ├── lang-sql.js │ │ ├── lang-vb.js │ │ ├── lang-vbs.js │ │ ├── lang-lasso.js │ │ ├── lang-ls.js │ │ └── lang-lassoscript.js │ ├── path-to-regexp │ │ ├── LICENSE │ │ └── index.js │ ├── prettify.css │ └── polyfill.js ├── locales │ ├── zh.js │ ├── zh_cn.js │ ├── tr.js │ ├── pl.js │ ├── ca.js │ ├── vi.js │ ├── cs.js │ ├── de.js │ ├── ro.js │ ├── ru.js │ ├── pt_br.js │ ├── es.js │ ├── nl.js │ ├── fr.js │ ├── it.js │ └── locale.js └── utils │ └── send_sample_request_utils.js ├── .npmignore ├── .travis.yml ├── test ├── multi_input_folder │ ├── testproject │ │ ├── apidoc.json │ │ ├── folder1 │ │ │ ├── AuthHeader.js │ │ │ └── DefaultErrors.js │ │ ├── folder2 │ │ │ └── History.js │ │ └── src │ │ │ └── test_api.js │ └── fixtures │ │ ├── index.html │ │ ├── api_project.json │ │ ├── api_project.js │ │ ├── api_data.json │ │ └── api_data.js ├── template │ └── index.html ├── fixtures │ └── custom_markdown_parser.js ├── multi_input_folder_test.js ├── custom_markdown_parser_test.js ├── apidoc_test.js └── template_tests.js ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── CONTRIBUTORS.md ├── .editorconfig ├── CONTRIBUTING.md ├── example ├── apidoc.json ├── header.md ├── footer.md ├── _apidoc.js └── example.js ├── Dockerfile ├── LICENSE ├── MARKDOWN.md ├── package.json ├── template-single └── build-single.sh ├── README.md ├── bin └── apidoc └── lib ├── package_info.js └── index.js /.dockerignore: -------------------------------------------------------------------------------- 1 | # Ignore everything 2 | ** 3 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | test/multi_input_folder/fixtures -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | doc/ 2 | docker-example/ 3 | node_modules/ 4 | tmp/ 5 | npm-debug.log 6 | .idea 7 | -------------------------------------------------------------------------------- /template/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/apidoc/master/template/img/favicon.ico -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | node_modules/ 3 | test/ 4 | tmp/ 5 | .gitignore 6 | .npmignore 7 | .travis.yml 8 | npm-debug.log 9 | -------------------------------------------------------------------------------- /template/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/apidoc/master/template/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /template/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/apidoc/master/template/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /template/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/apidoc/master/template/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /template/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/apidoc/master/template/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - 12 5 | - 11 6 | - 10 7 | - 8 8 | before_script: 9 | - npm install -g grunt-cli 10 | -------------------------------------------------------------------------------- /test/multi_input_folder/testproject/apidoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Multiple Input Folder Test", 3 | "version": "1.0.0", 4 | "description": "Example of feeding apidoc from multiple input folder locations" 5 | } 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Make sure to read [the contributing documentation](https://github.com/apidoc/apidoc/blob/master/CONTRIBUTING.md). 2 | 3 | IMPORTANT: Base your PR off the 'dev' branch and target that branch for merging. 4 | -------------------------------------------------------------------------------- /test/multi_input_folder/testproject/folder1/AuthHeader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @apiDefine AuthHeader 3 | * @apiHeader {String} Authorization Auth header with JWT Token 4 | * 5 | * @apiHeaderExample {String} Authorization-Example: 6 | * Authorization: Bearer 7 | */ -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Feature request 4 | about: I have a suggestion! 5 | 6 | --- 7 | 8 | # Feature request 9 | 10 | 11 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # apiDoc Contributors 2 | 3 | Thanks to all people that helped to make apiDoc better! 4 | 5 | You can find a list of contributors to the code here: 6 | https://github.com/apidoc/apidoc/graphs/contributors 7 | 8 | Note that opening issues and discussing about features is also a meaningful contribution! 9 | -------------------------------------------------------------------------------- /test/template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | apiDoc 5 | 6 | 7 | 8 | 9 | 10 | Empty Test Template. 11 | 12 | 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.js,*.json] 13 | indent_size = 4 14 | 15 | [*.html] 16 | indent_size = 2 17 | 18 | [*.css] 19 | indent_size = 2 20 | -------------------------------------------------------------------------------- /test/multi_input_folder/fixtures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | apiDoc 5 | 6 | 7 | 8 | 9 | 10 | Empty Test Template. 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/multi_input_folder/testproject/folder2/History.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @api {get} /api/subscriptioninfo/:userid 3 | * @apiVersion 0.2.0 4 | * 5 | * @apiDescription Get the subscription information for a user. 6 | * 7 | * @apiParam {Number} userid user id 8 | * 9 | * @apiGroup Authentication 10 | * @apiName GetSubscriptionInfo 11 | * 12 | * @apiUse InternalServerError 13 | */ -------------------------------------------------------------------------------- /test/multi_input_folder/fixtures/api_project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Multiple Input Folder Test", 3 | "version": "1.0.0", 4 | "description": "Example of feeding apidoc from multiple input folder locations", 5 | "sampleUrl": false, 6 | "defaultVersion": "0.0.0", 7 | "apidoc": "0.3.0", 8 | "generator": { 9 | "name": "apidoc", 10 | "time": "2017-01-13T17:59:32.277Z", 11 | "url": "http://apidocjs.com", 12 | "version": "0.16.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/multi_input_folder/fixtures/api_project.js: -------------------------------------------------------------------------------- 1 | define({ 2 | "name": "Multiple Input Folder Test", 3 | "version": "1.0.0", 4 | "description": "Example of feeding apidoc from multiple input folder locations", 5 | "sampleUrl": false, 6 | "defaultVersion": "0.0.0", 7 | "apidoc": "0.3.0", 8 | "generator": { 9 | "name": "apidoc", 10 | "time": "2017-01-13T17:59:32.277Z", 11 | "url": "http://apidocjs.com", 12 | "version": "0.16.1" 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to apidoc 2 | 3 | ## Contributing to the code 4 | 5 | ### Branches 6 | 7 | The "master" branch is the stable released version. The "dev" branch is where the development happens. 8 | 9 | * Base your work on the "dev" branch 10 | * Target the "dev" branch for your PR 11 | 12 | ### Tests 13 | 14 | * Make sure to run the tests with "npm test" 15 | * Add new tests if you add new code 16 | 17 | ### i18n 18 | 19 | Language files are located in `template/locales`. 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Bug report 4 | about: If something isn't working as expected. 5 | 6 | --- 7 | 8 | # Describe the bug 9 | 10 | 11 | 12 | 13 | # Steps to reproduce 14 | 15 | 16 | 17 | # Information 18 | 19 | - Version of apidoc: 20 | - Operating system (e.g. GNU+Linux/MacOS/Windows): 21 | - Browser (e.g. firefox, chrome): 22 | -------------------------------------------------------------------------------- /test/fixtures/custom_markdown_parser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Custom Markdown Parser example. 3 | */ 4 | function CustomMarkdownParser() { 5 | // Some init stuff. 6 | } 7 | 8 | /** 9 | * Exports. 10 | */ 11 | module.exports = CustomMarkdownParser; 12 | 13 | /** 14 | * Render a markdown Text to HTML. 15 | * 16 | * @param {String} text Markdown Text. 17 | * @returns {String} Converted HTML Text. 18 | */ 19 | CustomMarkdownParser.prototype.render = function(text) { 20 | // Here would be the markdown-Parser call. 21 | return 'Custom Markdown Parser: ' + text; 22 | }; 23 | -------------------------------------------------------------------------------- /example/apidoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AcmeCorp Api documentation", 3 | "version": "0.3.0", 4 | "description": "Documentation for the REST api access provided at AcmeCorp", 5 | "title": "Custom apiDoc browser title", 6 | "url" : "https://api.example.com", 7 | "sampleUrl": "https://apidoc.free.beeceptor.com", 8 | "header": { 9 | "title": "Introduction", 10 | "filename": "header.md" 11 | }, 12 | "footer": { 13 | "title": "Best practices", 14 | "filename": "footer.md" 15 | }, 16 | "template": { 17 | "withCompare": true, 18 | "withGenerator": true, 19 | "aloneDisplay": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /template/vendor/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /test/multi_input_folder/testproject/src/test_api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @api {post} /api/authenticate 3 | * @apiVersion 0.3.0 4 | * 5 | * @apiGroup Authentication 6 | * @apiName Authenticate 7 | * 8 | * @apiParam (Credentials) {String} username Username 9 | * @apiParam (Credentials) {String} password password 10 | * 11 | * @apiUse InternalServerError 12 | */ 13 | 14 | /** 15 | * @api {get} /api/subscriptioninfo 16 | * @apiVersion 0.3.0 17 | * 18 | * @apiDescription Get the subscription information from an authenticated user. 19 | * 20 | * 21 | * @apiGroup Authentication 22 | * @apiName GetSubscriptionInfo 23 | * 24 | * @apiUse AuthHeader 25 | * @apiUse InternalServerError 26 | */ 27 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for apidoc 2 | FROM node:12-alpine 3 | 4 | LABEL org.label-schema.name="apidoc" \ 5 | org.label-schema.description="apidoc Docker image" \ 6 | org.label-schema.url="http://apidocjs.com/" \ 7 | org.label-schema.vcs-url="https://github.com/apidoc/apidoc" \ 8 | org.label-schema.maintainer="rottmann@inveris.de" \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.docker.cmd="docker run --rm -v $(pwd):/home/node/apidoc apidoc/apidoc -o outputdir -i inputdir" 11 | 12 | ENV NPM_CONFIG_PREFIX=/home/node/.npm-global 13 | 14 | ENV PATH=$PATH:/home/node/.npm-global/bin 15 | 16 | USER node 17 | 18 | RUN mkdir -p /home/node/apidoc 19 | 20 | WORKDIR /home/node/apidoc 21 | 22 | RUN npm install --only=prod -g apidoc 23 | 24 | ENTRYPOINT ["apidoc"] 25 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-rd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[a-zA-Z@]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[{}()\[\]]+/]]),["Rd","rd"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-latex.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Martin S. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-tex.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Martin S. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-go.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])+(?:\'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\/\*[\s\S]*?\*\/)/],["pln",/^(?:[^\/\"\'`]|\/(?![\/\*]))+/i]]),["go"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2006 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 18 | -------------------------------------------------------------------------------- /test/multi_input_folder/testproject/folder1/DefaultErrors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @apiDefine Unauthorized 3 | * @apiError (401 Unauthorized) Unauthorized Invalid or missing Authorization 4 | * @apiErrorExample 401 Unauthorized: 5 | * HTTP/1.1 401 Unauthorized 6 | * { 7 | * "uri": "" 8 | * "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", 9 | * "title": "Unauthorized", 10 | * "status": 401, 11 | * "detail": "Invalid Authentication." 12 | * } 13 | */ 14 | 15 | /** 16 | * @apiDefine InternalServerError 17 | * @apiError (500 Internal Server Error) InternalServerError The server encountered an internal error 18 | * @apiErrorExample 500 Internal Server Error 19 | * HTTP/1.1 500 Internal Server Error 20 | * { 21 | * "uri": "", 22 | * "method": "", 23 | * "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", 24 | * "title": "Internal Server Error", 25 | * "status": 500, 26 | * "detail": "" 27 | * } 28 | */ -------------------------------------------------------------------------------- /template/vendor/prettify/lang-ll.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Nikhil Dabas 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-llvm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Nikhil Dabas 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); 18 | -------------------------------------------------------------------------------- /example/header.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This example documentation contains all the possible configuration options for apidoc. 4 | 5 | To generate this documentation: 6 | 7 | ```bash 8 | git clone https://github.com/apidoc/apidoc && cd apidoc 9 | npm install --prod 10 | ./bin/apidoc -i example -o /tmp/doc 11 | $BROWSER /tmp/doc 12 | ``` 13 | 14 | Note that this text is from the file "header.md". 15 | 16 | ## Adding a header 17 | 18 | In your projects "package.json" you can set "apidoc.header" with a title and a filename to include this file into your documentation. 19 | 20 | This example attempts to integrate "header.md" and "footer.md". 21 | 22 | { 23 | "name": "example", 24 | "version": "0.3.0", 25 | "description": "apidoc example project.", 26 | "apidoc": { 27 | "header": { 28 | "title": "Introduction", 29 | "filename": "header.md" 30 | }, 31 | "footer": { 32 | "title": "Best practices", 33 | "filename": "footer.md" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 ribrdb @ code.google.com 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", 18 | /^\w+/]]),["yaml","yml"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-yml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 ribrdb @ code.google.com 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", 18 | /^\w+/]]),["yaml","yml"]); 19 | -------------------------------------------------------------------------------- /template/locales/zh.js: -------------------------------------------------------------------------------- 1 | define({ 2 | zh: { 3 | 'Allowed values​​:' : '允許值:', 4 | 'Compare all with predecessor': '預先比較所有', 5 | 'compare changes to:' : '比較變更:', 6 | 'compared to' : '對比', 7 | 'Default value:' : '預設值:', 8 | 'Description' : '描述', 9 | 'Field' : '欄位', 10 | 'General' : '概括', 11 | 'Generated with' : '生成工具', 12 | 'Name' : '名稱', 13 | 'No response values​​.' : '無對應資料.', 14 | 'optional' : '選填', 15 | 'Parameter' : '參數', 16 | 'Permission:' : '權限:', 17 | 'Response' : '回應', 18 | 'Send' : '發送', 19 | 'Send a Sample Request' : '發送試用需求', 20 | 'show up to version:' : '顯示到版本:', 21 | 'Size range:' : '區間:', 22 | 'Type' : '類型', 23 | 'url' : '網址' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-cbm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, 18 | null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-basic.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, 18 | null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); 19 | -------------------------------------------------------------------------------- /template/vendor/path-to-regexp/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2017 inveris OHG 2 | Author Peter Rottmann 3 | Licensed under the MIT license. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-wiki.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]); 18 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lua.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i], 18 | ["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"]); 19 | -------------------------------------------------------------------------------- /template/locales/zh_cn.js: -------------------------------------------------------------------------------- 1 | define({ 2 | 'zh_cn': { 3 | 'Allowed values:' : '允许值:', 4 | 'Compare all with predecessor': '与所有较早的比较', 5 | 'compare changes to:' : '将当前版本与指定版本比较:', 6 | 'compared to' : '相比于', 7 | 'Default value:' : '默认值:', 8 | 'Description' : '描述', 9 | 'Field' : '字段', 10 | 'General' : '概要', 11 | 'Generated with' : '基于', 12 | 'Name' : '名称', 13 | 'No response values.' : '无返回值.', 14 | 'optional' : '可选', 15 | 'Parameter' : '参数', 16 | 'Parameters' : '参数', 17 | 'Headers' : '头部参数', 18 | 'Permission:' : '权限:', 19 | 'Response' : '返回', 20 | 'Send' : '发送', 21 | 'Send a Sample Request' : '发送示例请求', 22 | 'show up to version:' : '显示到指定版本:', 23 | 'Size range:' : '取值范围:', 24 | 'Type' : '类型', 25 | 'url' : '网址' 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-erl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Andrew Allen 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 18 | ["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-erlang.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Andrew Allen 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 18 | ["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, 18 | null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]); 19 | -------------------------------------------------------------------------------- /template/locales/tr.js: -------------------------------------------------------------------------------- 1 | define({ 2 | tr: { 3 | 'Allowed values:' : 'İzin verilen değerler:', 4 | 'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır', 5 | 'compare changes to:' : 'değişiklikleri karşılaştır:', 6 | 'compared to' : 'karşılaştır', 7 | 'Default value:' : 'Varsayılan değer:', 8 | 'Description' : 'Açıklama', 9 | 'Field' : 'Alan', 10 | 'General' : 'Genel', 11 | 'Generated with' : 'Oluşturan', 12 | 'Name' : 'İsim', 13 | 'No response values.' : 'Dönüş verisi yok.', 14 | 'optional' : 'opsiyonel', 15 | 'Parameter' : 'Parametre', 16 | 'Permission:' : 'İzin:', 17 | 'Response' : 'Dönüş', 18 | 'Send' : 'Gönder', 19 | 'Send a Sample Request' : 'Örnek istek gönder', 20 | 'show up to version:' : 'bu versiyona kadar göster:', 21 | 'Size range:' : 'Boyut aralığı:', 22 | 'Type' : 'Tip', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/pl.js: -------------------------------------------------------------------------------- 1 | define({ 2 | pl: { 3 | 'Allowed values:' : 'Dozwolone wartości:', 4 | 'Compare all with predecessor': 'Porównaj z poprzednimi wersjami', 5 | 'compare changes to:' : 'porównaj zmiany do:', 6 | 'compared to' : 'porównaj do:', 7 | 'Default value:' : 'Wartość domyślna:', 8 | 'Description' : 'Opis', 9 | 'Field' : 'Pole', 10 | 'General' : 'Generalnie', 11 | 'Generated with' : 'Wygenerowano z', 12 | 'Name' : 'Nazwa', 13 | 'No response values.' : 'Brak odpowiedzi.', 14 | 'optional' : 'opcjonalny', 15 | 'Parameter' : 'Parametr', 16 | 'Permission:' : 'Uprawnienia:', 17 | 'Response' : 'Odpowiedź', 18 | 'Send' : 'Wyślij', 19 | 'Send a Sample Request' : 'Wyślij przykładowe żądanie', 20 | 'show up to version:' : 'pokaż do wersji:', 21 | 'Size range:' : 'Zakres rozmiaru:', 22 | 'Type' : 'Typ', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/ca.js: -------------------------------------------------------------------------------- 1 | define({ 2 | ca: { 3 | 'Allowed values:' : 'Valors permesos:', 4 | 'Compare all with predecessor': 'Comparar tot amb versió anterior', 5 | 'compare changes to:' : 'comparar canvis amb:', 6 | 'compared to' : 'comparat amb', 7 | 'Default value:' : 'Valor per defecte:', 8 | 'Description' : 'Descripció', 9 | 'Field' : 'Camp', 10 | 'General' : 'General', 11 | 'Generated with' : 'Generat amb', 12 | 'Name' : 'Nom', 13 | 'No response values.' : 'Sense valors en la resposta.', 14 | 'optional' : 'opcional', 15 | 'Parameter' : 'Paràmetre', 16 | 'Permission:' : 'Permisos:', 17 | 'Response' : 'Resposta', 18 | 'Send' : 'Enviar', 19 | 'Send a Sample Request' : 'Enviar una petició d\'exemple', 20 | 'show up to version:' : 'mostrar versió:', 21 | 'Size range:' : 'Tamany de rang:', 22 | 'Type' : 'Tipus', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/vi.js: -------------------------------------------------------------------------------- 1 | define({ 2 | vi: { 3 | 'Allowed values:' : 'Giá trị chấp nhận:', 4 | 'Compare all with predecessor': 'So sánh với tất cả phiên bản trước', 5 | 'compare changes to:' : 'so sánh sự thay đổi với:', 6 | 'compared to' : 'so sánh với', 7 | 'Default value:' : 'Giá trị mặc định:', 8 | 'Description' : 'Chú thích', 9 | 'Field' : 'Trường dữ liệu', 10 | 'General' : 'Tổng quan', 11 | 'Generated with' : 'Được tạo bởi', 12 | 'Name' : 'Tên', 13 | 'No response values.' : 'Không có kết quả trả về.', 14 | 'optional' : 'Tùy chọn', 15 | 'Parameter' : 'Tham số', 16 | 'Permission:' : 'Quyền hạn:', 17 | 'Response' : 'Kết quả', 18 | 'Send' : 'Gửi', 19 | 'Send a Sample Request' : 'Gửi một yêu cầu mẫu', 20 | 'show up to version:' : 'hiển thị phiên bản:', 21 | 'Size range:' : 'Kích cỡ:', 22 | 'Type' : 'Kiểu', 23 | 'url' : 'liên kết' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/cs.js: -------------------------------------------------------------------------------- 1 | define({ 2 | cs: { 3 | 'Allowed values:' : 'Povolené hodnoty:', 4 | 'Compare all with predecessor': 'Porovnat vše s předchozími verzemi', 5 | 'compare changes to:' : 'porovnat změny s:', 6 | 'compared to' : 'porovnat s', 7 | 'Default value:' : 'Výchozí hodnota:', 8 | 'Description' : 'Popis', 9 | 'Field' : 'Pole', 10 | 'General' : 'Obecné', 11 | 'Generated with' : 'Vygenerováno pomocí', 12 | 'Name' : 'Název', 13 | 'No response values.' : 'Nebyly vráceny žádné hodnoty.', 14 | 'optional' : 'volitelné', 15 | 'Parameter' : 'Parametr', 16 | 'Permission:' : 'Oprávnění:', 17 | 'Response' : 'Odpověď', 18 | 'Send' : 'Odeslat', 19 | 'Send a Sample Request' : 'Odeslat ukázkový požadavek', 20 | 'show up to version:' : 'zobrazit po verzi:', 21 | 'Size range:' : 'Rozsah velikosti:', 22 | 'Type' : 'Typ', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-tcl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Pyrios 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\{+/,null,"{"],["clo",/^\}+/,null,"}"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i], 18 | ["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["tcl"]); 19 | -------------------------------------------------------------------------------- /template/locales/de.js: -------------------------------------------------------------------------------- 1 | define({ 2 | de: { 3 | 'Allowed values:' : 'Erlaubte Werte:', 4 | 'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern', 5 | 'compare changes to:' : 'vergleiche Änderungen mit:', 6 | 'compared to' : 'verglichen mit', 7 | 'Default value:' : 'Standardwert:', 8 | 'Description' : 'Beschreibung', 9 | 'Field' : 'Feld', 10 | 'General' : 'Allgemein', 11 | 'Generated with' : 'Erstellt mit', 12 | 'Name' : 'Name', 13 | 'No response values.' : 'Keine Rückgabewerte.', 14 | 'optional' : 'optional', 15 | 'Parameter' : 'Parameter', 16 | 'Permission:' : 'Berechtigung:', 17 | 'Response' : 'Antwort', 18 | 'Send' : 'Senden', 19 | 'Send a Sample Request' : 'Eine Beispielanfrage senden', 20 | 'show up to version:' : 'zeige bis zur Version:', 21 | 'Size range:' : 'Größenbereich:', 22 | 'Type' : 'Typ', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/ro.js: -------------------------------------------------------------------------------- 1 | define({ 2 | ro: { 3 | 'Allowed values:' : 'Valori permise:', 4 | 'Compare all with predecessor': 'Compară toate cu versiunea precedentă', 5 | 'compare changes to:' : 'compară cu versiunea:', 6 | 'compared to' : 'comparat cu', 7 | 'Default value:' : 'Valoare implicită:', 8 | 'Description' : 'Descriere', 9 | 'Field' : 'Câmp', 10 | 'General' : 'General', 11 | 'Generated with' : 'Generat cu', 12 | 'Name' : 'Nume', 13 | 'No response values.' : 'Nici o valoare returnată.', 14 | 'optional' : 'opțional', 15 | 'Parameter' : 'Parametru', 16 | 'Permission:' : 'Permisiune:', 17 | 'Response' : 'Răspuns', 18 | 'Send' : 'Trimite', 19 | 'Send a Sample Request' : 'Trimite o cerere de probă', 20 | 'show up to version:' : 'arată până la versiunea:', 21 | 'Size range:' : 'Interval permis:', 22 | 'Type' : 'Tip', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/ru.js: -------------------------------------------------------------------------------- 1 | define({ 2 | ru: { 3 | 'Allowed values:' : 'Допустимые значения:', 4 | 'Compare all with predecessor': 'Сравнить с предыдущей версией', 5 | 'compare changes to:' : 'сравнить с:', 6 | 'compared to' : 'в сравнении с', 7 | 'Default value:' : 'По умолчанию:', 8 | 'Description' : 'Описание', 9 | 'Field' : 'Название', 10 | 'General' : 'Общая информация', 11 | 'Generated with' : 'Сгенерировано с помощью', 12 | 'Name' : 'Название', 13 | 'No response values.' : 'Нет значений для ответа.', 14 | 'optional' : 'необязательный', 15 | 'Parameter' : 'Параметр', 16 | 'Permission:' : 'Разрешено:', 17 | 'Response' : 'Ответ', 18 | 'Send' : 'Отправить', 19 | 'Send a Sample Request' : 'Отправить тестовый запрос', 20 | 'show up to version:' : 'показать версию:', 21 | 'Size range:' : 'Ограничения:', 22 | 'Type' : 'Тип', 23 | 'url' : 'URL' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/pt_br.js: -------------------------------------------------------------------------------- 1 | define({ 2 | 'pt_br': { 3 | 'Allowed values:' : 'Valores permitidos:', 4 | 'Compare all with predecessor': 'Compare todos com antecessores', 5 | 'compare changes to:' : 'comparar alterações com:', 6 | 'compared to' : 'comparado com', 7 | 'Default value:' : 'Valor padrão:', 8 | 'Description' : 'Descrição', 9 | 'Field' : 'Campo', 10 | 'General' : 'Geral', 11 | 'Generated with' : 'Gerado com', 12 | 'Name' : 'Nome', 13 | 'No response values.' : 'Sem valores de resposta.', 14 | 'optional' : 'opcional', 15 | 'Parameter' : 'Parâmetro', 16 | 'Permission:' : 'Permissão:', 17 | 'Response' : 'Resposta', 18 | 'Send' : 'Enviar', 19 | 'Send a Sample Request' : 'Enviar um Exemplo de Pedido', 20 | 'show up to version:' : 'aparecer para a versão:', 21 | 'Size range:' : 'Faixa de tamanho:', 22 | 'Type' : 'Tipo', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/es.js: -------------------------------------------------------------------------------- 1 | define({ 2 | es: { 3 | 'Allowed values:' : 'Valores permitidos:', 4 | 'Compare all with predecessor': 'Comparar todo con versión anterior', 5 | 'compare changes to:' : 'comparar cambios con:', 6 | 'compared to' : 'comparado con', 7 | 'Default value:' : 'Valor por defecto:', 8 | 'Description' : 'Descripción', 9 | 'Field' : 'Campo', 10 | 'General' : 'General', 11 | 'Generated with' : 'Generado con', 12 | 'Name' : 'Nombre', 13 | 'No response values.' : 'Sin valores en la respuesta.', 14 | 'optional' : 'opcional', 15 | 'Parameter' : 'Parámetro', 16 | 'Permission:' : 'Permisos:', 17 | 'Response' : 'Respuesta', 18 | 'Send' : 'Enviar', 19 | 'Send a Sample Request' : 'Enviar una petición de ejemplo', 20 | 'show up to version:' : 'mostrar a versión:', 21 | 'Size range:' : 'Tamaño de rango:', 22 | 'Type' : 'Tipo', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/nl.js: -------------------------------------------------------------------------------- 1 | define({ 2 | nl: { 3 | 'Allowed values:' : 'Toegestane waarden:', 4 | 'Compare all with predecessor': 'Vergelijk alle met voorgaande versie', 5 | 'compare changes to:' : 'vergelijk veranderingen met:', 6 | 'compared to' : 'vergelijk met', 7 | 'Default value:' : 'Standaard waarde:', 8 | 'Description' : 'Omschrijving', 9 | 'Field' : 'Veld', 10 | 'General' : 'Algemeen', 11 | 'Generated with' : 'Gegenereerd met', 12 | 'Name' : 'Naam', 13 | 'No response values.' : 'Geen response waardes.', 14 | 'optional' : 'optioneel', 15 | 'Parameter' : 'Parameter', 16 | 'Permission:' : 'Permissie:', 17 | 'Response' : 'Antwoorden', 18 | 'Send' : 'Sturen', 19 | 'Send a Sample Request' : 'Stuur een sample aanvragen', 20 | 'show up to version:' : 'toon tot en met versie:', 21 | 'Size range:' : 'Maatbereik:', 22 | 'Type' : 'Type', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/fr.js: -------------------------------------------------------------------------------- 1 | define({ 2 | fr: { 3 | 'Allowed values:' : 'Valeurs autorisées :', 4 | 'Compare all with predecessor': 'Tout comparer avec ...', 5 | 'compare changes to:' : 'comparer les changements à :', 6 | 'compared to' : 'comparer à', 7 | 'Default value:' : 'Valeur par défaut :', 8 | 'Description' : 'Description', 9 | 'Field' : 'Champ', 10 | 'General' : 'Général', 11 | 'Generated with' : 'Généré avec', 12 | 'Name' : 'Nom', 13 | 'No response values.' : 'Aucune valeur de réponse.', 14 | 'optional' : 'optionnel', 15 | 'Parameter' : 'Paramètre', 16 | 'Permission:' : 'Permission :', 17 | 'Response' : 'Réponse', 18 | 'Send' : 'Envoyer', 19 | 'Send a Sample Request' : 'Envoyer une requête représentative', 20 | 'show up to version:' : 'Montrer à partir de la version :', 21 | 'Size range:' : 'Ordre de grandeur :', 22 | 'Type' : 'Type', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/locales/it.js: -------------------------------------------------------------------------------- 1 | define({ 2 | it: { 3 | 'Allowed values:' : 'Valori permessi:', 4 | 'Compare all with predecessor': 'Confronta tutto con versioni precedenti', 5 | 'compare changes to:' : 'confronta modifiche con:', 6 | 'compared to' : 'confrontato con', 7 | 'Default value:' : 'Valore predefinito:', 8 | 'Description' : 'Descrizione', 9 | 'Field' : 'Campo', 10 | 'General' : 'Generale', 11 | 'Generated with' : 'Creato con', 12 | 'Name' : 'Nome', 13 | 'No response values.' : 'Nessun valore di risposta.', 14 | 'optional' : 'opzionale', 15 | 'Parameter' : 'Parametro', 16 | 'Permission:' : 'Permessi:', 17 | 'Response' : 'Risposta', 18 | 'Send' : 'Invia', 19 | 'Send a Sample Request' : 'Invia una richiesta di esempio', 20 | 'show up to version:' : 'mostra alla versione:', 21 | 'Size range:' : 'Intervallo dimensione:', 22 | 'Type' : 'Tipo', 23 | 'url' : 'url' 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-pascal.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/,null,"'"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^\(\*[\s\S]*?(?:\*\)|$)|^\{[\s\S]*?(?:\}|$)/,null],["kwd",/^(?:ABSOLUTE|AND|ARRAY|ASM|ASSEMBLER|BEGIN|CASE|CONST|CONSTRUCTOR|DESTRUCTOR|DIV|DO|DOWNTO|ELSE|END|EXTERNAL|FOR|FORWARD|FUNCTION|GOTO|IF|IMPLEMENTATION|IN|INLINE|INTERFACE|INTERRUPT|LABEL|MOD|NOT|OBJECT|OF|OR|PACKED|PROCEDURE|PROGRAM|RECORD|REPEAT|SET|SHL|SHR|THEN|TO|TYPE|UNIT|UNTIL|USES|VAR|VIRTUAL|WHILE|WITH|XOR)\b/i, 18 | null],["lit",/^(?:true|false|self|nil)/i,null],["pln",/^[a-z][a-z0-9]*/i,null],["lit",/^(?:\$[a-f0-9]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?)/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\/]*/,null]]),["pascal"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-r.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-s.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-Splus.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-cl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-el.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-ss.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lsp.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-rkt.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-scm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /template/locales/locale.js: -------------------------------------------------------------------------------- 1 | define([ 2 | './locales/ca.js', 3 | './locales/cs.js', 4 | './locales/de.js', 5 | './locales/es.js', 6 | './locales/fr.js', 7 | './locales/it.js', 8 | './locales/nl.js', 9 | './locales/pl.js', 10 | './locales/pt_br.js', 11 | './locales/ro.js', 12 | './locales/ru.js', 13 | './locales/tr.js', 14 | './locales/vi.js', 15 | './locales/zh.js', 16 | './locales/zh_cn.js' 17 | ], function() { 18 | var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_'); 19 | var language = langId.substr(0, 2); 20 | var locales = {}; 21 | 22 | for (index in arguments) { 23 | for (property in arguments[index]) 24 | locales[property] = arguments[index][property]; 25 | } 26 | if ( ! locales['en']) 27 | locales['en'] = {}; 28 | 29 | if ( ! locales[langId] && ! locales[language]) 30 | language = 'en'; 31 | 32 | var locale = (locales[langId] ? locales[langId] : locales[language]); 33 | 34 | function __(text) { 35 | var index = locale[text]; 36 | if (index === undefined) 37 | return text; 38 | return index; 39 | }; 40 | 41 | function setLanguage(language) { 42 | locale = locales[language]; 43 | } 44 | 45 | return { 46 | __ : __, 47 | locales : locales, 48 | locale : locale, 49 | setLanguage: setLanguage 50 | }; 51 | }); 52 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lgt.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2014 Paulo Moura 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], 18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-logtalk.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2014 Paulo Moura 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], 18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[\(\{\[]+/,null,"([{"],["clo",/^[\)\}\]]+/,null,")]}"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, 17 | null],["typ",/^:[0-9a-zA-Z\-]+/]]),["clj"]); 18 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-mumps.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Kitware Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"]|\\.)*")/,null,'"']],[["com",/^;[^\r\n]*/,null,";"],["dec",/^(?:\$(?:D|DEVICE|EC|ECODE|ES|ESTACK|ET|ETRAP|H|HOROLOG|I|IO|J|JOB|K|KEY|P|PRINCIPAL|Q|QUIT|ST|STACK|S|STORAGE|SY|SYSTEM|T|TEST|TL|TLEVEL|TR|TRESTART|X|Y|Z[A-Z]*|A|ASCII|C|CHAR|D|DATA|E|EXTRACT|F|FIND|FN|FNUMBER|G|GET|J|JUSTIFY|L|LENGTH|NA|NAME|O|ORDER|P|PIECE|QL|QLENGTH|QS|QSUBSCRIPT|Q|QUERY|R|RANDOM|RE|REVERSE|S|SELECT|ST|STACK|T|TEXT|TR|TRANSLATE|NaN))\b/i, 18 | null],["kwd",/^(?:[^\$]B|BREAK|C|CLOSE|D|DO|E|ELSE|F|FOR|G|GOTO|H|HALT|H|HANG|I|IF|J|JOB|K|KILL|L|LOCK|M|MERGE|N|NEW|O|OPEN|Q|QUIT|R|READ|S|SET|TC|TCOMMIT|TRE|TRESTART|TRO|TROLLBACK|TS|TSTART|U|USE|V|VIEW|W|WRITE|X|XECUTE)\b/i,null],["lit",/^[+-]?(?:(?:\.\d+|\d+(?:\.\d*)?)(?:E[+\-]?\d+)?)/i],["pln",/^[a-z][a-zA-Z0-9]*/i],["pun",/^[^\w\t\n\r\xA0\"\$;%\^]|_/]]),["mumps"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']+)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], 18 | ["com",/^(?:\x3c!--|--\x3e)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}\b/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-scala.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], 18 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-aea.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-agc.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-apollo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-dart.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!(?:.*)/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/(?:.*)/],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|sync|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], 18 | ["typ",/^\b(?:bool|double|Dynamic|int|num|Object|String|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?[\']{3}[\s|\S]*?[^\\][\']{3}/],["str",/^r?[\"]{3}[\s|\S]*?[^\\][\"]{3}/],["str",/^r?\'(\'|(?:[^\n\r\f])*?[^\\]\')/],["str",/^r?\"(\"|(?:[^\n\r\f])*?[^\\]\")/],["typ",/^[A-Z]\w*/],["pln",/^[a-z_$][a-z0-9_]*/i],["pun",/^[~!%^&*+=|?:<>/-]/],["lit",/^\b0x[0-9a-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit", 19 | /^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(){}\[\],.;]/]]),["dart"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-fs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 18 | ["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-ml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 18 | ["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); 19 | -------------------------------------------------------------------------------- /MARKDOWN.md: -------------------------------------------------------------------------------- 1 | # Markdown Parser 2 | 3 | By default apiDoc uses [markdown-it](https://github.com/markdown-it/markdown-it) Markdown Parser. 4 | 5 | If you need to modify the parser options or use an other markdown parser, create a .js file with a custom parser. 6 | 7 | Visit the markdown-it page for details, in particular if you want to use markdown plugins. 8 | 9 | 10 | ## Custom Parser 11 | 12 | `apidoc --markdown /path/to/a/custom_markdown_parser.js` 13 | 14 | Your custom parser must return a class with a render-method. 15 | 16 | 17 | 18 | ## Examples 19 | 20 | ### With "markdown-it" Markdown Parser. 21 | 22 | ```js 23 | var Markdown = require('markdown-it'); 24 | 25 | function CustomMarkdownParser() { 26 | this.markdownParser = new Markdown({ 27 | breaks : false, 28 | html : true, 29 | linkify : true, 30 | typographer: false 31 | }); 32 | } 33 | 34 | module.exports = CustomMarkdownParser; 35 | 36 | CustomMarkdownParser.prototype.render = function(text) { 37 | return this.markdownParser.render(text); 38 | }; 39 | ``` 40 | 41 | 42 | 43 | ### With "marked" Markdown Parser. 44 | 45 | **marked seemed to be outdated and has currently a security issue, please use it not anymore in production.** 46 | This is only an demo. 47 | 48 | ```js 49 | var markdownParser = require('marked'); 50 | 51 | function CustomMarkdownParser() { 52 | markdownParser.setOptions({ 53 | gfm : true, 54 | tables : true, 55 | breaks : false, 56 | pedantic : false, 57 | sanitize : false, 58 | smartLists : false, 59 | smartypants: false 60 | }); 61 | } 62 | 63 | module.exports = CustomMarkdownParser; 64 | 65 | CustomMarkdownParser.prototype.render = function(text) { 66 | return markdownParser(text); 67 | }; 68 | ``` 69 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-swift.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 Google Inc. 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | */ 15 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \n\r\t\v\f\0]+/,null," \n\r\t\v\f\x00"],["str",/^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/,null,'"']],[["lit",/^(?:(?:0x[\da-fA-F][\da-fA-F_]*\.[\da-fA-F][\da-fA-F_]*[pP]?)|(?:\d[\d_]*\.\d[\d_]*[eE]?))[+-]?\d[\d_]*/,null],["lit",/^-?(?:(?:0(?:(?:b[01][01_]*)|(?:o[0-7][0-7_]*)|(?:x[\da-fA-F][\da-fA-F_]*)))|(?:\d[\d_]*))/,null],["lit",/^(?:true|false|nil)\b/,null],["kwd",/^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|#available|#else|#elseif|#endif|#if|#line|arch|arm|arm64|associativity|as|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|dynamicType|else|enum|fallthrough|final|for|func|get|import|indirect|infix|init|inout|internal|i386|if|in|iOS|iOSApplicationExtension|is|lazy|left|let|mutating|none|nonmutating|operator|optional|OSX|OSXApplicationExtension|override|postfix|precedence|prefix|private|protocol|Protocol|public|required|rethrows|return|right|safe|self|set|static|struct|subscript|super|switch|throw|try|Type|typealias|unowned|unsafe|var|weak|watchOS|while|willSet|x86_64)\b/, 16 | null],["com",/^\/\/.*?[\n\r]/,null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["pun",/^<<=|<=|<<|>>=|>=|>>|===|==|\.\.\.|&&=|\.\.<|!==|!=|&=|~=|~|\(|\)|\[|\]|{|}|@|#|;|\.|,|:|\|\|=|\?\?|\|\||&&|&\*|&\+|&-|&=|\+=|-=|\/=|\*=|\^=|%=|\|=|->|`|==|\+\+|--|\/|\+|!|\*|%|<|>|&|\||\^|\?|=|-|_/,null],["typ",/^\b(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null]]),["swift"]); 17 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-vhd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 benoit@ryder.fr 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], 19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 benoit@ryder.fr 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], 19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Zimin A.V. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, 18 | null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 19 | null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-nemerle.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Zimin A.V. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, 18 | null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 19 | null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | /* Vim sunburst theme by David Leibovic */ 3 | 4 | pre .str, code .str { color: #65B042; } /* string - green */ 5 | pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */ 6 | pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */ 7 | pre .typ, code .typ { color: #89bdff; } /* type - light blue */ 8 | pre .lit, code .lit { color: #3387CC; } /* literal - blue */ 9 | pre .pun, code .pun { color: #fff; } /* punctuation - white */ 10 | pre .pln, code .pln { color: #fff; } /* plaintext - white */ 11 | pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */ 12 | pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */ 13 | pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */ 14 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */ 15 | 16 | pre.prettyprint, code.prettyprint { 17 | background-color: #000; 18 | -moz-border-radius: 8px; 19 | -webkit-border-radius: 8px; 20 | -o-border-radius: 8px; 21 | -ms-border-radius: 8px; 22 | -khtml-border-radius: 8px; 23 | border-radius: 8px; 24 | } 25 | 26 | pre.prettyprint { 27 | width: 95%; 28 | margin: 1em auto; 29 | padding: 1em; 30 | white-space: pre-wrap; 31 | } 32 | 33 | 34 | /* Specify class=linenums on a pre to get line numbering */ 35 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */ 36 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 37 | /* Alternate shading for lines */ 38 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 39 | 40 | @media print { 41 | pre .str, code .str { color: #060; } 42 | pre .kwd, code .kwd { color: #006; font-weight: bold; } 43 | pre .com, code .com { color: #600; font-style: italic; } 44 | pre .typ, code .typ { color: #404; font-weight: bold; } 45 | pre .lit, code .lit { color: #044; } 46 | pre .pun, code .pun { color: #440; } 47 | pre .pln, code .pln { color: #000; } 48 | pre .tag, code .tag { color: #006; font-weight: bold; } 49 | pre .atn, code .atn { color: #404; } 50 | pre .atv, code .atv { color: #060; } 51 | } 52 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apidoc", 3 | "version": "0.23.0", 4 | "description": "RESTful web API Documentation Generator", 5 | "author": "Peter Rottmann ", 6 | "license": "MIT", 7 | "preferGlobal": true, 8 | "bin": "bin/apidoc", 9 | "main": "./lib/index.js", 10 | "homepage": "http://apidocjs.com", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/apidoc/apidoc.git" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/apidoc/apidoc/issues" 17 | }, 18 | "scripts": { 19 | "test": "npm run jshint && mocha test/", 20 | "jshint": "jshint lib/ test/", 21 | "build-example": "bin/apidoc -i example/ -o tmp/", 22 | "update-lodash": "./node_modules/lodash-cli/bin/lodash -p -o template/vendor/lodash.custom.min.js include=get,set,groupBy,each,extend,some,isNaN exports=amd" 23 | }, 24 | "keywords": [ 25 | "api", 26 | "apidoc", 27 | "doc", 28 | "documentation", 29 | "rest", 30 | "restful" 31 | ], 32 | "engines": { 33 | "node": ">= 0.10.0" 34 | }, 35 | "dependencies": { 36 | "apidoc-core": "^0.11.1", 37 | "commander": "^2.20.0", 38 | "fs-extra": "^8.1.0", 39 | "handlebars": "^4.7.6", 40 | "lodash": "^4.17.15", 41 | "markdown-it": "^10.0.0", 42 | "nodemon": "^2.0.3", 43 | "winston": "^3.2.1" 44 | }, 45 | "devDependencies": { 46 | "amdefine": "^1.0.1", 47 | "apidoc-example": "^0.2.1", 48 | "bootstrap": "3.4.1", 49 | "jquery": "3.4.1", 50 | "jshint": "^2.11.0", 51 | "lodash-cli": "^4.17.5", 52 | "mocha": "^6.2.3", 53 | "path-to-regexp": "^3.2.0", 54 | "requirejs": "^2.3.6", 55 | "semver": "^6.3.0", 56 | "should": "~13.2.3", 57 | "webfontloader": "^1.6.28" 58 | }, 59 | "jshintConfig": { 60 | "camelcase": true, 61 | "curly": false, 62 | "eqeqeq": true, 63 | "forin": true, 64 | "latedef": false, 65 | "newcap": true, 66 | "undef": true, 67 | "unused": true, 68 | "trailing": true, 69 | "node": true, 70 | "browser": true, 71 | "predef": [ 72 | "it", 73 | "describe", 74 | "before", 75 | "after" 76 | ] 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-rust.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 Chris Morgan 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([],[["pln",/^[\t\n\r \xA0]+/],["com",/^\/\/.*/],["com",/^\/\*[\s\S]*?(?:\*\/|$)/],["str",/^b"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}))*?"/],["str",/^"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}|u\{\[\da-fA-F]{1,6}\}))*?"/],["str",/^b?r(#*)\"[\s\S]*?\"\1/],["str",/^b'([^\\]|\\(.|x[\da-fA-F]{2}))'/],["str",/^'([^\\]|\\(.|x[\da-fA-F]{2}|u\{[\da-fA-F]{1,6}\}))'/],["tag",/^'\w+?\b/],["kwd",/^(?:match|if|else|as|break|box|continue|extern|fn|for|in|if|impl|let|loop|pub|return|super|unsafe|where|while|use|mod|trait|struct|enum|type|move|mut|ref|static|const|crate)\b/], 18 | ["kwd",/^(?:alignof|become|do|offsetof|priv|pure|sizeof|typeof|unsized|yield|abstract|virtual|final|override|macro)\b/],["typ",/^(?:[iu](8|16|32|64|size)|char|bool|f32|f64|str|Self)\b/],["typ",/^(?:Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b/],["lit",/^(self|true|false|null)\b/], 19 | ["lit",/^\d[0-9_]*(?:[iu](?:size|8|16|32|64))?/],["lit",/^0x[a-fA-F0-9_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0o[0-7_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0b[01_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^\d[0-9_]*\.(?![^\s\d.])/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)(?:[eE][+-]?[0-9_]+)?(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)?(?:f32|f64)/], 20 | ["atn",/^[a-z_]\w*!/i],["pln",/^[a-z_]\w*/i],["atv",/^#!?\[[\s\S]*?\]/],["pun",/^[+\-/*=^&|!<>%[\](){}?:.,;]/],["pln",/./]]),["rust"]); 21 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-sql.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONNECT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOLLOWING|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MATCHED|MERGE|NATURAL|NATIONAL|NOCHECK|NONCLUSTERED|NOCYCLE|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PARTITION|PERCENT|PIVOT|PLAN|PRECEDING|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|ROWS?|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|START|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNBOUNDED|UNION|UNIQUE|UNPIVOT|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WITHIN|WRITETEXT|XML)(?=[^\w-]|$)/i, 18 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"]); 19 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-vb.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, 18 | null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", 19 | "vbs"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-vbs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, 18 | null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", 19 | "vbs"]); 20 | -------------------------------------------------------------------------------- /example/footer.md: -------------------------------------------------------------------------------- 1 | # Best practices 2 | 3 | Here we are using the footer file to add documentation on best practices while using `apidoc`. 4 | This text is from "footer.md" and is included the same way as the "header.md" file. 5 | 6 | 7 | 8 | ## Define & use 9 | 10 | For a better readability in the source code, it is recommended to use `@apiDefine` and `@apiUse` as much as possible. 11 | 12 | 13 | 14 | ### Naming 15 | 16 | You should choose a consistent naming schema, which makes it easier to understand what is defined and included. 17 | 18 | E.g. with `@apiUse LoginParam`, `@apiUse LoginError`, `@apiUse LoginSuccess` you see that parameter-, errors- and 19 | success-fields are classified with the suffix `Param`, `Error` and `Success`. 20 | 21 | 22 | 23 | ### Example for parameter 24 | 25 | ```js 26 | /** 27 | * @apiDefine LoginParam 28 | * @apiParam {String} username Your e-mail-address. 29 | * @apiParam {String} password Your password. 30 | */ 31 | 32 | /** 33 | * @apiDefine UserParam 34 | * @apiParam {String} firstname Your firstname. 35 | * @apiParam {String} lastname Your lastname. 36 | * @apiParam {Date} birthday Your birthday. 37 | */ 38 | 39 | /** 40 | * @api {GET} /account/register Register a new user. 41 | * @apiUse LoginParam 42 | * @apiUse UserParam 43 | * @apiParam {Boolean} terms Checkbox to accept the terms. 44 | */ 45 | 46 | /** 47 | * @api {GET} /account/login Signin with an existing user. 48 | * @apiUse LoginParam 49 | * @apiParam {Boolean} rememberme Checkbox to auto-login on revisit. 50 | */ 51 | ``` 52 | Block 1 defines the `LoginParam` with 2 fields, which are required for register and login. 53 | Block 2 defines the `UserParam` with 3 fields, which are required only for register. 54 | Block 3 is the endpoint `/account/register`, which uses parameters from `LoginParam`, `UserParam` and an extra checkbox. 55 | Block 4 is the endpoint `/account/login`, which use only parameters from `LoginParam` and an extra checkbox. 56 | 57 | 58 | 59 | ### Example for a group 60 | 61 | ```js 62 | /** 63 | * @apiDefine AccountGroup Account endpoints 64 | * 65 | * Here is the description for the "AccountGroup". 66 | * It can contain **markdown** syntax. 67 | */ 68 | 69 | /** 70 | * @api {GET} /account/login Signin with an existing user. 71 | * @apiGroup AccountGroup 72 | */ 73 | ``` 74 | Block 1 defines the `AccountGroup` with a title and a description (the following lines). 75 | Block 2 is the endpoint `/account/login`, which belongs to the group `AccountGroup` and inherit from there the title and 76 | description. 77 | `@apiGroup name` only inherit the title and description, while `@apiUse` would inherit all defined fields in a block. 78 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lasso.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], 18 | ["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 19 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-ls.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], 18 | ["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 19 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); 20 | -------------------------------------------------------------------------------- /template/vendor/prettify/lang-lassoscript.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], 18 | ["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 19 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); 20 | -------------------------------------------------------------------------------- /template/vendor/polyfill.js: -------------------------------------------------------------------------------- 1 | // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys 2 | if (!Object.keys) { 3 | Object.keys = (function () { 4 | 'use strict'; 5 | var hasOwnProperty = Object.prototype.hasOwnProperty, 6 | hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), 7 | dontEnums = [ 8 | 'toString', 9 | 'toLocaleString', 10 | 'valueOf', 11 | 'hasOwnProperty', 12 | 'isPrototypeOf', 13 | 'propertyIsEnumerable', 14 | 'constructor' 15 | ], 16 | dontEnumsLength = dontEnums.length; 17 | 18 | return function (obj) { 19 | if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { 20 | throw new TypeError('Object.keys called on non-object'); 21 | } 22 | 23 | var result = [], prop, i; 24 | 25 | for (prop in obj) { 26 | if (hasOwnProperty.call(obj, prop)) { 27 | result.push(prop); 28 | } 29 | } 30 | 31 | if (hasDontEnumBug) { 32 | for (i = 0; i < dontEnumsLength; i++) { 33 | if (hasOwnProperty.call(obj, dontEnums[i])) { 34 | result.push(dontEnums[i]); 35 | } 36 | } 37 | } 38 | return result; 39 | }; 40 | }()); 41 | } 42 | 43 | //Production steps of ECMA-262, Edition 5, 15.4.4.18 44 | //Reference: http://es5.github.com/#x15.4.4.18 45 | if (!Array.prototype.forEach) { 46 | Array.prototype.forEach = function (callback, thisArg) { 47 | var T, k; 48 | 49 | if (this == null) { 50 | throw new TypeError(' this is null or not defined'); 51 | } 52 | 53 | // 1. Let O be the result of calling ToObject passing the |this| value as the argument. 54 | var O = Object(this); 55 | 56 | // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". 57 | // 3. Let len be ToUint32(lenValue). 58 | var len = O.length >>> 0; 59 | 60 | // 4. If IsCallable(callback) is false, throw a TypeError exception. 61 | // See: http://es5.github.com/#x9.11 62 | if (typeof callback !== "function") { 63 | throw new TypeError(callback + " is not a function"); 64 | } 65 | 66 | // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. 67 | if (arguments.length > 1) { 68 | T = thisArg; 69 | } 70 | 71 | // 6. Let k be 0 72 | k = 0; 73 | 74 | // 7. Repeat, while k < len 75 | while (k < len) { 76 | var kValue; 77 | 78 | // a. Let Pk be ToString(k). 79 | // This is implicit for LHS operands of the in operator 80 | // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. 81 | // This step can be combined with c 82 | // c. If kPresent is true, then 83 | if (k in O) { 84 | // i. Let kValue be the result of calling the Get internal method of O with argument Pk. 85 | kValue = O[k]; 86 | 87 | // ii. Call the Call internal method of callback with T as the this value and 88 | // argument list containing kValue, k, and O. 89 | callback.call(T, kValue, k, O); 90 | } 91 | // d. Increase k by 1. 92 | k++; 93 | } 94 | // 8. return undefined 95 | }; 96 | } 97 | -------------------------------------------------------------------------------- /template-single/build-single.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # build single html file tpl 3 | set -e 4 | 5 | # fix script cwd 6 | DIRNAME=$(dirname "$0") 7 | SCRIPTPATH=$(cd "$DIRNAME"; pwd) 8 | cd "$SCRIPTPATH" 9 | 10 | PROJECTPATH=$(dirname "$SCRIPTPATH") 11 | 12 | # define path 13 | TEMPDIR=$(mktemp -d -t apidoc-XXXXXXXXXX) 14 | TEMPLATE="$PROJECTPATH/template" 15 | RJS="node $PROJECTPATH/node_modules/requirejs/bin/r.js" 16 | RJS_CONFIG="$TEMPDIR/config.js" 17 | RAW_INDEX_TPL="$TEMPLATE/index.html" 18 | INDEX_TPL="$TEMPDIR/index.html" 19 | API_DATA="$TEMPDIR/api_data.js" 20 | API_PROJECT="$TEMPDIR/api_project.js" 21 | API_STYLE="$TEMPDIR/style.css" 22 | API_STYLE_PKG="$TEMPDIR/style_pkg.css" 23 | MAIN_PKG="$TEMPDIR/main.js" 24 | INDEX_PKG="$SCRIPTPATH/index.html" 25 | 26 | # generate html template 27 | cp -f "$RAW_INDEX_TPL" "$INDEX_TPL" 28 | sed -i 's|]*>||g' "$INDEX_TPL" # remove link tag 29 | sed -i 's| 36 | 37 | EOF 38 | ) >> "$INDEX_TPL" 39 | 40 | # generate api_data.js 41 | ( 42 | cat < "$API_DATA" 46 | 47 | # generate api_project.js 48 | ( 49 | cat < "$API_PROJECT" 53 | 54 | ( 55 | cat < "$API_STYLE" 61 | 62 | # generate r.js config 63 | ( 64 | cat < "$RJS_CONFIG" 114 | 115 | # build js & css 116 | # cd $TEMPLATE 117 | $RJS -o "$RJS_CONFIG" 118 | $RJS -o cssIn="$API_STYLE" out="$API_STYLE_PKG" optimizeCss=standard 119 | 120 | # setting template 121 | cp -f "$INDEX_TPL" "$INDEX_PKG" 122 | 123 | cat >> "$INDEX_PKG" <$(cat "$API_STYLE_PKG") 125 | 126 | EOF 127 | 128 | # clean files 129 | rm -rf "$TEMPDIR" 130 | -------------------------------------------------------------------------------- /template/utils/send_sample_request_utils.js: -------------------------------------------------------------------------------- 1 | //this block is used to make this module works with Node (CommonJS module format) 2 | if (typeof define !== 'function') { 3 | var define = require('amdefine')(module) 4 | } 5 | 6 | define(['lodash'], function (_) { 7 | 8 | function handleNestedFields(object, key, params, paramType) { 9 | var attributes = key.split('.'); 10 | var field = attributes[0]; 11 | params.push(field); 12 | if (attributes.length > 1 && paramType[params.join('.')] == 'Object') { 13 | var nestedField = attributes.slice(1).join('.'); 14 | if (!object[field]) 15 | object[field] = {}; 16 | if (typeof object[field] == 'object') { 17 | object[field][nestedField] = object[key]; 18 | delete object[key]; 19 | handleNestedFields(object[field], nestedField, params, paramType); 20 | } 21 | } 22 | } 23 | 24 | function handleNestedFieldsForAllParams(param, paramType) { 25 | var result = Object.assign({}, param); 26 | Object.keys(result).forEach(function (key) { 27 | handleNestedFields(result, key, [], paramType); 28 | }); 29 | return result 30 | } 31 | 32 | function handleArraysAndObjectFields(param, paramType) { 33 | var result = Object.assign({}, param); 34 | Object.keys(paramType).forEach(function (key) { 35 | if (result[key] && (paramType[key].endsWith('[]') || paramType[key] === 'Object')) { 36 | try { 37 | result[key] = JSON.parse(result[key]); 38 | } catch (e) {;} 39 | } 40 | }); 41 | return result 42 | } 43 | 44 | function tryParsingAsType(object, path, type) { 45 | var val = _.get(object, path); 46 | if (val !== undefined) { 47 | if (type === 'Boolean') { 48 | if (val === 'true') { 49 | _.set(object, path, true); 50 | } else if (val === 'false') { 51 | _.set(object, path, false); 52 | } else { 53 | console.warn('Failed to parse object value at path [' + path + ']. Value: (' + val + '). Type: (' + type + ')'); 54 | } 55 | } else if (type === 'Number') { 56 | var parsedInt = parseInt(val, 10); 57 | if (!_.isNaN(parsedInt)) { 58 | _.set(object, path, parsedInt); 59 | } else { 60 | console.warn('Failed to parse object value at path [' + path + ']. Value: (' + val + '). Type: (' + type + ')'); 61 | } 62 | } 63 | } 64 | } 65 | 66 | function handleNestedAndParsingFields(param, paramType) { 67 | var result = handleArraysAndObjectFields(param, paramType); 68 | result = handleNestedFieldsForAllParams(result, paramType); 69 | return result; 70 | } 71 | 72 | function tryParsingWithTypes(param, paramType) { 73 | var result = Object.assign({}, param); 74 | Object.keys(paramType).forEach(function (key) { 75 | tryParsingAsType(result, key, paramType[key]); 76 | }); 77 | return result; 78 | } 79 | 80 | // Converts path params in the {param} format to the accepted :param format, used before inserting the URL params. 81 | function convertPathParams(url) { 82 | return url.replace(/{(.+?)}/g, ':$1'); 83 | } 84 | 85 | return {handleNestedAndParsingFields,convertPathParams,tryParsingWithTypes}; 86 | }); 87 | -------------------------------------------------------------------------------- /example/_apidoc.js: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------------------------------ 2 | // General apiDoc documentation blocks and old history blocks. 3 | // ------------------------------------------------------------------------------------------ 4 | 5 | // ------------------------------------------------------------------------------------------ 6 | // Current Success. 7 | // ------------------------------------------------------------------------------------------ 8 | 9 | 10 | // ------------------------------------------------------------------------------------------ 11 | // Current Errors. 12 | // ------------------------------------------------------------------------------------------ 13 | /** 14 | * @apiDefine CreateUserError 15 | * @apiVersion 0.2.0 16 | * 17 | * @apiError NoAccessRight Only authenticated Admins can access the data. 18 | * @apiError UserNameTooShort Minimum of 5 characters required. 19 | * 20 | * @apiErrorExample Response (example): 21 | * HTTP/1.1 400 Bad Request 22 | * { 23 | * "error": "UserNameTooShort" 24 | * } 25 | */ 26 | 27 | 28 | // ------------------------------------------------------------------------------------------ 29 | // Current Permissions. 30 | // ------------------------------------------------------------------------------------------ 31 | /** 32 | * @apiDefine admin Admin access rights needed. 33 | * Optionally you can write here further Informations about the permission. 34 | * 35 | * An "apiDefinePermission"-block can have an "apiVersion", so you can attach the block to a specific version. 36 | * 37 | * @apiVersion 0.3.0 38 | */ 39 | 40 | 41 | // ------------------------------------------------------------------------------------------ 42 | // History. 43 | // ------------------------------------------------------------------------------------------ 44 | /** 45 | * @apiDefine admin This title is visible in version 0.1.0 and 0.2.0 46 | * @apiVersion 0.1.0 47 | */ 48 | 49 | /** 50 | * @api {get} /user/:id Read data of a User 51 | * @apiVersion 0.2.0 52 | * @apiName GetUser 53 | * @apiGroup User 54 | * @apiPermission admin 55 | * 56 | * @apiDescription Here you can describe the function. 57 | * Multilines are possible. 58 | * 59 | * @apiParam {String} id The Users-ID. 60 | * 61 | * @apiSuccess {String} id The Users-ID. 62 | * @apiSuccess {Date} name Fullname of the User. 63 | * 64 | * @apiError UserNotFound The id of the User was not found. 65 | */ 66 | 67 | /** 68 | * @api {get} /user/:id Read data of a User 69 | * @apiVersion 0.1.0 70 | * @apiName GetUser 71 | * @apiGroup User 72 | * @apiPermission admin 73 | * 74 | * @apiDescription Here you can describe the function. 75 | * Multilines are possible. 76 | * 77 | * @apiParam {String} id The Users-ID. 78 | * 79 | * @apiSuccess {String} id The Users-ID. 80 | * @apiSuccess {Date} name Fullname of the User. 81 | * 82 | * @apiError UserNotFound The error description text in version 0.1.0. 83 | */ 84 | 85 | /** 86 | * @api {post} /user Create a User 87 | * @apiVersion 0.2.0 88 | * @apiName PostUser 89 | * @apiGroup User 90 | * @apiPermission none 91 | * 92 | * @apiDescription In this case "apiErrorStructure" is defined and used. 93 | * Define blocks with params that will be used in several functions, so you dont have to rewrite them. 94 | * 95 | * @apiParam {String} name Name of the User. 96 | * 97 | * @apiSuccess {String} id The Users-ID. 98 | * 99 | * @apiUse CreateUserError 100 | */ 101 | -------------------------------------------------------------------------------- /test/multi_input_folder_test.js: -------------------------------------------------------------------------------- 1 | /*jshint unused:false, expr:true */ 2 | 3 | /** 4 | * Test: apiDoc creation from multiple folder 5 | */ 6 | 7 | var fs = require('fs-extra'); 8 | var exec = require('child_process').exec; 9 | var path = require('path'); 10 | var should = require('should'); 11 | 12 | describe('apiDoc multiple folder input', function() { 13 | 14 | var fixturePath = 'test/multi_input_folder/fixtures'; 15 | var projectBaseBath = 'test/multi_input_folder/testproject'; 16 | 17 | var testTargetPath = "./tmp/apidocmulti"; 18 | 19 | var fixtureFiles = [ 20 | 'api_data.js', 21 | 'api_data.json', 22 | 'api_project.js', 23 | 'api_project.json', 24 | 'index.html' 25 | ]; 26 | 27 | before(function(done) { 28 | fs.removeSync(testTargetPath); 29 | 30 | done(); 31 | }); 32 | 33 | after(function(done) { 34 | done(); 35 | }); 36 | 37 | it('should create apidoc in /tmp/apidocmulti with multiple input folders', function(done) { 38 | 39 | var commonDefinitions = path.join('', 'folder1'); 40 | var historyDefinition = path.join('', 'folder2'); 41 | var srcFolder = path.join('', 'src'); 42 | 43 | var cmd = 'cd ' + projectBaseBath + ' && '; 44 | cmd += 'node ../../../bin/apidoc'; 45 | cmd += ' -i ' + commonDefinitions; 46 | cmd += ' -i ' + historyDefinition; 47 | cmd += ' -i ' + srcFolder; 48 | cmd += ' -o ../../../tmp/apidocmulti'; 49 | cmd += ' -t ../../template/'; 50 | 51 | exec(cmd, function(err, stdout, stderr) { 52 | if (err) 53 | throw err; 54 | 55 | if (stderr) 56 | throw stderr; 57 | 58 | done(); 59 | }); 60 | }); 61 | 62 | it('created files should equal to fixtures', function(done) { 63 | var timeRegExp = /\"time\"\:\s\"(.*)\"/g; 64 | var versionRegExp = /\"version\"\:\s\"(.*)\"/g; 65 | var filenameRegExp = new RegExp('(?!"filename":\\s")(' + projectBaseBath + '/)', 'g'); 66 | 67 | fixtureFiles.forEach(function(name) { 68 | var fixtureContent = fs.readFileSync(path.join(fixturePath, name), 'utf8'); 69 | var createdContent = fs.readFileSync(path.join(testTargetPath, name), 'utf8'); 70 | 71 | // creation time remove (never equal) 72 | fixtureContent = fixtureContent.replace(timeRegExp, ''); 73 | createdContent = createdContent.replace(timeRegExp, ''); 74 | 75 | // creation time remove (or fixtures must be updated every time the version change) 76 | fixtureContent = fixtureContent.replace(versionRegExp, ''); 77 | createdContent = createdContent.replace(versionRegExp, ''); 78 | 79 | // remove the base path 80 | createdContent = createdContent.replace(filenameRegExp, ''); 81 | 82 | var fixtureLines = fixtureContent.split(/\r?\n|\r/); 83 | var createdLines = createdContent.split(/\r?\n|\r/); 84 | 85 | if (fixtureLines.length !== createdLines.length) 86 | throw new Error('File ' + path.join(testTargetPath, name) + ' not equals to ' + fixturePath + '/' + name); 87 | 88 | for (var lineNumber = 0; lineNumber < fixtureLines.length; lineNumber += 1) { 89 | if (fixtureLines[lineNumber] !== createdLines[lineNumber]) 90 | throw new Error('File ' + path.join(testTargetPath, name) + ' not equals to ' + fixturePath + '/' + name + ' in line ' + (lineNumber + 1) + 91 | '\nfixture: ' + fixtureLines[lineNumber] + 92 | '\ncreated: ' + createdLines[lineNumber] 93 | ); 94 | } 95 | }); 96 | done(); 97 | }); 98 | }); 99 | -------------------------------------------------------------------------------- /example/example.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @api {get} /user/:id Read data of a User 3 | * @apiVersion 0.3.0 4 | * @apiName GetUser 5 | * @apiGroup User 6 | * @apiPermission admin 7 | * 8 | * @apiDescription Compare version 0.3.0 with 0.2.0 and you will see the green markers with new items in version 0.3.0 and red markers with removed items since 0.2.0. 9 | * 10 | * @apiHeader {String} Authorization The token can be generated from your user profile. 11 | * @apiHeaderExample {Header} Header-Example 12 | * "Authorization: token 5f048fe" 13 | * @apiParam {Number} id The Users-ID. 14 | * 15 | * @apiExample {curl} Curl example 16 | * curl -H "Authorization: token 5f048fe" -i https://api.example.com/user/4711 17 | * @apiExample {js} Javascript example 18 | * const client = AcmeCorpApi('5f048fe'); 19 | * const user = client.getUser(42); 20 | * @apiExample {python} Python example 21 | * client = AcmeCorpApi.Client(token="5f048fe") 22 | * user = client.get_user(42) 23 | * 24 | * @apiSuccess {Number} id The Users-ID. 25 | * @apiSuccess {Date} registered Registration Date. 26 | * @apiSuccess {Date} name Fullname of the User. 27 | * @apiSuccess {String[]} nicknames List of Users nicknames (Array of Strings). 28 | * @apiSuccess {Object} profile Profile data (example for an Object) 29 | * @apiSuccess {Number} profile.age Users age. 30 | * @apiSuccess {String} profile.image Avatar-Image. 31 | * @apiSuccess {Object[]} options List of Users options (Array of Objects). 32 | * @apiSuccess {String} options.name Option Name. 33 | * @apiSuccess {String} options.value Option Value. 34 | * 35 | * @apiError NoAccessRight Only authenticated Admins can access the data. 36 | * @apiError UserNotFound The id of the User was not found. 37 | * @apiError (500 Internal Server Error) InternalServerError The server encountered an internal error 38 | * 39 | * @apiErrorExample Response (example): 40 | * HTTP/1.1 401 Not Authenticated 41 | * { 42 | * "error": "NoAccessRight" 43 | * } 44 | */ 45 | function getUser() { return; } 46 | 47 | /** 48 | * @api {post} /user Create a new User 49 | * @apiVersion 0.3.0 50 | * @apiName PostUser 51 | * @apiGroup User 52 | * @apiPermission none 53 | * 54 | * @apiDescription In this case "apiErrorStructure" is defined and used. 55 | * Define blocks with params that will be used in several functions, so you dont have to rewrite them. 56 | * 57 | * @apiParam {String} name Name of the User. 58 | * 59 | * @apiSuccess {Number} id The new Users-ID. 60 | * 61 | * @apiUse CreateUserError 62 | */ 63 | function postUser() { return; } 64 | 65 | /** 66 | * @api {put} /user/:id Change a User 67 | * @apiVersion 0.3.0 68 | * @apiName PutUser 69 | * @apiGroup User 70 | * @apiPermission none 71 | * 72 | * @apiDescription This function has same errors like POST /user, but errors not defined again, they were included with "apiErrorStructure" 73 | * 74 | * @apiParam {String} name Name of the User. 75 | * @apiParam {File} avatar Upload avatar. 76 | * 77 | * @apiUse CreateUserError 78 | */ 79 | function putUser() { return; } 80 | 81 | /** 82 | * @api {delete} /user/:id Delete user 83 | * @apiVersion 0.3.0 84 | * @apiName DeleteUser 85 | * @apiGroup User 86 | * @apiPermission admin 87 | * 88 | * @apiDescription Be careful! This will remove all the data associated with that user! 89 | * 90 | * @apiHeader {String} Authorization The token can be generated from your user profile. 91 | * @apiHeaderExample {Header} Header-Example 92 | * "Authorization: token 5f048fe" 93 | * @apiParam {Number} id id of the user. 94 | * 95 | * @apiExample {curl} Curl example 96 | * curl -X DELETE -H "Authorization: token 5f048fe" -i https://api.example.com/user/4711 97 | * @apiExample {js} Javascript example 98 | * const client = AcmeCorpApi('5f048fe'); 99 | * const user = client.deleteUser(42); 100 | * @apiExample {python} Python example 101 | * client = AcmeCorpApi.Client(token="5f048fe") 102 | * user = client.delete_user(42) 103 | * 104 | * @apiSuccess {String} result ok if everything went fine. 105 | * @apiSuccessExample {json} Success-Example 106 | * HTTP/1.1 200 OK 107 | * { 108 | * "result": "ok" 109 | * } 110 | * 111 | * @apiError NoAccessRight Only authenticated Admins can access the data. 112 | * @apiError UserNotFound The id of the User was not found. 113 | * @apiError (500 Internal Server Error) InternalServerError The server encountered an internal error. 114 | * 115 | * @apiErrorExample Response (example): 116 | * HTTP/1.1 401 Not Authenticated 117 | * { 118 | * "error": "NoAccessRight" 119 | * } 120 | */ 121 | function deleteUser() { return; } 122 | -------------------------------------------------------------------------------- /test/custom_markdown_parser_test.js: -------------------------------------------------------------------------------- 1 | /*jshint unused:false, expr:true */ 2 | 3 | /** 4 | * Test: apiDoc full parse 5 | */ 6 | 7 | // node modules 8 | var apidoc = require('apidoc-core'); 9 | var exec = require('child_process').exec; 10 | var fs = require('fs-extra'); 11 | var path = require('path'); 12 | var semver = require('semver'); 13 | var should = require('should'); 14 | 15 | var versions = require('apidoc-example').versions; 16 | 17 | describe('apiDoc custom markdown parser', function() { 18 | 19 | // get latest example for the used apidoc-spec 20 | var latestExampleVersion = semver.maxSatisfying(versions, '~' + apidoc.getSpecificationVersion()); // ~0.2.0 = >=0.2.0 <0.3.0 21 | 22 | var exampleBasePath = 'node_modules/apidoc-example/' + latestExampleVersion; 23 | var fixturePath = exampleBasePath + '/fixtures'; 24 | 25 | var fixtureFiles = [ 26 | 'api_data.js', 27 | 'api_data.json', 28 | 'api_project.js', 29 | 'api_project.json', 30 | 'index.html' 31 | ]; 32 | 33 | var markdownFile = './fixtures/custom_markdown_parser.js'; 34 | var markdownFileBase = '../test/fixtures/custom_markdown_parser.js'; 35 | var markdownFileBase1 = './test/fixtures/custom_markdown_parser.js'; 36 | var markdownFileBase2 = 'test/fixtures/custom_markdown_parser.js'; 37 | var markdownFileBase3 = path.join(process.cwd(), 'test/fixtures/custom_markdown_parser.js'); 38 | 39 | before(function(done) { 40 | fs.removeSync('./tmp/'); 41 | 42 | done(); 43 | }); 44 | 45 | after(function(done) { 46 | done(); 47 | }); 48 | 49 | // Render static text. 50 | it('should render static text with custom markdown parser', function(done) { 51 | var Markdown = require(markdownFile); 52 | var markdownParser = new Markdown(); 53 | var text = markdownParser.render('some text'); 54 | should(text).equal('Custom Markdown Parser: some text'); 55 | done(); 56 | }); 57 | 58 | // create 59 | it('should create example in tmp/', function(done) { 60 | var cmd = 'node ./bin/apidoc -i ' + exampleBasePath + '/src/ -o tmp/ -t test/template/ --markdown ' + markdownFileBase + ' --silent'; 61 | exec(cmd, function(err, stdout, stderr) { 62 | if (err) 63 | throw err; 64 | 65 | if (stderr) 66 | throw stderr; 67 | 68 | done(); 69 | }); 70 | }); 71 | 72 | it('should create example in tmp/ with relative parser location', function(done) { 73 | var cmd = 'node ./bin/apidoc -i ' + exampleBasePath + '/src/ -o tmp/ -t test/template/ --markdown ' + markdownFileBase1 + ' --silent'; 74 | exec(cmd, function(err, stdout, stderr) { 75 | if (err) 76 | throw err; 77 | 78 | if (stderr) 79 | throw stderr; 80 | 81 | done(); 82 | }); 83 | }); 84 | 85 | it('should create example in tmp/ with cwd parser location', function(done) { 86 | var cmd = 'node ./bin/apidoc -i ' + exampleBasePath + '/src/ -o tmp/ -t test/template/ --markdown ' + markdownFileBase2 + ' --silent'; 87 | exec(cmd, function(err, stdout, stderr) { 88 | if (err) 89 | throw err; 90 | 91 | if (stderr) 92 | throw stderr; 93 | 94 | done(); 95 | }); 96 | }); 97 | 98 | it('should create example in tmp/ with absolute parser location', function(done) { 99 | var cmd = 'node ./bin/apidoc -i ' + exampleBasePath + '/src/ -o tmp/ -t test/template/ --markdown ' + markdownFileBase3 + ' --silent'; 100 | exec(cmd, function(err, stdout, stderr) { 101 | if (err) 102 | throw err; 103 | 104 | if (stderr) 105 | throw stderr; 106 | 107 | done(); 108 | }); 109 | }); 110 | 111 | // check 112 | it('should find created files', function(done) { 113 | fixtureFiles.forEach(function(name) { 114 | fs.existsSync(fixturePath + '/' + name).should.eql(true); 115 | }); 116 | done(); 117 | }); 118 | 119 | // Count how many custom parser text inserts where found. 120 | it('created files should have custom text', function(done) { 121 | var countCustomText = 0; 122 | fixtureFiles.forEach(function(name) { 123 | var createdContent = fs.readFileSync('./tmp/' + name, 'utf8'); 124 | 125 | var createdLines = createdContent.split(/\n/); 126 | 127 | for (var lineNumber = 0; lineNumber < createdLines.length; lineNumber += 1) { 128 | if (createdLines[lineNumber].indexOf('Custom Markdown Parser: ') !== -1) 129 | countCustomText++; 130 | } 131 | }); 132 | 133 | should.notEqual(countCustomText, 0); 134 | 135 | done(); 136 | }); 137 | 138 | }); 139 | -------------------------------------------------------------------------------- /test/multi_input_folder/fixtures/api_data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "post", 4 | "url": "/api/authenticate", 5 | "title": "", 6 | "version": "0.3.0", 7 | "group": "Authentication", 8 | "name": "Authenticate", 9 | "parameter": { 10 | "fields": { 11 | "Credentials": [ 12 | { 13 | "group": "Credentials", 14 | "type": "String", 15 | "optional": false, 16 | "field": "username", 17 | "description": "

Username

" 18 | }, 19 | { 20 | "group": "Credentials", 21 | "type": "String", 22 | "optional": false, 23 | "field": "password", 24 | "description": "

password

" 25 | } 26 | ] 27 | } 28 | }, 29 | "filename": "src/test_api.js", 30 | "groupTitle": "Authentication", 31 | "error": { 32 | "fields": { 33 | "500 Internal Server Error": [ 34 | { 35 | "group": "500 Internal Server Error", 36 | "optional": false, 37 | "field": "InternalServerError", 38 | "description": "

The server encountered an internal error

" 39 | } 40 | ] 41 | }, 42 | "examples": [ 43 | { 44 | "title": "500 Internal Server Error", 45 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 46 | "type": "json" 47 | } 48 | ] 49 | } 50 | }, 51 | { 52 | "type": "get", 53 | "url": "/api/subscriptioninfo", 54 | "title": "", 55 | "version": "0.3.0", 56 | "description": "

Get the subscription information from an authenticated user.

", 57 | "group": "Authentication", 58 | "name": "GetSubscriptionInfo", 59 | "filename": "src/test_api.js", 60 | "groupTitle": "Authentication", 61 | "header": { 62 | "fields": { 63 | "Header": [ 64 | { 65 | "group": "Header", 66 | "type": "String", 67 | "optional": false, 68 | "field": "Authorization", 69 | "description": "

Auth header with JWT Token

" 70 | } 71 | ] 72 | }, 73 | "examples": [ 74 | { 75 | "title": "Authorization-Example:", 76 | "content": "Authorization: Bearer ", 77 | "type": "String" 78 | } 79 | ] 80 | }, 81 | "error": { 82 | "fields": { 83 | "500 Internal Server Error": [ 84 | { 85 | "group": "500 Internal Server Error", 86 | "optional": false, 87 | "field": "InternalServerError", 88 | "description": "

The server encountered an internal error

" 89 | } 90 | ] 91 | }, 92 | "examples": [ 93 | { 94 | "title": "500 Internal Server Error", 95 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 96 | "type": "json" 97 | } 98 | ] 99 | } 100 | }, 101 | { 102 | "type": "get", 103 | "url": "/api/subscriptioninfo/:userid", 104 | "title": "", 105 | "version": "0.2.0", 106 | "description": "

Get the subscription information for a user.

", 107 | "parameter": { 108 | "fields": { 109 | "Parameter": [ 110 | { 111 | "group": "Parameter", 112 | "type": "Number", 113 | "optional": false, 114 | "field": "userid", 115 | "description": "

user id

" 116 | } 117 | ] 118 | } 119 | }, 120 | "group": "Authentication", 121 | "name": "GetSubscriptionInfo", 122 | "filename": "folder2/History.js", 123 | "groupTitle": "Authentication", 124 | "error": { 125 | "fields": { 126 | "500 Internal Server Error": [ 127 | { 128 | "group": "500 Internal Server Error", 129 | "optional": false, 130 | "field": "InternalServerError", 131 | "description": "

The server encountered an internal error

" 132 | } 133 | ] 134 | }, 135 | "examples": [ 136 | { 137 | "title": "500 Internal Server Error", 138 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 139 | "type": "json" 140 | } 141 | ] 142 | } 143 | } 144 | ] 145 | -------------------------------------------------------------------------------- /test/multi_input_folder/fixtures/api_data.js: -------------------------------------------------------------------------------- 1 | define({ "api": [ 2 | { 3 | "type": "post", 4 | "url": "/api/authenticate", 5 | "title": "", 6 | "version": "0.3.0", 7 | "group": "Authentication", 8 | "name": "Authenticate", 9 | "parameter": { 10 | "fields": { 11 | "Credentials": [ 12 | { 13 | "group": "Credentials", 14 | "type": "String", 15 | "optional": false, 16 | "field": "username", 17 | "description": "

Username

" 18 | }, 19 | { 20 | "group": "Credentials", 21 | "type": "String", 22 | "optional": false, 23 | "field": "password", 24 | "description": "

password

" 25 | } 26 | ] 27 | } 28 | }, 29 | "filename": "src/test_api.js", 30 | "groupTitle": "Authentication", 31 | "error": { 32 | "fields": { 33 | "500 Internal Server Error": [ 34 | { 35 | "group": "500 Internal Server Error", 36 | "optional": false, 37 | "field": "InternalServerError", 38 | "description": "

The server encountered an internal error

" 39 | } 40 | ] 41 | }, 42 | "examples": [ 43 | { 44 | "title": "500 Internal Server Error", 45 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 46 | "type": "json" 47 | } 48 | ] 49 | } 50 | }, 51 | { 52 | "type": "get", 53 | "url": "/api/subscriptioninfo", 54 | "title": "", 55 | "version": "0.3.0", 56 | "description": "

Get the subscription information from an authenticated user.

", 57 | "group": "Authentication", 58 | "name": "GetSubscriptionInfo", 59 | "filename": "src/test_api.js", 60 | "groupTitle": "Authentication", 61 | "header": { 62 | "fields": { 63 | "Header": [ 64 | { 65 | "group": "Header", 66 | "type": "String", 67 | "optional": false, 68 | "field": "Authorization", 69 | "description": "

Auth header with JWT Token

" 70 | } 71 | ] 72 | }, 73 | "examples": [ 74 | { 75 | "title": "Authorization-Example:", 76 | "content": "Authorization: Bearer ", 77 | "type": "String" 78 | } 79 | ] 80 | }, 81 | "error": { 82 | "fields": { 83 | "500 Internal Server Error": [ 84 | { 85 | "group": "500 Internal Server Error", 86 | "optional": false, 87 | "field": "InternalServerError", 88 | "description": "

The server encountered an internal error

" 89 | } 90 | ] 91 | }, 92 | "examples": [ 93 | { 94 | "title": "500 Internal Server Error", 95 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 96 | "type": "json" 97 | } 98 | ] 99 | } 100 | }, 101 | { 102 | "type": "get", 103 | "url": "/api/subscriptioninfo/:userid", 104 | "title": "", 105 | "version": "0.2.0", 106 | "description": "

Get the subscription information for a user.

", 107 | "parameter": { 108 | "fields": { 109 | "Parameter": [ 110 | { 111 | "group": "Parameter", 112 | "type": "Number", 113 | "optional": false, 114 | "field": "userid", 115 | "description": "

user id

" 116 | } 117 | ] 118 | } 119 | }, 120 | "group": "Authentication", 121 | "name": "GetSubscriptionInfo", 122 | "filename": "folder2/History.js", 123 | "groupTitle": "Authentication", 124 | "error": { 125 | "fields": { 126 | "500 Internal Server Error": [ 127 | { 128 | "group": "500 Internal Server Error", 129 | "optional": false, 130 | "field": "InternalServerError", 131 | "description": "

The server encountered an internal error

" 132 | } 133 | ] 134 | }, 135 | "examples": [ 136 | { 137 | "title": "500 Internal Server Error", 138 | "content": "HTTP/1.1 500 Internal Server Error\n{\n \"uri\": \"\",\n \"method\": \"\",\n \"type\": \"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\",\n \"title\": \"Internal Server Error\",\n \"status\": 500,\n \"detail\": \"\"\n}", 139 | "type": "json" 140 | } 141 | ] 142 | } 143 | } 144 | ] }); 145 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # apiDoc 2 | 3 | apiDoc creates a documentation from API descriptions in your source code. 4 | 5 | [![Build Status](https://travis-ci.org/apidoc/apidoc.svg?branch=master)](https://travis-ci.org/apidoc/apidoc) 6 | [![Dependency Status](https://david-dm.org/apidoc/apidoc.svg)](https://david-dm.org/apidoc/apidoc) 7 | [![NPM version](https://badge.fury.io/js/apidoc.svg)](http://badge.fury.io/js/apidoc) 8 | [![Join the chat at https://gitter.im/apidoc/talk](https://badges.gitter.im/apidoc/talk.svg)](https://gitter.im/apidoc/talk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 9 | 10 | Documentation: [apidocjs.com](http://apidocjs.com) 11 | 12 | [Example](http://apidocjs.com/example/) output. 13 | 14 | ## Installation 15 | 16 | ```bash 17 | $ npm install -g apidoc 18 | ``` 19 | 20 | ## Usage 21 | 22 | Add some apidoc comments anywhere in your source code: 23 | 24 | ```java 25 | /** 26 | * @api {get} /user/:id Request User information 27 | * @apiName GetUser 28 | * @apiGroup User 29 | * 30 | * @apiParam {Number} id User's unique ID. 31 | * 32 | * @apiSuccess {String} firstname Firstname of the User. 33 | * @apiSuccess {String} lastname Lastname of the User. 34 | */ 35 | ``` 36 | 37 | Now generate the documentation from `src/` into `doc/`. 38 | 39 | ```bash 40 | $ apidoc -i src/ -o doc/ 41 | ``` 42 | 43 | This repository contains and `example` folder from which you can generate a very complete documentation on an example api endpoint. It also contains best practice hints (in the `footer.md` file). 44 | 45 | ```bash 46 | $ git clone https://github.com/apidoc/apidoc && cd apidoc 47 | $ npm install --prod 48 | $ ./bin/apidoc -i example -o /tmp/doc 49 | $ $BROWSER /tmp/doc 50 | ``` 51 | 52 | ## Docker image 53 | 54 | You can use apidoc in Docker like this: 55 | 56 | ~~~bash 57 | # first build the image after cloning this repository 58 | docker build -t apidoc/apidoc . 59 | # run it 60 | docker run --rm -v $(pwd):/home/node/apidoc apidoc/apidoc -o outputdir -i inputdir 61 | ~~~ 62 | 63 | ## Supported programming languages 64 | 65 | * **C#, Go, Dart, Java, JavaScript, PHP, Scala** (all DocStyle capable languages): 66 | 67 | ```javascript 68 | /** 69 | * This is a comment. 70 | */ 71 | ``` 72 | 73 | * **Clojure**: 74 | 75 | ```clojure 76 | ;;;; 77 | ;; This is a comment. 78 | ;;;; 79 | ``` 80 | 81 | * **CoffeeScript**: 82 | 83 | ```coffeescript 84 | ### 85 | This is a comment. 86 | ### 87 | ``` 88 | 89 | * **Elixir**: 90 | 91 | ```elixir 92 | #{ 93 | # This is a comment. 94 | #} 95 | ``` 96 | 97 | * **Erlang**: 98 | 99 | ```erlang 100 | %{ 101 | % This is a comment. 102 | %} 103 | ``` 104 | 105 | * **Perl** 106 | 107 | ```perl 108 | #** 109 | # This is a comment. 110 | #* 111 | ``` 112 | 113 | ```perl 114 | =pod 115 | This is a comment. 116 | =cut 117 | ``` 118 | 119 | * **Python** 120 | 121 | ```python 122 | """ 123 | This is a comment. 124 | """ 125 | ``` 126 | 127 | * **Ruby** 128 | 129 | ```ruby 130 | =begin 131 | This is a comment. 132 | =end 133 | ``` 134 | 135 | ## Plugins (extend apiDoc) 136 | 137 | apiDoc will auto include installed plugins. 138 | 139 | * [apidoc-plugin-schema](https://github.com/willfarrell/apidoc-plugin-schema) Generates and inject apidoc elements from api schemas. `npm install apidoc-plugin-schema` 140 | 141 | For details and an example on how to implement your own plugin, please view [apidoc-plugin-test](https://github.com/apidoc/apidoc-plugin-test). 142 | 143 | ## Support 144 | 145 | Please [create a new issue](https://github.com/apidoc/apidoc/issues/new/choose) if you have a suggestion/question or if you found a problem/bug. 146 | 147 | ## Contributing 148 | 149 | apiDoc is a collaborative project. Pull requests are welcome. Please see the [CONTRIBUTING](https://github.com/apidoc/apidoc/blob/master/CONTRIBUTING.md) file. 150 | 151 | ## FAQ 152 | 153 | * [Filter for public / private API](https://github.com/apidoc/grunt-apidoc/issues/27#issuecomment-147664797) 154 | 155 | ## Build tools 156 | 157 | * [flask-apidoc](https://pypi.python.org/pypi/flask-apidoc/) `pip install flask-apidoc` 158 | * [grunt-apidoc](https://github.com/apidoc/grunt-apidoc) `npm install grunt-apidoc`. 159 | * [gapidoc (gulp)](https://github.com/techgaun/gulp-apidoc) `npm install gapidoc`. 160 | * [webpack-apidoc](https://github.com/c0b41/webpack-apidoc) `npm install --save-dev webpack-apidoc`. 161 | 162 | ## Integration 163 | 164 | * [Eclipse Java apiDoc editor templates](https://github.com/skhani/eclipse_java_apiDoc_templates) 165 | * [Eclipse plugin](https://github.com/DWand/eclipse_pdt_apiDoc_editor_templates) 166 | * [Microsoft WebAPI](https://github.com/chehabz/grunt-edge-apidoc-webapi-generator) 167 | * [Sublime Text plugin](https://github.com/DWand/ST3_apiDocAutocompletion) 168 | 169 | ## Converter 170 | 171 | * [apidoc-swagger](https://github.com/fsbahman/apidoc-swagger) 172 | * [gulp-apidoc-swagger](https://github.com/fsbahman/gulp-apidoc-swagger) 173 | * [Docmaster](https://github.com/bonzzy/docmaster) 174 | * [@rigwild/apidoc-markdown](https://github.com/rigwild/apidoc-markdown) 175 | -------------------------------------------------------------------------------- /bin/apidoc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | /* 6 | * apidoc 7 | * http://apidocjs.com 8 | * 9 | * Copyright (c) 2013-2016 inveris OHG 10 | * Author Peter Rottmann 11 | * Licensed under the MIT license. 12 | */ 13 | 14 | var path = require('path'); 15 | var cmd = require('commander'); 16 | var nodemon = require('nodemon'); 17 | var apidoc = require('../lib/index'); 18 | 19 | var argv = cmd 20 | .option('-f --file-filters ', 'RegEx-Filter to select files that should be parsed (multiple -f can be used).', collect, []) 21 | 22 | .option('-e, --exclude-filters ', 'RegEx-Filter to select files / dirs that should not be parsed (many -e can be used).', collect, []) 23 | 24 | .option('-i, --input ', 'Input/source dirname.', collect, []) 25 | 26 | .option('-o, --output ', 'Output dirname.', './doc/') 27 | 28 | .option('-t, --template