mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Frontend refactor, PascalCase to camelCase, remove unused code (#17365)
* Frontend refactor, PascalCase to camelCase, remove unused code * fix
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
const {MermaidMaxSourceCharacters} = window.config;
 | 
			
		||||
const {mermaidMaxSourceCharacters} = window.config;
 | 
			
		||||
 | 
			
		||||
function displayError(el, err) {
 | 
			
		||||
  el.closest('pre').classList.remove('is-loading');
 | 
			
		||||
@@ -26,8 +26,8 @@ export async function renderMermaid(els) {
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  for (const el of els) {
 | 
			
		||||
    if (MermaidMaxSourceCharacters >= 0 && el.textContent.length > MermaidMaxSourceCharacters) {
 | 
			
		||||
      displayError(el, new Error(`Mermaid source of ${el.textContent.length} characters exceeds the maximum allowed length of ${MermaidMaxSourceCharacters}.`));
 | 
			
		||||
    if (mermaidMaxSourceCharacters >= 0 && el.textContent.length > mermaidMaxSourceCharacters) {
 | 
			
		||||
      displayError(el, new Error(`Mermaid source of ${el.textContent.length} characters exceeds the maximum allowed length of ${mermaidMaxSourceCharacters}.`));
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ export function initMarkupTasklist() {
 | 
			
		||||
 | 
			
		||||
          await $.post(updateUrl, {
 | 
			
		||||
            ignore_attachments: true,
 | 
			
		||||
            _csrf: window.config.csrf,
 | 
			
		||||
            _csrf: window.config.csrfToken,
 | 
			
		||||
            content: newContent,
 | 
			
		||||
            context
 | 
			
		||||
          });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user