Closed ReeceGoding closed 3 weeks ago
These are not expected to have brackets as they are assigned mandatory in the parameter set for each of them.
Our rendering code for the doc's site must not be able to determine/detect line break is needed which is why those are not showing on different lines.
I'll see if the site can insert a newline properly so every param is on its own line (e.g. between -Database and -Query, etc)
soooo, I think I fixed this AND found a way to render our docs even better.
First, as "it is"
And as "it'll be"
Also, we weren't preserving correctly line breaks within paragraphs....
So, this is as "it is"
while this is as "it'll be"
the line break are more closely related to what the inline help has as lines
so it should be better without breaking anything for all similar helps
Slightly different, but preserved nonetheless is, e.g., EnableException, which the inline code has as
it's now currently rendered as
and it'll be
@wsmelton , @potatoqualitee , @andreasjordan , do we wanna give it a try ?
I don't see any difference going to the docs.dbatools.io. Is there a different way?
@wsmelton I was asking BEFORE implementing the changes on the site. We don't have a "test site", but I can send the modified script that the GH Action runs, so you can do what the GH Action do and build it locally if you need previews of all of the pages, if needed.
The proposed change seems good to me.
if no other comments are coming I'm going to push the changes this weekend
I pushed to the docs repo the new logic and manually refreshed the site. This PR https://github.com/dataplat/dbatools/pull/9377 just alignes the private, internal function, for people wanting to have a preview of how the docs page will be once built, with the new and "improved" rendering logic.
thank you @niphlod 😊 your docs updates are always a lifesaver.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
No error. The issue is visual. The website shows it best. The highlighted items are missing both brackets and line breaks.![image](https://github.com/dataplat/dbatools/assets/67124261/029c2eb1-11b3-4bdf-a6a4-5bbee20b92e1)
Similarly, the documentation that you see when you run
Get-Help Invoke-DbaQuery -full
is missing the brackets around the parameters that are missing both brackets and line breaks in the above screenshot.Steps to Reproduce
Check the Syntax section at either
or https://docs.dbatools.io/Invoke-DbaQuery.html
Please confirm that you are running the most recent version of dbatools
Yes. 2.1.16.
Other details or mentions
I see nothing obviously wrong in master/public/Invoke-DbaQuery.ps1, unless it's getting confused by the reference to "[MyTable]"? Perhaps I am looking in the wrong file?
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
I would be stunned if this matters.
SQL Server Edition and Build number
I would be stunned if this matters.
.NET Framework Version
I would be stunned if this matters.