documentationjs / documentation

:book: documentation for modern JavaScript
http://documentation.js.org/
Other
5.79k stars 482 forks source link

Why is the position being removed from remark output #1378

Open koraa opened 3 years ago

koraa commented 3 years ago

f4a46b134f58639f352b3024801c3d98f901d66a

src/remark-remove-position.js

Forgive me for putting this so bluntly, but…WHY? I was using documentation.js to parse documentation and extract code blocks for ferrum.doctest and my build is failing because of the removal of the position?

I am perfectly happy with the upgrade, but removing the position might better have been a breaking change oO

koraa commented 3 years ago

(Anyway thanks for creating documentation.js I should add!!)

tmcw commented 3 years ago

You can see the recent PR that removed position in #1369. position information was bloating test fixtures (to the tune of 14k LoC) and didn't have any clear purpose in the output - apparently ferrum.doctest was using it, but it is fairly difficult as a maintainer of a large project with many users to anticipate all possible use cases.

Happy to accept a PR that would turn off position information for tests, to keep the simplification on that side, but include position information in the mdast output mode.

anthony-redFox commented 3 years ago

I will make it optional that mean make it options which switch on and doesn't remove position Object. @tmcw I'll take it.

koraa commented 3 years ago

I will make it optional that mean make it options which switch on and doesn't remove position Object. @tmcw I'll take it.

Thank you very much! :pray: