You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-Draft-Accepted/RFCNNNN-Native-Markdown-Rendering.md
+61-24Lines changed: 61 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ RFC:
3
3
Author: Aditya Patwardhan
4
4
Status: Draft
5
5
SupercededBy:
6
-
Version: 0.1
6
+
Version: 0.2
7
7
Area: Formatting and Output
8
8
Comments Due: 03/26/2018
9
9
Plan to implement: Yes
@@ -20,29 +20,65 @@ There is no easy way in PowerShell to visualize a markdown document on console.
20
20
21
21
## Specification
22
22
23
-
This RFC proposes to use VT100 escape sequences to render markdown content.
24
-
`ConvertFrom-Markdown` cmdlet as part of `Microsoft.PowerShell.MarkdownRender` PowerShell module would consume a string or a file path and output a VT100 encoded string.
25
-
Optionally, the output can be formatted as HTML.
23
+
This RFC proposes to use `VT100` escape sequences to render markdown content.
24
+
`ConvertFrom-Markdown` cmdlet as part of `Microsoft.PowerShell.Utility` PowerShell module would consume a string or a file path and output a PSObject containing three properties, `Tokens`, `Html`, `VT100EncodedString`.
25
+
The `Tokens` property has the AST for the markdown document from `markdig`.
26
+
The `Html` property has the markdown document converted to `HTML`.
27
+
The `VT100EncodedString` property has the markdown documented with `VT100` escape sequences.
28
+
By default, the `Tokens`and `Html` properties will be populated.
29
+
The `VT100EncodedString` property will be populated only when `-AsVT100EncodedString` is specified.
30
+
26
31
For converting strings to VT100 coded strings, we will be writing an extension to [markdig](https://github.com/lunet-io/markdig).
27
32
The extension will insert VT100 escape sequences as appropriate.
-**Path** : Accepts an array of file paths with markdown content.
40
49
-**LiteralPath** : Accepts an array of literal paths with markdown content.
41
-
-**InputObject** : Accepts an InputObject of `System.IO.FileSystemInfo`, `string` type.
42
-
-**AsHTML** : When selected, the output will be HTML.
43
-
-**AsPlainText** : When selected, the output will be plain text.
50
+
-**InputObject** : Accepts an InputObject of `System.IO.FileInfo`, `string` type.
51
+
-**AsVT100EncodedString** : When selected, the `VT100EncodedString` property is populated.
52
+
53
+
There will be support for changing the colors for various elements using the `Set-MarkdownOption` cmdlet. To retrieve the current settings `Get-MarkdownOption` cmdlet can be used.
0 commit comments