Last active
March 9, 2016 14:44
-
-
Save algesten/759fd518a996b93cb894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uri: "http://tt.se/media/text/1" | |
slug: "usa-val" | |
history: [ | |
# first version also has an entry in the history | |
{uri:"http://tt.se/media/text/1", slug:"usa-val"} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uri: "http://tt.se/media/text/3" | |
slug: "usa-valetUV1" | |
history: [ | |
# previous version entry | |
{uri:"http://tt.se/media/text/2", slug:"usa-valet"} | |
# current version entry | |
{uri:"http://tt.se/media/text/3", slug:"usa-valetUV1", replacing:["http://tt.se/media/text/2"]} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uri: "http://tt.se/media/text/4" | |
slug: "usa-valUV1" | |
history: [ | |
# copied from doc1 | |
{uri:"http://tt.se/media/text/1", slug:"usa-val"}, | |
# copied from doc2 | |
{uri:"http://tt.se/media/text/2", slug:"usa-valet"}, | |
{uri:"http://tt.se/media/text/3", slug:"usa-valetUV1", replacing:["http://tt.se/media/text/2"]}, | |
# new entry for this version | |
{uri:"http://tt.se/media/text/4", slug:"usa-valUV1", replacing:["http://tt.se/media/text/1", "http://tt.se/media/text/3"]}, | |
] |
Author
algesten
commented
Mar 9, 2016
- varje dokument skriver en rad längst ner i versionslistan
- också första versionen har en ensam rad i listan (se doc1.coffee ovan)
- varje ersättning kopierar ALLA föregående dokuments historierader, i den ordning replacing-arrayen är.
- för enkla ersättningar, se doc2.coffee ovan
- för "ersätter bort", se merge.coffee ovan.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment