Coder Social home page Coder Social logo

Comments (8)

adamabdelhamed avatar adamabdelhamed commented on July 29, 2024

How would you want them to be handled?

from powerargs.

dhilgarth avatar dhilgarth commented on July 29, 2024

As if Description was a column, i.e. in the screenshot, the text on the new line should start under the S of "Specifies" and not at the beginning of the new line.

from powerargs.

workabyte avatar workabyte commented on July 29, 2024

i agree with this one, would definitely improve readability

from powerargs.

adamabdelhamed avatar adamabdelhamed commented on July 29, 2024

This is now published in 2.4.0. Let me know what you think.

from powerargs.

dhilgarth avatar dhilgarth commented on July 29, 2024

Thanks! The following are the results of my tests:

Using ArgUsage.GetStyledUsage<DevToolArgs>().Write();: It still looks as before.
Using ArgUsage.GenerateUsageFromTemplate<DevToolArgs>().Write();: It does indent the wrapped text, but only after a blank line:

Using a template I created on my own is currently not possible, because the documentation is missing - the obsolete message for GetStyledUsage contains only a place holder.
Additionally, I don't know which template names are valid.

from powerargs.

adamabdelhamed avatar adamabdelhamed commented on July 29, 2024

Please try the patch I released yesterday. I think it will fix the newline issue. ArgUsage.GetStyledUsage is obsolete and will not be getting these enhancements.

There is basic documentation for the templating solution here. I'll update the TODOs in the code with this link in the next release. Thanks for finding this omission.

There are 2 built in templates that are located in the PowerArgs resources class. By default, the first one is used.

PowerArgs.Resources.DefaultConsoleUsageTemplate;
PowerArgs.Resources.DefaultBrowserUsageTemplate;

You need to supply the full template string, not the name of a template. So if you build your own you should probably put it in a resource file so it's easy to pass into ArgUsage.GenerateUsageFromTemplate();

from powerargs.

dhilgarth avatar dhilgarth commented on July 29, 2024

Thanks for the explanation with the templates.

Version 2.5 still shows the same behavior with the new line.

from powerargs.

Geraint87 avatar Geraint87 commented on July 29, 2024

I'm using version 2.5.10.1 and it doesn't seem to be indenting the lines either:

ArgUsage.GenerateUsageFromTemplate<ApplicationArgs>().WriteLine();

image

from powerargs.

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.