-
Notifications
You must be signed in to change notification settings - Fork 1
/
debug.ps1
26 lines (21 loc) · 1.03 KB
/
debug.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<#
$lookup = [TextMateSharp.Grammars.RegistryOptions]::new('red')
$reg = [TextMateSharp.Registry.Registry]::new($lookup)
$theme = $reg.GetTheme()
$theme | Get-Member -MemberType Method
$grammar = $reg.LoadGrammar($lookup.GetScopeByExtension('.md'))
$grammar | Get-Member -MemberType Method
#>
Push-Location $PSScriptRoot
& ./build.ps1
Import-Module ./Module/PSTextMate.psd1
$md = @'
[fancy title](https://www.google.com)
'@
[PwshSpectreConsole.TextMate.Test]::DebugTextMate($md, [TextMateSharp.Grammars.ThemeName]::Dark, 'markdown')
Pop-Location
# $x = [Spectre.Console.Style]::new([Spectre.Console.Color]::Aqua, [Spectre.Console.Color]::Default, [Spectre.Console.Decoration]::Underline, 'https://foo.bar')
# [Spectre.Console.Markup]::new('hello', $x)
# [Spectre.Console.Markup]::new("[link=https://foo.com]$([Spectre.Console.Markup]::escape('[foo]'))[/]")
# [Spectre.Console.Markup]::new("[link=https://foo.com]$([Spectre.Console.Markup]::escape('[foo]'))[/]")
# [Spectre.Console.Markup]::new('[link=https://foo.com]foo[/]')