Coder Social home page Coder Social logo

Quotes about docs HOT 9 CLOSED

dataplat avatar dataplat commented on June 29, 2024
Quotes

from docs.

Comments (9)

niphlod avatar niphlod commented on June 29, 2024 1

@wsmelton struck gold. The parser shortcircuits around PS C:\> ...
We can pass to the "better renderer" with the only culprit of needing/adding PS C:\> to whatever multiline example we have. Single lines one won't need it, but if they are there then no problem at all.
If @potatoqualitee is also willing to go this route, I'll gladly add the new snippet.

from docs.

niphlod avatar niphlod commented on June 29, 2024

don't know what "contractions" are but if you mean differencing "code" vs "the explanation of what happens when that line of code runs" I don't think so.
PS doesn't differentiate. We could do so that "the very first line is code, everything else is the explanation" but it's not a deterministic way to detect, it's just a "made up convention" we'd need to adhere to.

BTW: a better detection could be example lines starting with PS C:\> that seems consistent. Again, this is just convention.

from docs.

wsmelton avatar wsmelton commented on June 29, 2024

Contractions = don't == do not or won't == will not 😉

from docs.

wsmelton avatar wsmelton commented on June 29, 2024

@potatoqualitee the fix for this is contractions should not be used in CBH.

from docs.

niphlod avatar niphlod commented on June 29, 2024

from docs.

niphlod avatar niphlod commented on June 29, 2024

see #8 , that would coincidentally fix this, as the contractions won't (pun intended) be treated within the code block.

from docs.

wsmelton avatar wsmelton commented on June 29, 2024

Well the example on there for Get-DbaBackupInformation has the code formatted with line breaks on the piping symbol. In that particular case it needs to be all one line to show that ability. I don't see us being able to make every example just one line though simply due to the complexity on some of the commands. (Primary example of this is the Invoke-DbaLogShipping command:

https://github.com/sqlcollaborative/dbatools/blob/14a0632f5e2eaedb52303a168cf0a00cef7f34f3/functions/Invoke-DbaLogShipping.ps1#L346-L370

If we go with the method used in main PS examples and start each "new line of code" with the PS C:\>, could we then parse it differently for the index?

from docs.

niphlod avatar niphlod commented on June 29, 2024

from docs.

niphlod avatar niphlod commented on June 29, 2024

closed with the new "rendering engine"

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.