@@ -109,25 +109,25 @@ This version is much easier to read the code. It includes formatting and comment
109
109
` ` ` dataviewjs
110
110
dv.container.className += ' atx-alv1-dataview'
111
111
112
- var html = " " ;
113
- let arrABC = [];
114
- let arrPages = dv.pages( " " )
112
+ var html = " " ;
113
+ let arrABC = [];
114
+ let arrPages = dv.pages( " " )
115
115
.forEach( p =>
116
116
{
117
- const file = p.file
118
- const file_path = file.path;
119
- const file_name = file.name;
120
- const file_label = file.frontmatter.name || file.frontmatter.title || file.frontmatter.alias || file_name;
117
+ const file = p.file
118
+ const file_path = file.path;
119
+ const file_name = file.name;
120
+ const file_label = file.frontmatter.name || file.frontmatter.title || file.frontmatter.alias || file_name;
121
121
122
- const letter = file_label.charAt( 0 ).toUpperCase( );
123
- let index = arrABC.findIndex( ( item ) => item.name === letter );
122
+ const letter = file_label.charAt( 0 ).toUpperCase( );
123
+ let index = arrABC.findIndex( ( item ) => item.name === letter );
124
124
125
125
if ( index === -1 )
126
126
arrABC.push( { name: letter, pages: [ { name: file_name, label: file_label, path: file_path } ] } );
127
127
else
128
128
{
129
- var item = arrABC.find( item => item.name == letter );
130
- let arr = item.pages;
129
+ var item = arrABC.find( item => item.name == letter );
130
+ let arr = item.pages;
131
131
132
132
arr.push( { name: file_name, label: file_label, path: file_path } );
133
133
}
@@ -139,15 +139,15 @@ dv.list(
139
139
dv.array( arrABC )
140
140
.forEach( obj =>
141
141
{
142
- const arrPages = obj.pages;
142
+ const arrPages = obj.pages;
143
143
144
144
html += " \n<details><summary>" + obj.name + " </summary>\n\n" ;
145
145
146
146
Promise.all( arrPages.map( async ( pages ) =>
147
147
{
148
- const page_path = pages.path;
149
- const page_name = pages.name;
150
- const page_label = pages.label;
148
+ const page_path = pages.path;
149
+ const page_name = pages.name;
150
+ const page_label = pages.label;
151
151
152
152
const file_link = dv.fileLink( page_path, false, page_label );
153
153
0 commit comments