@@ -13,6 +13,7 @@ import { IPLUS_TABLE, ITeachKanjiComparison, IKanjiComparisonTable } from '../..
1313import { array_unique_overwrite , array_unique } from 'array-hyper-unique' ;
1414import { sortBySlugify } from '@lazy-cjk/sort' ;
1515import { compareCaseInsensitive } from '@bluelovers/string-natural-compare/core' ;
16+ import { lineSplit } from 'crlf-normalize' ;
1617
1718const data = _jpTableCmparisonBuild ( {
1819 PLUS_TABLE ,
@@ -34,7 +35,10 @@ const data = _jpTableCmparisonBuild({
3435 sortTable ( data . TABLE ) ;
3536 sortTable ( data . TABLE_SAFE ) ;
3637
38+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
3739 lines . push ( `export const TABLE: IKanjiComparisonTable = [\n${ printTable ( data . TABLE ) . join ( '\n' ) } \n];` ) ;
40+
41+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
3842 lines . push ( `export const TABLE_SAFE: IKanjiComparisonTable = [\n${ printTable ( data . TABLE_SAFE ) . join ( '\n' ) } \n];` ) ;
3943
4044 lines . push ( `` ) ;
@@ -58,7 +62,10 @@ const data = _jpTableCmparisonBuild({
5862 sortTablePlus ( data . PLUS_TABLE ) ;
5963 sortTablePlus ( data . PLUS_TABLE_SAFE ) ;
6064
65+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
6166 lines . push ( `export const PLUS_TABLE: IPLUS_TABLE = [\n${ printTable ( data . PLUS_TABLE ) . join ( '\n' ) } \n];` ) ;
67+
68+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
6269 lines . push ( `export const PLUS_TABLE_SAFE: IPLUS_TABLE = [\n${ printTable ( data . PLUS_TABLE_SAFE ) . join ( '\n' ) } \n];` ) ;
6370
6471 lines . push ( `` ) ;
@@ -89,8 +96,10 @@ const data = _jpTableCmparisonBuild({
8996
9097 let re = new RegExp ( `[${ keys . join ( '' ) } ]` , 'u' ) ;
9198
99+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
92100 lines . push ( `export const _re_table_keys = ${ re . toString ( ) } ;` ) ;
93101
102+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
94103 lines . push ( `export default _re_table_keys` ) ;
95104
96105 lines . push ( `` ) ;
@@ -109,6 +118,7 @@ const data = _jpTableCmparisonBuild({
109118
110119 lines . push ( `` ) ;
111120
121+ lines . push ( printJSDOC ( `Code generated from @lazy-cjk/jp-table-comparison/lib/table/core.ts;\nDO NOT EDIT.\n@see {@link ./table/core.ts}` ) ) ;
112122 lines . push ( `export const _table_keys = [\n${ printTable ( keys ) . join ( '\n' ) } \n];` ) ;
113123
114124 lines . push ( `export default _table_keys` ) ;
@@ -194,3 +204,11 @@ function sortTablePlus(table: IPLUS_TABLE)
194204 return comp ( s1 [ 0 ] , s2 [ 0 ] )
195205 } )
196206}
207+
208+ function printJSDOC ( msg : string )
209+ {
210+ const c = '\n * ' ;
211+
212+ return `/**${ c } ${ lineSplit ( msg ) . join ( c ) } ${ c } /`
213+ . replace ( / \* \s + \/ $ / , '*/' ) ;
214+ }
0 commit comments