@@ -11,8 +11,9 @@ const annotations_exporter = function (pl) {
11
11
const paths = pl . config . paths ;
12
12
let oldAnnotations ;
13
13
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
16
17
*/
17
18
function parseAnnotationsJS ( ) {
18
19
//attempt to read the file
@@ -36,6 +37,12 @@ const annotations_exporter = function (pl) {
36
37
return oldAnnotationsJSON . comments ;
37
38
}
38
39
40
+ /**
41
+ * Build the annotation markdown.
42
+ * @param annotationsYAML
43
+ * @param markdown_parser
44
+ * @returns annotation
45
+ */
39
46
function buildAnnotationMD ( annotationsYAML , markdown_parser ) {
40
47
const annotation = { } ;
41
48
const markdownObj = markdown_parser . parse ( annotationsYAML ) ;
@@ -46,6 +53,11 @@ const annotations_exporter = function (pl) {
46
53
return annotation ;
47
54
}
48
55
56
+ /**
57
+ * Parse markdown file annotations.
58
+ * @param annotations
59
+ * @param parser
60
+ */
49
61
function parseMDFile ( annotations , parser ) {
50
62
//let annotations = annotations;
51
63
const markdown_parser = parser ;
@@ -63,8 +75,10 @@ const annotations_exporter = function (pl) {
63
75
} ;
64
76
}
65
77
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
68
82
*/
69
83
function parseAnnotationsMD ( ) {
70
84
const markdown_parser = new mp ( ) ;
@@ -75,6 +89,11 @@ const annotations_exporter = function (pl) {
75
89
return annotations ;
76
90
}
77
91
92
+ /**
93
+ * Gathers JS & MD annotations.
94
+ *
95
+ * @returns array of annotations
96
+ */
78
97
function gatherAnnotations ( ) {
79
98
const annotationsJS = parseAnnotationsJS ( ) ;
80
99
const annotationsMD = parseAnnotationsMD ( ) ;
0 commit comments