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

Markdown parsing in doc comments #5891

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Jan 24, 2025

fixes #2389

  • add tests for markdown parsing

Comment on lines +207 to +209
[[example]]
name = "markdown-derive"
required-features = ["derive"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this example or incorporate it in others once it's finished, was more for testing while developing.

Comment on lines +135 to +136
// TODO If we decide not to support any colors, we can replace this with
// anstyle::Effects and remove the need for applying them all individually.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decide whether we want to support colors.

Comment on lines +147 to +156
let style_heading = Style::new().bold();
let style_emphasis = Style::new().italic();
let style_strong = Style::new().bold();
let style_strike_through = Style::new().strikethrough();
let style_link = Style::new().underline();
// TODO decide how to style code
let style_code = Style::new().dimmed();
let tab_width = 2;
// TODO UNICODE let list_symbol = '•';
let list_symbol = '-';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decide markdown styling

Comment on lines +241 to +246
// TODO for anything useful we'd need to know the terminal width
Event::Rule => {
writer.endline();
writer.newline();
write!(writer, "---\n\n");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we render rule as --- or is there anything else we can do without terminal width

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clap derive should parse markdown doc comment into normal text
1 participant