esdoc / esdoc

ESDoc - Good Documentation for JavaScript
https://esdoc.org
MIT License
2.74k stars 205 forks source link

Rework comment indentation to support non-JSDoc styles #505

Open pzuraq opened 6 years ago

pzuraq commented 6 years ago

Make sure these boxes are checked before submitting your issue - thank you! (If your issue is neither a both bug nor a request, please write in a free style)

Short summary of your issue

We'd like to support the following comment style:

/**
  A foo class

  ```js
  foo({
    bar: 'baz'
  })
  \```

  @anArbitraryTag
*/

This is much easier to use when typing code examples, but currently all leading space gets stripped due to this line here. A better strategy may be to check for the indentation level of the first non-star character and strip up to that level instead. I can implement this if you agree, just let me know.

MattMcFarland commented 6 years ago

This project is dead, consider contributing to esdoc2 instead! https://github.com/esdoc2/esdoc2