Skip to content

Commit 2fdbcfe

Browse files
committed
doc: Fix code fences in gix-merge ConflictStyle and Driver
They are not Rust code (they are text with conflict markers and a shell command, respectively) and they are not intended as doctests, but the absence of anything on the opening line caused them to be taken as doctests, so `cargo test --workspace --doc` would fail with parsing errors. (Doctests for all crates have not always been run automatically on CI, so this was not caught when these documentation comments were introduced in GitoxideLabs#1585.)
1 parent ebc3495 commit 2fdbcfe

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

gix-merge/src/blob/builtin_driver/text/mod.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ pub enum ConflictStyle {
88
/// Only show the zealously minified conflicting lines of the local changes and the incoming (other) changes,
99
/// hiding the base version entirely.
1010
///
11-
/// ```
11+
/// ```text
1212
/// line1-changed-by-both
1313
/// <<<<<<< local
1414
/// line2-to-be-changed-in-incoming
1515
/// =======
1616
/// line2-changed
1717
/// >>>>>>> incoming
18-
///```
18+
/// ```
1919
#[default]
2020
Merge,
2121
/// Show non-minimized hunks of local changes, the base, and the incoming (other) changes.
2222
///
2323
/// This mode does not hide any information.
24-
/// ```
24+
///
25+
/// ```text
2526
/// <<<<<<< local
2627
/// line1-changed-by-both
2728
/// line2-to-be-changed-in-incoming
@@ -32,12 +33,12 @@ pub enum ConflictStyle {
3233
/// line1-changed-by-both
3334
/// line2-changed
3435
/// >>>>>>> incoming
35-
///```
36+
/// ```
3637
Diff3,
3738
/// Like [`Diff3](Self::Diff3), but will show *minimized* hunks of local change and the incoming (other) changes,
3839
/// as well as non-minimized hunks of the base.
3940
///
40-
/// ```
41+
/// ```text
4142
/// line1-changed-by-both
4243
/// <<<<<<< local
4344
/// line2-to-be-changed-in-incoming

gix-merge/src/blob/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub struct Driver {
9696
///
9797
/// A typical invocation with all arguments substituted could then look like this:
9898
///
99-
/// ```
99+
/// ```sh
100100
/// <driver-program> .merge_file_nR2Qs1 .merge_file_WYXCJe .merge_file_UWbzrm 7 file e2a2970 HEAD feature
101101
/// ```
102102
///

0 commit comments

Comments
 (0)