@@ -11,8 +11,9 @@ const annotations_exporter = function (pl) {
1111 const paths = pl . config . paths ;
1212 let oldAnnotations ;
1313
14- /*
15- Returns the array of comments that used to be wrapped in raw JS.
14+ /**
15+ * Parses JS annotations.
16+ * @returns array of comments that used to be wrapped in raw JS
1617 */
1718 function parseAnnotationsJS ( ) {
1819 //attempt to read the file
@@ -36,6 +37,12 @@ const annotations_exporter = function (pl) {
3637 return oldAnnotationsJSON . comments ;
3738 }
3839
40+ /**
41+ * Build the annotation markdown.
42+ * @param annotationsYAML
43+ * @param markdown_parser
44+ * @returns annotation
45+ */
3946 function buildAnnotationMD ( annotationsYAML , markdown_parser ) {
4047 const annotation = { } ;
4148 const markdownObj = markdown_parser . parse ( annotationsYAML ) ;
@@ -46,6 +53,11 @@ const annotations_exporter = function (pl) {
4653 return annotation ;
4754 }
4855
56+ /**
57+ * Parse markdown file annotations.
58+ * @param annotations
59+ * @param parser
60+ */
4961 function parseMDFile ( annotations , parser ) {
5062 //let annotations = annotations;
5163 const markdown_parser = parser ;
@@ -63,8 +75,10 @@ const annotations_exporter = function (pl) {
6375 } ;
6476 }
6577
66- /*
67- Converts the *.md file yaml list into an array of annotations
78+ /**
79+ * Converts the *.md file yaml list into an array of annotations
80+ *
81+ * @returns annotations
6882 */
6983 function parseAnnotationsMD ( ) {
7084 const markdown_parser = new mp ( ) ;
@@ -75,6 +89,11 @@ const annotations_exporter = function (pl) {
7589 return annotations ;
7690 }
7791
92+ /**
93+ * Gathers JS & MD annotations.
94+ *
95+ * @returns array of annotations
96+ */
7897 function gatherAnnotations ( ) {
7998 const annotationsJS = parseAnnotationsJS ( ) ;
8099 const annotationsMD = parseAnnotationsMD ( ) ;
0 commit comments