documentation icon indicating copy to clipboard operation
documentation copied to clipboard

markdown_ast include comment.kind in heading (for each node)

Open adroste opened this issue 5 years ago • 2 comments

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.

adroste avatar Jul 26 '18 22:07 adroste

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.

tmcw avatar Aug 19 '18 20:08 tmcw

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.

adroste avatar Aug 19 '18 20:08 adroste