mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-11 16:12:06 +08:00
Detect and warn about unresolved Git merge conflicts
This commit is contained in:
parent
b740c56376
commit
3135869903
@ -582,6 +582,14 @@ function autoParseJSON(data, feedback) {
|
||||
data = JSON.parse(data)
|
||||
} catch (err) {
|
||||
if (feedback === false) return;
|
||||
if (data.match(/\n\r?[><]{7}/)) {
|
||||
Blockbench.showMessageBox({
|
||||
title: 'message.invalid_file.title',
|
||||
icon: 'fab.fa-git-alt',
|
||||
message: 'message.invalid_file.merge_conflict'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let error_part = '';
|
||||
function logErrantPart(whole, start, length) {
|
||||
var line = whole.substr(0, start).match(/\n/gm)
|
||||
|
@ -246,6 +246,7 @@
|
||||
"message.screenshot.right_click": "Right click or long press the screenshot to copy",
|
||||
"message.invalid_file.title": "Invalid File",
|
||||
"message.invalid_file.message": "Could not open json file: %0",
|
||||
"message.invalid_file.merge_conflict": "The file contains unresolved Git merge conflicts.",
|
||||
"message.invalid_model.title": "Invalid Model File",
|
||||
"message.invalid_model.message": "This file does not contain valid model data.",
|
||||
"message.invalid_format.title": "Invalid Format",
|
||||
|
Loading…
Reference in New Issue
Block a user