@@ -168,10 +168,11 @@ export class CXLExporter {
168168 let annotation = concept . evidenceAnnotations [ i ]
169169 let name
170170 if ( i === 0 ) {
171- name = LanguageUtils . camelize ( concept . theme . name )
171+ name = LanguageUtils . camelize ( concept . theme . name ) + '_source_' + LanguageUtils . camelize ( annotation . target [ 0 ] . source . title )
172172 } else {
173- name = LanguageUtils . camelize ( concept . theme . name + i )
173+ name = LanguageUtils . camelize ( concept . theme . name + i ) + '_source_' + LanguageUtils . camelize ( annotation . target [ 0 ] . source . title )
174174 }
175+ name = name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '' ) . replace ( / \s / g, '' )
175176 let url
176177 if ( evidenceAnnotations === 'hypothesis' ) {
177178 url = new HypothesisURL ( { elementID, name, annotation } )
@@ -212,10 +213,11 @@ export class CXLExporter {
212213 let fromName = annotation . tags [ 0 ] . replace ( 'from:' , '' )
213214 let toName = annotation . tags [ 2 ] . replace ( 'to:' , '' )
214215 if ( i === 0 ) {
215- name = LanguageUtils . camelize ( fromName ) + '_To_' + LanguageUtils . camelize ( toName )
216+ name = LanguageUtils . camelize ( fromName ) + '_To_' + LanguageUtils . camelize ( toName ) + '_source_' + LanguageUtils . camelize ( annotation . target [ 0 ] . source . title )
216217 } else {
217- name = LanguageUtils . camelize ( fromName ) + '_To_' + LanguageUtils . camelize ( toName + i )
218+ name = LanguageUtils . camelize ( fromName ) + '_To_' + LanguageUtils . camelize ( toName + i ) + '_source_' + LanguageUtils . camelize ( annotation . target [ 0 ] . source . title )
218219 }
220+ name = name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '' ) . replace ( / \s / g, '' )
219221 let url
220222 if ( evidenceAnnotations === 'hypothesis' ) {
221223 url = new HypothesisURL ( { elementID, name, annotation } )
0 commit comments