зеркало из https://github.com/nextcloud/text.git
1 строка
8.9 KiB
Plaintext
1 строка
8.9 KiB
Plaintext
|
{"version":3,"file":"asciidoc-C3rtDKIN.chunk.mjs","sources":["../node_modules/highlight.js/lib/languages/asciidoc.js"],"sourcesContent":["/*\nLanguage: AsciiDoc\nRequires: xml.js\nAuthor: Dan Allen <dan.j.allen@gmail.com>\nWebsite: http://asciidoc.org\nDescription: A semantic, text-based document format that can be exported to HTML, DocBook and other backends.\nCategory: markup\n*/\n\n/** @type LanguageFn */\nfunction asciidoc(hljs) {\n const regex = hljs.regex;\n const HORIZONTAL_RULE = {\n begin: '^\\'{3,}[ \\\\t]*$',\n relevance: 10\n };\n const ESCAPED_FORMATTING = [\n // escaped constrained formatting marks (i.e., \\* \\_ or \\`)\n { begin: /\\\\[*_`]/ },\n // escaped unconstrained formatting marks (i.e., \\\\** \\\\__ or \\\\``)\n // must ignore until the next formatting marks\n // this rule might not be 100% compliant with Asciidoctor 2.0 but we are entering undefined behavior territory...\n { begin: /\\\\\\\\\\*{2}[^\\n]*?\\*{2}/ },\n { begin: /\\\\\\\\_{2}[^\\n]*_{2}/ },\n { begin: /\\\\\\\\`{2}[^\\n]*`{2}/ },\n // guard: constrained formatting mark may not be preceded by \":\", \";\" or\n // \"}\". match these so the constrained rule doesn't see them\n { begin: /[:;}][*_`](?![*_`])/ }\n ];\n const STRONG = [\n // inline unconstrained strong (single line)\n {\n className: 'strong',\n begin: /\\*{2}([^\\n]+?)\\*{2}/\n },\n // inline unconstrained strong (multi-line)\n {\n className: 'strong',\n begin: regex.concat(\n /\\*\\*/,\n /((\\*(?!\\*)|\\\\[^\\n]|[^*\\n\\\\])+\\n)+/,\n /(\\*(?!\\*)|\\\\[^\\n]|[^*\\n\\\\])*/,\n /\\*\\*/\n ),\n relevance: 0\n },\n // inline constrained strong (single line)\n {\n className: 'strong',\n // must not precede or follow a word character\n begin: /\\B\\*(\\S|\\S[^\\n]*?\\S)\\*(?!\\w)/\n },\n // inline constrained strong (multi-line)\n {\n className: 'strong',\n // must not precede or follow a word character\n begin: /\\*[^\\s]([^\\n]+\\n)+([^\\n]+)\\*/\n }\n ];\n const EMPHASIS = [\n // inline unconstrained emphasis (single line)\n {\n className: 'emphasis',\n begin: /_{2}([^\\n]+?)_{2}/\n },\n // inline unconstrained emphasis (multi-line)\n {\n className: 'emphasis',\n begin: regex.concat(\n /__/,\n /((_(?!_)|\\\\[^\\n]|[^_\\n\\\\])+\\n)+/,\n /(_(?!_)|\\\\[^\\n]|[^_\\n\\\\])*/,\n /__/\n ),\n relevance: 0\n },\n // inline constrained emphasis (single line)\n {\n className: 'emphasis',\n // must not precede or follow a word character\n begin: /\\b_(\\S|\\S[^\\n]*?\\S)_(?!\\w)/\n },\n // inline constrained emphasis (multi-line)\n {\n className: 'emphasis',\n // must not precede or follow a word character\n begin: /_[^\\s]([^\\n]+\\n)+([^\\n]+)_/\n },\n // inline constrained emphasis using single quote (legacy)\n {\n className: 'emphasis',\n // must not follow a word character or be followed by a single quote or space\n begin: '\\\\B\\'(?![\\'\\\\s])',\n end: '(\\\\n{2}|\\')',\n // allow escaped single quote followed by word char\n contains: [\n {\n begin: '\\\\\\\\\\'\\\\w',\n relevance: 0\n }\n ],\n relevance: 0\n }\n ];\n const ADMONITION = {\n className: 'symbol',\n begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\\\s+',\n relevance: 10\n };\n const BULLET_LIST = {\n className: 'bullet',\n begin: '^(\\\\*+|-+|\\\\.+|[^\\\\n]+?::)\\\\s+'\n };\n\n return {\n name: 'AsciiDoc',\n aliases: [ 'adoc' ],\n contains: [\n // block comment\n hljs.COMMENT(\n '^/{4,}\\\\n',\n '\\\\n/{4,}$',\n // can also be done as...\n // '^/{4,}$',\n // '^/{4,}$',\n { relevance: 10 }\n ),\n // line comment\n hljs.COMMENT(\n '^//',\n '$',\n { relevance: 0 }\n ),\n // title\n {\n className: 'title',\n
|