alexprey / sveltedoc-parser

Generate a JSON documentation for a Svelte (https://github.com/sveltejs/svelte) component
https://www.npmjs.com/package/sveltedoc-parser
MIT License
90 stars 7 forks source link

Comments not parsed properly (repeated) for multipe named exports #69

Closed ekhaled closed 3 years ago

ekhaled commented 3 years ago
<script>
    /* The `a` variable description */
    let a = 1,
      /* The `b` variable description */
      b = 'Test',
      /* The `c` variable description */
      c = 'TestC';
</script>

Results in:


{
 //...
 "data":[
   {
      //...
      "description": "The `a` variable description",
      "name": "a",
      "kind": "let",
      //...
   },
   {
      //...
      "description": "The `a` variable description",
      "name": "b",
      "kind": "let",
      //...
   },
   {
      //...
      "description": "The `a` variable description",
      "name": "c",
      "kind": "let",
      //...
   },
 ]
}