package main // The columns and icons spec's mutations for column layouts (ยง9): the // grammar's column count, the merge's second pass, and the server's // block routes. const ( columnsGo = "internal/mapa/markup/columns.go" mergeGo = "internal/mapa/markup/merge.go" markersGo = "internal/mapa/markers.go" grammarGo = "internal/mapa/grammar.go" markupPackage = "./internal/mapa/markup/" secondPassFrom = "\tif texts.anyFence() && !texts.layoutsHold(hunks) {" ) var columnMutations = []mutation{ {gate: "COL2", test: "TestShapesThatAreNotLayoutsParseAsBefore", pkg: markupPackage, name: "a one-column layout is recognised", edits: []edit{{file: columnsGo, from: "count >= 2 && count <= 4", to: "count >= 1 && count <= 4"}}}, {gate: "COL4", test: "TestEveryMergeOfLayoutEditsHoldsValidLayouts", pkg: markupPackage, name: "Merge3 skips the second pass", edits: []edit{{file: mergeGo, from: secondPassFrom, to: "\tif false {"}}}, {gate: "COL4", test: "TestEveryMergeOfLayoutEditsHoldsValidLayouts", pkg: markupPackage, name: "Merge3 runs the second pass only when clean", edits: []edit{{file: mergeGo, from: secondPassFrom, to: "\tif clean && texts.anyFence() && " + "!texts.layoutsHold(hunks) {"}}}, {gate: "COL13", test: "TestCOL13FencesAreNoBlockToMarkOrLink", name: "MarkBlock accepts a fence", edits: []edit{{file: markersGo, from: "\t\t\tmarkup.IsFence(block.Kind) {", to: "\t\t\tfalse {"}}}, {gate: "COL13", test: "TestCOL13AnotherGrammarIsRefusedAndTheDraftKept", name: "any grammar is taken", edits: []edit{{file: grammarGo, from: "\t\tif request.PostFormValue(\"grammar\") == grammarField {", to: "\t\tif true {"}}}, }