Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/gov: Allow description to have newlines #1776

Closed
4 tasks
ValarDragon opened this issue Jul 20, 2018 · 6 comments
Closed
4 tasks

x/gov: Allow description to have newlines #1776

ValarDragon opened this issue Jul 20, 2018 · 6 comments

Comments

@ValarDragon
Copy link
Contributor

Summary

We should parse \n in descriptions to allow printing newlines. I think this would make the output format better in the CLI.

Proposal

Add a pre-processing step when proposing txs to parse \n's in the description as newline characters.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@cwgoes
Copy link
Contributor

cwgoes commented Jul 25, 2018

Can we just parse all escape codes a la echo -e?

@cwgoes
Copy link
Contributor

cwgoes commented Jul 25, 2018

Alternatively, we could standardize on a simple text format for descriptions, e.g. Markdown.

@ValarDragon
Copy link
Contributor Author

ValarDragon commented Jul 25, 2018

I'd be cool with using markdown. If we do that though, then I think the CLI for governance proposals should allow for reading from files, and we should perhaps get the title from the first line or first occurence of # . That should be left for a seperate proposal imo.

We should parse escape codes in the literal descriptions in the CLI (as you described), regardless of markdown support

@alexanderbez
Copy link
Contributor

Mhmm, why not have the proposal accept a possible file that adheres to a structure? (e.g. JSON w/ title description, etc...). Parsing first # seems a bit janky.

@ValarDragon
Copy link
Contributor Author

Mhmm, why not have the proposal accept a possible file that adheres to a structure? (e.g. JSON w/ title description, etc...). Parsing first # seems a bit janky.

Sounds good to me. Would you like to make a seperate proposal issue for reading from files?

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 26, 2018

Sure thing!

Edit: ref #1852

mslipper added a commit to mslipper/cosmos-sdk that referenced this issue Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants