Skip to content

Commit

Permalink
Merge pull request #358 from peschmae/feat/markdown-using-indent
Browse files Browse the repository at this point in the history
Markdown/Code block compatible output
  • Loading branch information
HeavyWombat authored Jun 5, 2024
2 parents c382d51 + f8890da commit c7a780c
Show file tree
Hide file tree
Showing 13 changed files with 973 additions and 42 deletions.
82 changes: 82 additions & 0 deletions assets/binary/expected-dyff.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

@@ yaml.data @@
! ± content change
- 00000000 42 5a 68 39 31 41 59 26 53 59 15 bf f1 2e 00 00 |BZh91AY&SY......|
- 00000010 38 7f ff f7 fe df ef f6 ff 2f fa 2b ff 4f df 2e |8......../.+.O..|
- 00000020 7a 7a fe 5f 7e bb df 3f 7f ff fe d7 7a 37 fd 5b |zz._~..?....z7.[|
- 00000030 76 7d ff b0 01 19 b4 88 3d 40 00 3d 40 00 0d 00 |v}......=@.=@...|
- 00000040 00 1a 03 46 8d 00 00 03 40 1a 34 00 68 00 19 00 |...F....@.4.h...|
- 00000050 00 0d 0f 50 00 d0 03 d2 0c 9e a0 3d 34 66 94 40 |...P.......=4f.@|
- 00000060 00 00 00 d0 19 0f 50 00 d0 c8 32 00 06 80 d0 d0 |......P...2.....|
- 00000070 00 34 07 a8 d3 d4 6d 40 00 34 68 69 ea 68 f5 0d |.4....m@.4hi.h..|
- 00000080 1a 0f 53 26 87 a8 d1 a0 00 0f 50 f4 81 55 31 32 |..S&......P..U12|
- 00000090 06 10 d3 43 43 20 1a 06 80 1e 93 4c 80 00 00 06 |...CC .....L....|
- 000000a0 20 19 03 40 68 00 68 d0 34 31 34 06 80 d0 d0 01 | ..@h.h.414.....|
- 000000b0 a0 0c 04 00 68 28 c0 38 00 4d 08 76 8b 8b 90 5f |....h(.8.M.v..._|
- 000000c0 08 00 90 c4 83 27 ac 71 ea 5e e0 93 3a 66 56 6b |.....'.q.^..:fVk|
- 000000d0 d9 12 6c be 63 7c ff 6c a7 c8 64 c3 d2 c4 61 04 |..l.c|.l..d...a.|
- 000000e0 9f c1 34 8d 45 39 31 f5 d3 7b 08 d0 14 72 01 ae |..4.E91..{...r..|
- 000000f0 96 66 91 bb 8a 44 2b 32 81 25 a1 bf e0 82 57 f4 |.f...D+2.%....W.|
- 00000100 48 47 5a c2 1c 30 6c cf 3d bc cb 8f 74 43 bd a7 |HGZ..0l.=...tC..|
- 00000110 65 d3 1f f9 be 40 22 04 8c 60 98 c0 f5 42 ad 6a |e....@"..`...B.j|
- 00000120 fd 2d 5a 95 64 fc cd 15 47 b2 66 59 c7 d1 08 6a |.-Z.d...G.fY...j|
- 00000130 92 0e 22 0b 51 2b 45 1e b3 af 38 01 a5 02 50 09 |..".Q+E...8...P.|
- 00000140 23 35 bd dc e9 06 53 8a f9 c8 26 67 68 e7 03 10 |#5....S...&gh...|
- 00000150 f6 fb 78 a8 68 4d 44 9c 8e 8a d3 f0 19 1a 2d ae |..x.hMD.......-.|
- 00000160 aa 3b bf ce b4 ce ad c0 3e b0 10 f5 3c 66 10 96 |.;......>...<f..|
- 00000170 3e a8 f2 c3 3e 44 25 34 29 74 45 c7 27 1e dc ef |>...>D%4)tE.'...|
- 00000180 30 47 27 e8 7d 8f 62 a8 4e 55 fd 84 69 7e cb ac |0G'.}.b.NU..i~..|
- 00000190 1e e4 fa a7 41 28 89 bd d0 1c af e6 82 7c c8 19 |....A(.......|..|
- 000001a0 d4 6d 7b d4 09 0a 41 1c 50 cb 66 f2 55 32 61 0f |.m{...A.P.f.U2a.|
- 000001b0 a5 80 0d 4d fd 7f c6 d9 25 fa 0c 2c 34 2a d0 d6 |...M....%..,4*..|
- 000001c0 c9 d1 96 03 bd 16 92 0a ad cd 0d 15 06 d6 7f b6 |................|
- 000001d0 e1 be 7c 80 28 49 56 99 6c 11 e4 5e 1e 11 3b dc |..|.(IV.l..^..;.|
- 000001e0 99 05 90 32 72 a4 4f 98 a6 3b 4a 64 3f a5 46 d3 |...2r.O..;Jd?.F.|
- 000001f0 3a 1d 15 0a 01 d2 93 9c 17 e9 89 92 54 f0 0e 5f |:...........T.._|
- 00000200 b5 59 0e 05 12 0d e0 ca 54 02 e7 6b b2 d2 04 5f |.Y......T..k..._|
- 00000210 f8 bb 92 29 c2 84 80 ad ff 89 70 |...)......p|

+ 00000000 42 5a 68 39 31 41 59 26 53 59 4c c6 c0 3e 00 00 |BZh91AY&SYL..>..|
+ 00000010 53 7f ff f5 7f fd ff f7 fd b3 df 7f fd 7f ef 77 |S..............w|
+ 00000020 ff ff ff ff fe bd df fb bf fd f6 da 9f 7f bf fd |................|
+ 00000030 3f fe 7c b0 01 7b 1b 55 a4 1a 00 00 06 86 80 00 |?.|..{.U........|
+ 00000040 0d 00 69 a1 a0 1a 00 d0 0d 00 1a 00 01 a0 06 86 |..i.............|
+ 00000050 9a 00 1a 00 d0 06 80 68 34 1e 84 0d 1a 1a 03 4d |.......h4......M|
+ 00000060 1a 01 a6 d4 41 a0 00 00 00 1a 00 00 00 32 68 68 |....A........2hh|
+ 00000070 01 ea 00 03 40 68 1a 34 34 00 06 9a 00 d0 0f 50 |....@h.44......P|
+ 00000080 c4 1a 00 1e 88 1a 01 a0 00 03 20 c4 68 3a 64 03 |.......... .h:d.|
+ 00000090 d2 03 41 91 ea 34 1a 1a 00 03 26 83 40 06 8d 00 |..A..4....&.@...|
+ 000000a0 00 00 34 1a 03 40 0c 80 34 00 d0 00 00 d0 00 d0 |..4..@..4.......|
+ 000000b0 06 9a 00 00 c2 00 06 a1 0c 10 20 b6 10 c8 ce 35 |.......... ....5|
+ 000000c0 e6 02 23 84 49 0a 54 d9 ee 24 87 de 07 f3 1d cb |..#.I.T..$......|
+ 000000d0 a5 eb b0 6f 09 07 d7 98 ef 53 2c 5b f0 fa 61 f0 |...o.....S,[..a.|
+ 000000e0 4c fb 1d fd cf 38 06 18 8f 54 16 be 96 a4 19 f0 |L....8...T......|
+ 000000f0 13 47 95 5d 23 50 65 26 ae f4 10 46 84 f8 44 93 |.G.]#Pe&...F..D.|
+ 00000100 5a b9 f3 6b 27 8f 35 22 56 f9 04 14 29 5f b1 33 |Z..k'.5"V...)_.3|
+ 00000110 8f 78 a6 be 46 53 ab 9a 2f 04 32 0c 69 8b 20 c2 |.x..FS../.2.i. .|
+ 00000120 21 ef 7f 90 aa df 02 48 e1 83 2e e3 ba 03 1e c4 |!......H........|
+ 00000130 5c 24 50 e9 32 fc 4e 2c 4f 05 99 08 63 dc 55 96 |\$P.2.N,O...c.U.|
+ 00000140 ae 30 7f ad eb 86 8c 01 a1 e0 69 47 c0 61 e4 63 |.0........iG.a.c|
+ 00000150 19 58 67 33 50 52 a5 ef 5a 76 3b a4 e6 13 aa d0 |.Xg3PR..Zv;.....|
+ 00000160 05 03 e1 0c 07 80 40 96 11 4f 06 85 f9 92 9f 18 |......@..O......|
+ 00000170 1b 78 f8 13 7c 05 41 32 50 e3 4a a0 87 6d 47 44 |.x..|.A2P.J..mGD|
+ 00000180 6a 43 a6 ef c6 4e c7 04 b3 b4 29 dd ef f1 f5 0c |jC...N....).....|
+ 00000190 c2 ea 2c ff 4f c4 51 6d e5 d1 f7 d6 c4 09 f6 01 |..,.O.Qm........|
+ 000001a0 a2 40 4e 5d 10 cb 1f 10 21 91 3a a0 32 35 10 79 |.@N]....!.:.25.y|
+ 000001b0 f1 25 45 1e 04 bb 07 a7 28 85 ca f2 46 e0 1b 83 |.%E.....(...F...|
+ 000001c0 b1 a5 18 1b fd a6 38 e0 b3 5b 0f 3c 7e 65 3b cb |......8..[.<~e;.|
+ 000001d0 1a 0c 10 61 ab 5e c3 55 83 55 c0 15 28 54 f0 d1 |...a.^.U.U..(T..|
+ 000001e0 20 01 ce 5e 00 8b e2 2a 91 cc 74 5c a5 3d 66 a4 | ..^...*..t\.=f.|
+ 000001f0 1e 02 e4 12 38 5c 9d 85 a1 de f7 80 e0 c6 14 2e |....8\..........|
+ 00000200 08 10 f4 23 dc 3a c8 0a 1d f4 75 a5 04 b8 59 31 |...#.:....u...Y1|
+ 00000210 8a 5a 56 87 0d 1f 7c f8 26 06 06 54 5e 1e 48 88 |.ZV...|.&..T^.H.|
+ 00000220 20 1c fd 48 a1 26 f0 3c 8d 97 56 28 93 a8 02 7c | ..H.&.<..V(...||
+ 00000230 85 eb 6c 3c 87 75 8d 09 f1 43 23 64 6e db a2 79 |..l<.u...C#dn..y|
+ 00000240 16 4c 7e 14 37 e4 e6 45 05 2b 09 62 64 0d 42 fb |.L~.7..E.+.bd.B.|
+ 00000250 2c ad 07 6a 31 ae 39 0c 97 50 42 e5 54 47 8b df |,..j1.9..PB.TG..|
+ 00000260 6d 38 82 b1 08 a1 c4 dd b5 4e bb 00 52 8c 14 14 |m8.......N..R...|
+ 00000270 53 25 7e 97 26 bc 22 e5 e0 47 fb a9 ff 04 6f 72 |S%~.&."..G....or|
+ 00000280 fa 86 9f 34 81 f0 bf 2e 43 82 59 c7 cf c6 b5 b9 |...4....C.Y.....|
+ 00000290 10 f3 36 21 52 b6 01 0c 20 10 49 0b 08 d1 fe 2e |..6!R... .I.....|
+ 000002a0 e4 8a 70 a1 20 99 8d 80 7c |..p. ...||

8 changes: 8 additions & 0 deletions assets/issues/issue-225/expected-dyff-spruce.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

@@ data @@
! ± value change in multiline text (one insert, no deletions)
 string foo = "bar";
+ string x_forwarded_host = 53;
+ string worker_status = 54;
+ uint64 worker_cpu_time_micro = 55;

14 changes: 14 additions & 0 deletions assets/issues/issue-89/expected-dyff-spruce.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

@@ foo @@
! ± type change from map to list
- a: 1
b: 2
+ - 1
- 2

@@ bar @@
! ± type change from map to <nil>
- c: 3
d: 4
+ <nil>

26 changes: 26 additions & 0 deletions assets/kubernetes/configmaps/expected-dyff-spruce.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

@@ data.pinniped.yaml @@
! ± value change in multiline text (one insert, two deletions)
 discovery:
 url: null
 api:
 servingCertificate:
 durationSeconds: 2592000
- renewBeforeSeconds: 2160000
+ renewBeforeSeconds: 12160000
 apiGroupSuffix: pinniped.dev
 # aggregatedAPIServerPort may be set here, although other YAML references to the default port (10250) may also need to be updated
 # impersonationProxyServerPort may be set here, although other YAML references to the default port (8444) may also need to be updated
 names:
 
 [five lines unchanged)]
 
 impersonationTLSCertificateSecret: pinniped-concierge-impersonation-proxy-tls-serving-certificate
 impersonationCACertificateSecret: pinniped-concierge-impersonation-proxy-ca-certificate
 impersonationSignerSecret: pinniped-concierge-impersonation-proxy-signer-ca-certificate
 agentServiceAccount: pinniped-concierge-kube-cert-agent
- labels: {"app": "pinniped-concierge"}
 kubeCertAgent:
 namePrefix: pinniped-concierge-kube-cert-agent-
 image: projects.registry.vmware.com/pinniped/pinniped-server:latest

94 changes: 94 additions & 0 deletions assets/multiline/expected-dyff-spruce.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

@@ files.simple.content @@
! ± value change in multiline text (three inserts, three deletions)
 UnChanged line
- This line will change 1
+ This line changed 1
 UnChanged line
- This line will change 2
+ This line changed 2
 UnChanged line
- This line will change 3
+ This line changed 3

@@ files.newline.content @@
! ± value change in multiline text (four inserts, four deletions)
 
- 
- This line will change 1
+ This line changed 1
 UnChanged line
 
- This line will change 2
+ This line changed 2
 UnChanged line
 
 
- 
 Moved line
+ 
 
 
 UnChanged line
- This line will change 3
+ This line changed 3
+ 
 
 

@@ files.complex.content @@
! ± value change in multiline text (two inserts, two deletions)
 Begin line 1
 Begin line 2
 Begin line 3
 Begin line 4
 
 [four lines unchanged)]
 
 PreChange line 1
 PreChange line 2
 PreChange line 3
 PreChange line 4
- This line will change 1
- This line will change 2
+ This line changed 1
+ This line changed 2
 PostChange line 1
 PostChange line 2
 PostChange line 3
 PostChange line 4
 
 [three lines unchanged)]
 
 PreAdd line 1
 PreAdd line 2
 PreAdd line 3
 PreAdd line 4
+ This line was added
+ This line was added
 PostAdd line 1
 PostAdd line 2
 PostAdd line 3
 PostAdd line 4
 
 [two lines unchanged)]
 
 PreDelete line 1
 PreDelete line 2
 PreDelete line 3
 PreDelete line 4
- This line will be deleted
- This line will be deleted
- This line will be deleted
 PostDelete line 1
 PostDelete line 2
 PostDelete line 3
 PostDelete line 4
 
 [22 lines unchanged)]
 
 End line 1
 End line 2
 End line 3
 End line 4

86 changes: 86 additions & 0 deletions assets/testbed/expected-dyff-gopatch.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

@@ /nil-tests/something @@
# document #1
! ± type change from <nil> to string
- <nil>
+ value

@@ /nil-tests/to-be-reset @@
# document #1
! ± type change from string to <nil>
- value
+ <nil>

@@ /minor/change @@
# document #1
! ± value change
- VaLue
+ Value

@@ /string-lengths/textA @@
# document #1
! ± value change
- very long text
+ shrt txt

@@ /string-lengths/textB @@
# document #1
! ± value change
- shrt txt
+ very long text

@@ /orderchanges @@
# document #1
! ⇆ order changed
- one, two, four, five, three, six
+ one, two, three, four, five, six

@@ /multiline @@
# document #1
! ± value change in multiline text (one insert, one deletion)
- Yes,
- strings
- can
- have
- multiple
+ Yes, strings
+ can have multiple
lines

@@ /certs/data @@
# document #1
! ± certificate change
- Subject:
- Common Name: www.example.com
- Organization: Company Name
- Organization Unit: Org
- Locality: Portland
- State: Oregon
- Country: US
- Validity Period:
- NotBefore: Apr 2 19:29:56 2018 UTC
- NotAfter: Apr 2 19:29:56 2019 UTC
- Issuer: www.example.com, Company Name
- Serial Number: 14581103526614300972 (0xca5a7c67490a792c)

+ Subject:
+ Common Name: www.example.com
+ Organization: My Company Name
+ Organization Unit: Org
+ Locality: Portland
+ State: Oregon
+ Country: US
+ Validity Period:
+ NotBefore: Apr 2 19:37:46 2018 UTC
+ NotAfter: Apr 1 19:37:46 2020 UTC
+ Issuer: www.example.com, My Company Name
+ Serial Number: 12453678034067864896 (0xacd45a3087b33d40)

@@ / @@
# document #2
! - two list entries removed:
- - name: one
- - name: two
! + one list entry added:
+ - name: three

Loading

0 comments on commit c7a780c

Please sign in to comment.