@@ -10,8 +10,9 @@ const annotations_exporter = function (pl) {
10
10
const paths = pl . config . paths ;
11
11
let oldAnnotations ;
12
12
13
- /*
14
- Returns the array of comments that used to be wrapped in raw JS.
13
+ /**
14
+ * Parses JS annotations.
15
+ * @returns array of comments that used to be wrapped in raw JS
15
16
*/
16
17
function parseAnnotationsJS ( ) {
17
18
//attempt to read the file
@@ -38,6 +39,12 @@ const annotations_exporter = function (pl) {
38
39
return oldAnnotationsJSON . comments ;
39
40
}
40
41
42
+ /**
43
+ * Build the annotation markdown.
44
+ * @param annotationsYAML
45
+ * @param markdown_parser
46
+ * @returns annotation
47
+ */
41
48
function buildAnnotationMD ( annotationsYAML , markdown_parser ) {
42
49
const annotation = { } ;
43
50
const markdownObj = markdown_parser . parse ( annotationsYAML ) ;
@@ -48,6 +55,11 @@ const annotations_exporter = function (pl) {
48
55
return annotation ;
49
56
}
50
57
58
+ /**
59
+ * Parse markdown file annotations.
60
+ * @param annotations
61
+ * @param parser
62
+ */
51
63
function parseMDFile ( annotations , parser ) {
52
64
//let annotations = annotations;
53
65
const markdown_parser = parser ;
@@ -65,8 +77,10 @@ const annotations_exporter = function (pl) {
65
77
} ;
66
78
}
67
79
68
- /*
69
- Converts the *.md file yaml list into an array of annotations
80
+ /**
81
+ * Converts the *.md file yaml list into an array of annotations
82
+ *
83
+ * @returns annotations
70
84
*/
71
85
function parseAnnotationsMD ( ) {
72
86
const markdown_parser = new mp ( ) ;
@@ -77,6 +91,11 @@ const annotations_exporter = function (pl) {
77
91
return annotations ;
78
92
}
79
93
94
+ /**
95
+ * Gathers JS & MD annotations.
96
+ *
97
+ * @returns array of annotations
98
+ */
80
99
function gatherAnnotations ( ) {
81
100
const annotationsJS = parseAnnotationsJS ( ) ;
82
101
const annotationsMD = parseAnnotationsMD ( ) ;
0 commit comments