mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	Update JS dependencies, remove space after emoji completion (#25266)
- Update all JS dependencies - Enable stylint [`media-feature-name-value-no-unknown`](https://stylelint.io/user-guide/rules/media-feature-name-value-no-unknown) - Make use of new features in webpack and text-expander-element - Tested Swagger and Mermaid To explain the `text-expander-element` change: Before this version, the element added a unavoidable space after emoji completion. Now that https://github.com/github/text-expander-element/pull/36 is in, we gain control over this space and I opted to remove it for emoji completion and retain it for `@` mentions. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -53,7 +53,9 @@ export function initTextExpander(expander) {
 | 
			
		||||
  });
 | 
			
		||||
  expander?.addEventListener('text-expander-value', ({detail}) => {
 | 
			
		||||
    if (detail?.item) {
 | 
			
		||||
      detail.value = detail.item.getAttribute('data-value');
 | 
			
		||||
      // add a space after @mentions as it's likely the user wants one
 | 
			
		||||
      const suffix = detail.key === '@' ? ' ' : '';
 | 
			
		||||
      detail.value = `${detail.item.getAttribute('data-value')}${suffix}`;
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user