Closed HarmVeenstra closed 1 year ago
GitHub removed that, it looks like this
and
please test and reproduce your issue within a clean environment
And how should I do that? I don't have another Wordpress site?
local webserver or staging environment such issues are in 99,9% of all cases caused by a theme or third party plugin.... for me it's extremely frustrating and time consuming to debug users websites..
without providing a real code snippet i'm unable to test it. btw i'll move it to the wordpress plugin repo - please answer all questions within the issue template..
For example this code:
Start-Transcript -Path c:\windows\temp\printers.log
$Printers = Import-Csv .\printers.csv
$infs = get-childitem -Path . -Filter "*.inf" -Recurse -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Fullname
$totalnumberofinfs = $infs.Count $currentnumber = 1 Write-Host ("[Install printer driver(s)]`n") -ForegroundColor Green Foreach ($inf in $infs) { Write-Host ("[{0}/{1}] Adding inf file {2}" -f $currentnumber, $totalnumberofinfs, $inf) -ForegroundColor Green try { c:\windows\sysnative\Pnputil.exe /a $inf | Out-Null } catch { try { c:\windows\system32\Pnputil.exe /a $inf | Out-Null } catch { C:\Windows\SysWOW64\pnputil.exe /a $inf | Out-Null } } $currentnumber++ }
$totalnumberofdrivers = ($printers.drivername | Select-Object -Unique).count $currentnumber = 1 Write-Host ("`n[Add printerdriver(s) to Windows]") -ForegroundColor Green foreach ($driver in $printers.drivername | Select-Object -Unique) { Write-Host ("[{0}/{1}] Adding printerdriver {2}" -f $currentnumber, $totalnumberofdrivers, $driver) -ForegroundColor Green Add-PrinterDriver -Name $driver $currentnumber++ }
is translated to this
do you've enabled "markdown" as editing method but still using the visual integration ?
I did enable MarkDown support in WordPress, yes. I use Enlighter with PowerShell support for better visuals and line numbers. The screenshot above is from what you get when using the Copy button, it adds XML-like tags
Looks like this on the WordPress page
disable the markdown support. you cannot use both.
Switched it and yes! Thanks, forgot about that!
If users copy PowerShell code from blog posts on my website powershellisfun.com, they receive extra XML tags like this in the output:
$codeblock = "
"
The original code was:
$codeblock = "``````"
(Blog post : https://powershellisfun.com/2023/02/01/export-pipeline-output-to-a-markdown-file-using-powershell/)
Another example:
Write-Host ("[Install printer driver(s)]
n") -ForegroundColor Green
Original code:
Write-Host ("`n[Add printerdriver(s) to Windows]") -ForegroundColor Green
(Blog post: https://powershellisfun.com/2022/12/05/adding-printer-drivers-and-printers-using-microsoft-intune-and-powershell/)