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_ast include comment.kind in heading (for each node) #1111

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

Conversation

adroste
Copy link

@adroste adroste commented Jul 26, 2018

Markdown output won't include anything that clearly reveals the kind of a named item.
You have to analyse the output (by looking at the naming or at the displayed subheadings) to figure out if something is a class, a function, etc.

My proposal:

before:

## myClass

## myFunc

after:

## _class_ myClass

## _function_ myFunc

Works great for me. Next step could be adding a cli option to turn this on or off.

Feel free to change the code/proposal the way you like it. I don't mind how it is displayed as long as the kind is included in the output.

Unit-tests for this module must be adapted to this change.

@tmcw
Copy link
Member

tmcw commented Aug 19, 2018

I'm not sure about this change - I'd welcome some input from other folks yay or nay. Essentially, I think it'd be preferable to represent things like

class Foo

method(params)

property

Instead of prepending the type to each item, which seems to introduce a lot of repetitive noise into Markdown documentation.

@adroste
Copy link
Author

adroste commented Aug 19, 2018

It definitely depends on the personal preference. I'd like to see different kinds/types to be visually separated. However i agree that prepending the kind to each item can be "too much". Maybe you can work something (nice and clean) out in the future.

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.

None yet

2 participants