mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 02:46:04 +01:00 
			
		
		
		
	Refactor HTMLFormat, update chroma render, fix js error (#33136)
A small refactor to improve HTMLFormat, to help to prevent low-level mistakes. And fix #33141, fix #33139
This commit is contained in:
		| @@ -17,7 +17,8 @@ export function initGlobalDeleteButton(): void { | ||||
|   // Some model/form elements will be filled by `data-id` / `data-name` / `data-data-xxx` attributes. | ||||
|   // If there is a form defined by `data-form`, then the form will be submitted as-is (without any modification). | ||||
|   // If there is no form, then the data will be posted to `data-url`. | ||||
|   // TODO: it's not encouraged to use this method. `show-modal` does far better than this. | ||||
|   // TODO: do not use this method in new code. `show-modal` / `link-action(data-modal-confirm)` does far better than this. | ||||
|   // FIXME: all legacy `delete-button` should be refactored to use `show-modal` or `link-action` | ||||
|   for (const btn of document.querySelectorAll<HTMLElement>('.delete-button')) { | ||||
|     btn.addEventListener('click', (e) => { | ||||
|       e.preventDefault(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user