From 4a7ae4f2f8196f0336dca2f620e98d636c890ae1 Mon Sep 17 00:00:00 2001 From: vwxyzh Date: Mon, 12 Jun 2017 15:48:50 +0800 Subject: [PATCH 1/3] update document for dev-lang. --- Documentation/spec/docfx_flavored_markdown.md | 187 +++++++++++++++++- 1 file changed, 178 insertions(+), 9 deletions(-) diff --git a/Documentation/spec/docfx_flavored_markdown.md b/Documentation/spec/docfx_flavored_markdown.md index ebb0382026f..e75ce8ca710 100644 --- a/Documentation/spec/docfx_flavored_markdown.md +++ b/Documentation/spec/docfx_flavored_markdown.md @@ -136,16 +136,185 @@ Allows you to insert code with code language specified. The content of specified ``` ### Tag Name Representation in Code Snippet Source File -DFM currently only supports the following __``__ values to be able to retrieve by tag name: -* C#: cs, csharp -* VB: vb, vbnet -* C++: cpp, c++ -* F#: fsharp -* XML: xml -* Html: html -* SQL: sql -* Javascript: javascript +DFM currently supports the following __``__ values to be able to retrieve by tag name: +* C family + - Start with: `// <{name}>` + - End with: `// ` + - Languages: + * actionscript + * arduino + * assembly (alias: nasm) + * c (alias: cpp, c++, objective-c, obj-c, objc, objectivec) + * csharp (alias: cs) + * cuda + * d (alias: dlang) + * fsharp (alias: fs) + * go (alias: golang) + * java + * javascript (alias: js, node) + * pascal + * php + * processing + * rust + * scala + * smalltalk + * swift + * typescript (alias: ts) + - File extensions: + * .as + * .asm + * .ino + * .c + * .cc + * .cpp + * .cs + * .cu + * .cuh + * .d + * .fs + * .fsi + * .fsx + * .go + * .h + * .hpp + * .java + * .js + * .pas + * .php + * .pde + * .rs + * .scala + * .st + * .swift + * .ts +* Basic family + - Start with: `' <{name}>` + - End with: `' ` + - Languages: + * vb + * vbnet + * vbscript + - File extensions: + * .vb + * .bas + * .vbs + * .vba +* Markup language family + - Start with: `` + - End with: `'` + - Languages: + * cshtml + * html + * vbhtml + * wsdl + * xml + * xsl + * xslt + * xsd + * xaml + - File extensions: + * .asp + * .aspx + * .csdl + * .cshtml + * .edmx + * .jsp + * .vbhtml + * .wsdl + * .xaml + * .xml + * .xsd + * .xsl + * .xslt + * .html +* Sql family + - Start with: `-- <{name}>` + - End with: `-- ` + - Languages: + * sql + - File extensions: + * .sql +* Script family + - Start with: `# <{name}>` + - End with: `# ` + - Languages: + * perl + * powershell (alias: posh) + * python + * r + * ruby (alias: ru) + * shell (alias: sh, bash) + - File extensions: + * .bash + * .pl + * .ps1 + * .py + * .r + * .ru + * .ruby + * .sh +* Special language + * batchfile + - Start with: `rem <{name}>` + - End with: `rem ` + - Languages: + * batchfile + - File extensions: + * .bat + * .cmd + * csharp + - Start with: `# region {name}` + - End with: `#endregion` + - Languages: + * csharp (alias: cs) + - File extensions: + * .cs + * erlang + - Start with: `% <{name}>` + - End with: `% ` + - Languages: + * erlang + - File extensions: + * .erl + * haskell + - Start with: `-- <{name}>` + - End with: `-- ` + - Languages: + * haskell + - File extensions: + * .hs + * matlab + - Start with: `% <{name}>` + - End with: `% ` + - Languages: + * matlab + - File extensions: + * .matlab + * lisp + - Start with: `; <{name}>` + - End with: `; ` + - Languages: + * lisp + - File extensions: + * .lisp + * .lsp + * lua + - Start with: `-- <{name}>` + - End with: `-- ` + - Languages: + * lua + - File extensions: + * .lua + * vb + - Start with: `#Region {name}` + - End with: `#End Region` + - Languages: + * vb (alias: vbnet) + - File extensions: + * .vb +> [!Note] +> File extensions will be used without mentioning dev-lang. ## Note (Warning/Tip/Important) Using specific syntax inside block quote to indicate the following content is Note. From f8319feea7afacb923b478360ef566e8d44fc5b1 Mon Sep 17 00:00:00 2001 From: vwxyzh Date: Mon, 12 Jun 2017 17:28:31 +0800 Subject: [PATCH 2/3] update. --- Documentation/spec/docfx_flavored_markdown.md | 220 +++++++++--------- 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/Documentation/spec/docfx_flavored_markdown.md b/Documentation/spec/docfx_flavored_markdown.md index e75ce8ca710..6bcecaf5f4f 100644 --- a/Documentation/spec/docfx_flavored_markdown.md +++ b/Documentation/spec/docfx_flavored_markdown.md @@ -141,180 +141,180 @@ DFM currently supports the following __``__ values to be able to retri - Start with: `// <{name}>` - End with: `// ` - Languages: - * actionscript - * arduino - * assembly (alias: nasm) - * c (alias: cpp, c++, objective-c, obj-c, objc, objectivec) - * csharp (alias: cs) - * cuda - * d (alias: dlang) - * fsharp (alias: fs) - * go (alias: golang) - * java - * javascript (alias: js, node) - * pascal - * php - * processing - * rust - * scala - * smalltalk - * swift - * typescript (alias: ts) + actionscript, + arduino, + assembly (alias: nasm), + c (alias: cpp, c++, objective-c, obj-c, objc, objectivec), + csharp (alias: cs), + cuda, + d (alias: dlang), + fsharp (alias: fs), + go (alias: golang), + java, + javascript (alias: js, node), + pascal, + php, + processing, + rust, + scala, + smalltalk, + swift, + typescript (alias: ts) - File extensions: - * .as - * .asm - * .ino - * .c - * .cc - * .cpp - * .cs - * .cu - * .cuh - * .d - * .fs - * .fsi - * .fsx - * .go - * .h - * .hpp - * .java - * .js - * .pas - * .php - * .pde - * .rs - * .scala - * .st - * .swift - * .ts + .as, + .asm, + .ino, + .c, + .cc, + .cpp, + .cs, + .cu, + .cuh, + .d, + .fs, + .fsi, + .fsx, + .go, + .h, + .hpp, + .java, + .js, + .pas, + .php, + .pde, + .rs, + .scala, + .st, + .swift, + .ts * Basic family - Start with: `' <{name}>` - End with: `' ` - Languages: - * vb - * vbnet - * vbscript + vb, + vbnet, + vbscript - File extensions: - * .vb - * .bas - * .vbs - * .vba + .vb, + .bas, + .vbs, + .vba * Markup language family - Start with: `` - End with: `'` - Languages: - * cshtml - * html - * vbhtml - * wsdl - * xml - * xsl - * xslt - * xsd - * xaml + cshtml, + html, + vbhtml, + wsdl, + xml, + xsl, + xslt, + xsd, + xaml - File extensions: - * .asp - * .aspx - * .csdl - * .cshtml - * .edmx - * .jsp - * .vbhtml - * .wsdl - * .xaml - * .xml - * .xsd - * .xsl - * .xslt - * .html + .asp, + .aspx, + .csdl, + .cshtml, + .edmx, + .jsp, + .vbhtml, + .wsdl, + .xaml, + .xml, + .xsd, + .xsl, + .xslt, + .html * Sql family - Start with: `-- <{name}>` - End with: `-- ` - Languages: - * sql + sql - File extensions: - * .sql + .sql * Script family - Start with: `# <{name}>` - End with: `# ` - Languages: - * perl - * powershell (alias: posh) - * python - * r - * ruby (alias: ru) - * shell (alias: sh, bash) + perl, + powershell (alias: posh), + python, + r, + ruby (alias: ru), + shell (alias: sh, bash) - File extensions: - * .bash - * .pl - * .ps1 - * .py - * .r - * .ru - * .ruby - * .sh + .bash, + .pl, + .ps1, + .py, + .r, + .ru, + .ruby, + .sh * Special language * batchfile - Start with: `rem <{name}>` - End with: `rem ` - Languages: - * batchfile + batchfile - File extensions: - * .bat - * .cmd + .bat + .cmd * csharp - Start with: `# region {name}` - End with: `#endregion` - Languages: - * csharp (alias: cs) + csharp (alias: cs) - File extensions: - * .cs + .cs * erlang - Start with: `% <{name}>` - End with: `% ` - Languages: - * erlang + erlang - File extensions: - * .erl + .erl * haskell - Start with: `-- <{name}>` - End with: `-- ` - Languages: - * haskell + haskell - File extensions: - * .hs + .hs * matlab - Start with: `% <{name}>` - End with: `% ` - Languages: - * matlab + matlab - File extensions: - * .matlab + .matlab * lisp - Start with: `; <{name}>` - End with: `; ` - Languages: - * lisp + lisp - File extensions: - * .lisp - * .lsp + .lisp, + .lsp * lua - Start with: `-- <{name}>` - End with: `-- ` - Languages: - * lua + lua - File extensions: - * .lua + .lua * vb - Start with: `#Region {name}` - End with: `#End Region` - Languages: - * vb (alias: vbnet) + vb (alias: vbnet) - File extensions: - * .vb + .vb > [!Note] -> File extensions will be used without mentioning dev-lang. +> If dev-lang is not specified, file extension will be used to determine the language. ## Note (Warning/Tip/Important) Using specific syntax inside block quote to indicate the following content is Note. From b51df57b7ab17af617f1100abc228c2388bb3832 Mon Sep 17 00:00:00 2001 From: vwxyzh Date: Tue, 13 Jun 2017 09:35:57 +0800 Subject: [PATCH 3/3] remove tab. --- Documentation/spec/docfx_flavored_markdown.md | 158 +++++++++--------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/Documentation/spec/docfx_flavored_markdown.md b/Documentation/spec/docfx_flavored_markdown.md index 6bcecaf5f4f..1f16f8fe8fe 100644 --- a/Documentation/spec/docfx_flavored_markdown.md +++ b/Documentation/spec/docfx_flavored_markdown.md @@ -142,117 +142,117 @@ DFM currently supports the following __``__ values to be able to retri - End with: `// ` - Languages: actionscript, - arduino, - assembly (alias: nasm), - c (alias: cpp, c++, objective-c, obj-c, objc, objectivec), - csharp (alias: cs), - cuda, - d (alias: dlang), - fsharp (alias: fs), - go (alias: golang), - java, - javascript (alias: js, node), - pascal, - php, - processing, - rust, - scala, - smalltalk, - swift, - typescript (alias: ts) + arduino, + assembly (alias: nasm), + c (alias: cpp, c++, objective-c, obj-c, objc, objectivec), + csharp (alias: cs), + cuda, + d (alias: dlang), + fsharp (alias: fs), + go (alias: golang), + java, + javascript (alias: js, node), + pascal, + php, + processing, + rust, + scala, + smalltalk, + swift, + typescript (alias: ts) - File extensions: .as, .asm, .ino, - .c, - .cc, - .cpp, - .cs, - .cu, - .cuh, - .d, - .fs, - .fsi, - .fsx, - .go, - .h, - .hpp, - .java, - .js, - .pas, - .php, - .pde, - .rs, - .scala, - .st, - .swift, - .ts + .c, + .cc, + .cpp, + .cs, + .cu, + .cuh, + .d, + .fs, + .fsi, + .fsx, + .go, + .h, + .hpp, + .java, + .js, + .pas, + .php, + .pde, + .rs, + .scala, + .st, + .swift, + .ts * Basic family - Start with: `' <{name}>` - End with: `' ` - Languages: vb, - vbnet, - vbscript + vbnet, + vbscript - File extensions: .vb, - .bas, - .vbs, - .vba + .bas, + .vbs, + .vba * Markup language family - Start with: `` - End with: `'` - Languages: - cshtml, - html, - vbhtml, - wsdl, + cshtml, + html, + vbhtml, + wsdl, xml, - xsl, - xslt, - xsd, - xaml + xsl, + xslt, + xsd, + xaml - File extensions: - .asp, - .aspx, - .csdl, - .cshtml, - .edmx, - .jsp, - .vbhtml, - .wsdl, + .asp, + .aspx, + .csdl, + .cshtml, + .edmx, + .jsp, + .vbhtml, + .wsdl, .xaml, .xml, - .xsd, - .xsl, - .xslt, - .html + .xsd, + .xsl, + .xslt, + .html * Sql family - Start with: `-- <{name}>` - End with: `-- ` - Languages: sql - File extensions: - .sql + .sql * Script family - Start with: `# <{name}>` - End with: `# ` - Languages: perl, - powershell (alias: posh), - python, - r, - ruby (alias: ru), - shell (alias: sh, bash) + powershell (alias: posh), + python, + r, + ruby (alias: ru), + shell (alias: sh, bash) - File extensions: .bash, - .pl, - .ps1, - .py, - .r, - .ru, - .ruby, - .sh + .pl, + .ps1, + .py, + .r, + .ru, + .ruby, + .sh * Special language * batchfile - Start with: `rem <{name}>`