@ -107,8 +107,9 @@ class ComboMarkdownEditor {
expander ? . addEventListener ( 'text-expander-change' , ( { detail : { key , provide , text } } ) => {
expander ? . addEventListener ( 'text-expander-change' , ( { detail : { key , provide , text } } ) => {
if ( key === ':' ) {
if ( key === ':' ) {
const matches = [ ] ;
const matches = [ ] ;
const textLowerCase = text . toLowerCase ( ) ;
for ( const name of emojiKeys ) {
for ( const name of emojiKeys ) {
if ( name . includes( text ) ) {
if ( name . toLowerCase( ) . includes( text LowerCase ) ) {
matches . push ( name ) ;
matches . push ( name ) ;
if ( matches . length >= maxExpanderMatches ) break ;
if ( matches . length >= maxExpanderMatches ) break ;
}
}
@ -129,8 +130,9 @@ class ComboMarkdownEditor {
provide ( { matched : true , fragment : ul } ) ;
provide ( { matched : true , fragment : ul } ) ;
} else if ( key === '@' ) {
} else if ( key === '@' ) {
const matches = [ ] ;
const matches = [ ] ;
const textLowerCase = text . toLowerCase ( ) ;
for ( const obj of window . config . tributeValues ) {
for ( const obj of window . config . tributeValues ) {
if ( obj . key . includes( text ) ) {
if ( obj . key . toLowerCase( ) . includes( text LowerCase ) ) {
matches . push ( obj ) ;
matches . push ( obj ) ;
if ( matches . length >= maxExpanderMatches ) break ;
if ( matches . length >= maxExpanderMatches ) break ;
}
}