Here's a random example to demonstrate html
It can be messy writing a bunch of newlines in a multiline string. It's easier to use a list of strings that combine.
= Text.Combine({ "Line1", "", "Line3" }, "<br>")
Write-LogMessage Verbose -Message 'stuff' -Json @{ 'user' = 'bob'; id = 100 }
function New-SafeFileTimeNowString {
<#
.SYNOPSIS
timenow for safe filepaths: "2022-08-17_12-46-47Z"
.notes
{
"powershell.startAutomatically": true,
"powershell.enableProfileLoading": true,
"powershell.integratedConsole.showOnStartup": true,
"powershell.integratedConsole.suppressStartupBanner": false,
"powershell.promptToUpdatePackageManagement": false,
"powershell.promptToUpdatePowerShell": false,
using crazy padding as example input
let | |
joinText = (source as list, options as nullable record) as text => | |
let | |
culture = options[Culture]? ?? "en-us", | |
sep = options[Separator]? ?? ", ", | |
asText = List.Transform( | |
source, each Text.From( _, culture ) ), | |
render = Text.Combine( asText, sep ) | |
in |
I call it modern
, but it fully works on PS5.1 without changes!
In the examples below, if you add a using namespace
statement, you can remove Systems.Collections.Generic
tip: System
is always included, so you can omit that prefix anywhere as well.
using namespace system.collections.generic
[List[Object]]$users = @()
// Generated by Generate-CodepointWidthsFromUCD.ps1 -Pack:True -Full: -NoOverrides:False | |
// on 2023-05-12 05:07:14Z from Unicode 15.0.0. | |
// 321149 (0x4E67D) codepoints covered. | |
// 240 (0xF0) codepoints overridden. | |
// Override path: G:\my🍴\microsoft🧑\terminal\src\types\unicode_width_overrides.xml | |
static constexpr std::array<UnicodeRange, 297> s_wideAndAmbiguousTable{ | |
UnicodeRange{ 0xa1, 0xa1, 1 }, | |
UnicodeRange{ 0xa4, 0xa4, 1 }, | |
UnicodeRange{ 0xa7, 0xa8, 1 }, | |
UnicodeRange{ 0xaa, 0xaa, 1 }, |