Skip to content

Commit 93d37cc

Browse files
committed
make snippet hashing opt in
1 parent 070d7f2 commit 93d37cc

40 files changed

+167
-75
lines changed

docs/api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ https://nuget.org/packages/MarkdownSnippets/ [![NuGet Status](https://img.shield
1616
## Reading snippets from files
1717

1818
<!-- snippet: ReadingFilesSimple -->
19-
<a id='5fad5c65'></a>
19+
<a id='readingfilessimple'></a>
2020
```cs
2121
var files = Directory.EnumerateFiles(@"C:\path", "*.cs", SearchOption.AllDirectories);
2222

2323
var snippets = FileSnippetExtractor.Read(files);
2424
```
25-
<sup><a href='/src/Tests/Snippets/Usage.cs#L9-L15' title='Snippet source file'>snippet source</a> | <a href='#5fad5c65' title='Start of snippet'>anchor</a></sup>
25+
<sup><a href='/src/Tests/Snippets/Usage.cs#L9-L15' title='Snippet source file'>snippet source</a> | <a href='#readingfilessimple' title='Start of snippet'>anchor</a></sup>
2626
<!-- endSnippet -->
2727

2828

2929
## Reading snippets from a directory structure
3030

3131
<!-- snippet: ReadingDirectorySimple -->
32-
<a id='edae4606'></a>
32+
<a id='readingdirectorysimple'></a>
3333
```cs
3434
// extract snippets from files
3535
var snippetExtractor = new DirectorySnippetExtractor(
@@ -38,14 +38,14 @@ var snippetExtractor = new DirectorySnippetExtractor(
3838
!dirPath.EndsWith("obj"));
3939
var snippets = snippetExtractor.ReadSnippets(@"C:\path");
4040
```
41-
<sup><a href='/src/Tests/Snippets/Usage.cs#L42-L51' title='Snippet source file'>snippet source</a> | <a href='#edae4606' title='Start of snippet'>anchor</a></sup>
41+
<sup><a href='/src/Tests/Snippets/Usage.cs#L42-L51' title='Snippet source file'>snippet source</a> | <a href='#readingdirectorysimple' title='Start of snippet'>anchor</a></sup>
4242
<!-- endSnippet -->
4343

4444

4545
## Full Usage
4646

4747
<!-- snippet: markdownProcessingSimple -->
48-
<a id='64e70e9e'></a>
48+
<a id='markdownprocessingsimple'></a>
4949
```cs
5050
var directory = @"C:\path";
5151

@@ -79,7 +79,7 @@ var missingSnippets = result.MissingSnippets;
7979
// snippets that the markdown file used
8080
var usedSnippets = result.UsedSnippets;
8181
```
82-
<sup><a href='/src/Tests/Snippets/Usage.cs#L56-L90' title='Snippet source file'>snippet source</a> | <a href='#64e70e9e' title='Start of snippet'>anchor</a></sup>
82+
<sup><a href='/src/Tests/Snippets/Usage.cs#L56-L90' title='Snippet source file'>snippet source</a> | <a href='#markdownprocessingsimple' title='Start of snippet'>anchor</a></sup>
8383
<!-- endSnippet -->
8484

8585

docs/config-file.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@ Add a file named `mdsnippets.json` at the target directory with the following co
1515
## For [InPlaceOverwrite](https://github.com/SimonCropp/MarkdownSnippets#inplaceoverwrite)
1616

1717
<!-- snippet: InPlaceOverwrite.json -->
18-
<a id='e62f4077'></a>
18+
<a id='InPlaceOverwrite.json'></a>
1919
```json
2020
{
2121
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
2222
"Convention": "InPlaceOverwrite"
2323
}
2424
```
25-
<sup><a href='/src/ConfigReader.Tests/InPlaceOverwrite.json#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#e62f4077' title='Start of snippet'>anchor</a></sup>
25+
<sup><a href='/src/ConfigReader.Tests/InPlaceOverwrite.json#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#InPlaceOverwrite.json' title='Start of snippet'>anchor</a></sup>
2626
<!-- endSnippet -->
2727

2828

2929
## For [SourceTransform](https://github.com/SimonCropp/MarkdownSnippets#sourcetransform)
3030

3131
<!-- snippet: SourceTransform.json -->
32-
<a id='e4c42b12'></a>
32+
<a id='SourceTransform.json'></a>
3333
```json
3434
{
3535
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
3636
"Convention": "SourceTransform"
3737
}
3838
```
39-
<sup><a href='/src/ConfigReader.Tests/SourceTransform.json#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#e4c42b12' title='Start of snippet'>anchor</a></sup>
39+
<sup><a href='/src/ConfigReader.Tests/SourceTransform.json#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#SourceTransform.json' title='Start of snippet'>anchor</a></sup>
4040
<!-- endSnippet -->
4141

4242

4343
## All Settings
4444

4545
<!-- snippet: allConfig.json -->
46-
<a id='38346206'></a>
46+
<a id='allConfig.json'></a>
4747
```json
4848
{
4949
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
@@ -60,10 +60,11 @@ Add a file named `mdsnippets.json` at the target directory with the following co
6060
"Header": "GENERATED FILE - Source File: {relativePath}",
6161
"UrlPrefix": "TheUrlPrefix",
6262
"TreatMissingAsWarning": true,
63-
"ValidateContent": true
63+
"ValidateContent": true,
64+
"HashSnippetAnchors": true
6465
}
6566
```
66-
<sup><a href='/src/ConfigReader.Tests/allConfig.json#L1-L17' title='Snippet source file'>snippet source</a> | <a href='#38346206' title='Start of snippet'>anchor</a></sup>
67+
<sup><a href='/src/ConfigReader.Tests/allConfig.json#L1-L18' title='Snippet source file'>snippet source</a> | <a href='#allConfig.json' title='Start of snippet'>anchor</a></sup>
6768
<!-- endSnippet -->
6869

6970

docs/github-action.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Markdown snippets can be run inside a [GitHub Action](https://help.github.com/en
1212
Add the following to `.github\workflows\on-push-do-doco.yml` in the target repository.
1313

1414
<!-- snippet: on-push-do-docs.yml -->
15-
<a id='d74f0784'></a>
15+
<a id='on-push-do-docs.yml'></a>
1616
```yml
1717
name: on-push-do-docs
1818
on:
@@ -37,7 +37,7 @@ jobs:
3737
git push "${remote}" ${branch} || echo "nothing to push"
3838
shell: bash
3939
```
40-
<sup><a href='/docs/on-push-do-docs.yml#L1-L22' title='Snippet source file'>snippet source</a> | <a href='#d74f0784' title='Start of snippet'>anchor</a></sup>
40+
<sup><a href='/docs/on-push-do-docs.yml#L1-L22' title='Snippet source file'>snippet source</a> | <a href='#on-push-do-docs.yml' title='Start of snippet'>anchor</a></sup>
4141
<!-- endSnippet -->
4242
4343
This action performs the following tasks:

docs/header.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ To change this file edit the source file and then run MarkdownSnippets.
1010
When a .md file is written, a header is include. The default header is:
1111

1212
<!-- snippet: HeaderWriterTests.DefaultHeader.verified.txt -->
13-
<a id='1e60b79f'></a>
13+
<a id='HeaderWriterTests.DefaultHeader.verified.txt'></a>
1414
```txt
1515
GENERATED FILE - DO NOT EDIT
1616
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
1717
Source File: {relativePath}
1818
To change this file edit the source file and then run MarkdownSnippets.
1919
```
20-
<sup><a href='/src/Tests/HeaderWriterTests.DefaultHeader.verified.txt#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#1e60b79f' title='Start of snippet'>anchor</a></sup>
20+
<sup><a href='/src/Tests/HeaderWriterTests.DefaultHeader.verified.txt#L1-L4' title='Snippet source file'>snippet source</a> | <a href='#HeaderWriterTests.DefaultHeader.verified.txt' title='Start of snippet'>anchor</a></sup>
2121
<!-- endSnippet -->
2222

2323

docs/max-width.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ The Max Width setting is used to control the maximum characters per line of a sn
3232
### Code Api
3333

3434
<!-- snippet: DirectoryMarkdownProcessorRunMaxWidth -->
35-
<a id='7e0c3c25'></a>
35+
<a id='directorymarkdownprocessorrunmaxwidth'></a>
3636
```cs
3737
var processor = new DirectoryMarkdownProcessor(
3838
"targetDirectory",
3939
maxWidth: 80);
4040
processor.Run();
4141
```
42-
<sup><a href='/src/Tests/Snippets/Usage.cs#L30-L37' title='Snippet source file'>snippet source</a> | <a href='#7e0c3c25' title='Start of snippet'>anchor</a></sup>
42+
<sup><a href='/src/Tests/Snippets/Usage.cs#L30-L37' title='Snippet source file'>snippet source</a> | <a href='#directorymarkdownprocessorrunmaxwidth' title='Start of snippet'>anchor</a></sup>
4343
<!-- endSnippet -->
4444

4545

docs/snippet-exclusion.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ When scanning for snippets the following are ignored:
2828
* All binary files as defined by https://github.com/sindresorhus/binary-extensions/:
2929

3030
<!-- snippet: ExcludedFileExtensions -->
31-
<a id='35584582'></a>
31+
<a id='excludedfileextensions'></a>
3232
```cs
3333
"md",
34+
"user",
3435
// extra binary
3536
"mdb",
3637
"shp",
@@ -296,17 +297,17 @@ When scanning for snippets the following are ignored:
296297
"zip",
297298
"zipx"
298299
```
299-
<sup><a href='/src/MarkdownSnippets/Reading/Exclusions/SnippetFileExclusions.cs#L32-L300' title='Snippet source file'>snippet source</a> | <a href='#35584582' title='Start of snippet'>anchor</a></sup>
300+
<sup><a href='/src/MarkdownSnippets/Reading/Exclusions/SnippetFileExclusions.cs#L32-L301' title='Snippet source file'>snippet source</a> | <a href='#excludedfileextensions' title='Start of snippet'>anchor</a></sup>
300301
<!-- endSnippet -->
301302

302303
* Files that cannot contain comments:
303304

304305
<!-- snippet: NoAcceptCommentsExtensions -->
305-
<a id='9ec3a8e5'></a>
306+
<a id='noacceptcommentsextensions'></a>
306307
```cs
307308
"csv",
308309
"json",
309310
"geojson"
310311
```
311-
<sup><a href='/src/MarkdownSnippets/Reading/Exclusions/SnippetFileExclusions.cs#L23-L27' title='Snippet source file'>snippet source</a> | <a href='#9ec3a8e5' title='Start of snippet'>anchor</a></sup>
312+
<sup><a href='/src/MarkdownSnippets/Reading/Exclusions/SnippetFileExclusions.cs#L23-L27' title='Snippet source file'>snippet source</a> | <a href='#noacceptcommentsextensions' title='Start of snippet'>anchor</a></sup>
312313
<!-- endSnippet -->

docs/toc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If a line is `toc` it will be replaced with a table of contents
1212
So if a markdown document contains the following:
1313

1414
<!-- snippet: tocBefore.txt -->
15-
<a id='fbf7eb4b'></a>
15+
<a id='tocBefore.txt'></a>
1616
```txt
1717
# Title
1818
@@ -26,13 +26,13 @@ Text1
2626
2727
Text2
2828
```
29-
<sup><a href='/docs/mdsource/toc/tocBefore.txt#L1-L11' title='Snippet source file'>snippet source</a> | <a href='#fbf7eb4b' title='Start of snippet'>anchor</a></sup>
29+
<sup><a href='/docs/mdsource/toc/tocBefore.txt#L1-L11' title='Snippet source file'>snippet source</a> | <a href='#tocBefore.txt' title='Start of snippet'>anchor</a></sup>
3030
<!-- endSnippet -->
3131

3232
The result will be rendered:
3333

3434
<!-- snippet: tocAfter.txt -->
35-
<a id='4b01b166'></a>
35+
<a id='tocAfter.txt'></a>
3636
```txt
3737
# Title
3838
@@ -51,7 +51,7 @@ Text1
5151
5252
Text2
5353
```
54-
<sup><a href='/docs/mdsource/toc/tocAfter.txt#L1-L16' title='Snippet source file'>snippet source</a> | <a href='#4b01b166' title='Start of snippet'>anchor</a></sup>
54+
<sup><a href='/docs/mdsource/toc/tocAfter.txt#L1-L16' title='Snippet source file'>snippet source</a> | <a href='#tocAfter.txt' title='Start of snippet'>anchor</a></sup>
5555
<!-- endSnippet -->
5656

5757

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Files are downloaded to `%temp%MarkdownSnippets` with a maximum of 100 files kep
230230
Defines the format of `snippet source` links that appear under each snippet.
231231

232232
<!-- snippet: LinkFormat.cs -->
233-
<a id='014701a4'></a>
233+
<a id='LinkFormat.cs'></a>
234234
```cs
235235
namespace MarkdownSnippets
236236
{
@@ -243,11 +243,11 @@ namespace MarkdownSnippets
243243
}
244244
}
245245
```
246-
<sup><a href='/src/MarkdownSnippets/Processing/LinkFormat.cs#L1-L10' title='Snippet source file'>snippet source</a> | <a href='#014701a4' title='Start of snippet'>anchor</a></sup>
246+
<sup><a href='/src/MarkdownSnippets/Processing/LinkFormat.cs#L1-L10' title='Snippet source file'>snippet source</a> | <a href='#LinkFormat.cs' title='Start of snippet'>anchor</a></sup>
247247
<!-- endSnippet -->
248248

249249
<!-- snippet: BuildLink -->
250-
<a id='89ddf703'></a>
250+
<a id='buildlink'></a>
251251
```cs
252252
if (linkFormat == LinkFormat.GitHub)
253253
{
@@ -269,7 +269,7 @@ if (linkFormat == LinkFormat.GitLab)
269269
return $"{path}#L{snippet.StartLine}-{snippet.EndLine}";
270270
}
271271
```
272-
<sup><a href='/src/MarkdownSnippets/Processing/SnippetMarkdownHandling.cs#L123-L143' title='Snippet source file'>snippet source</a> | <a href='#89ddf703' title='Start of snippet'>anchor</a></sup>
272+
<sup><a href='/src/MarkdownSnippets/Processing/SnippetMarkdownHandling.cs#L133-L153' title='Snippet source file'>snippet source</a> | <a href='#buildlink' title='Start of snippet'>anchor</a></sup>
273273
<!-- endSnippet -->
274274

275275

src/ConfigReader.Tests/ConfigReaderTests.Values.verified.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
ReadOnly: false,
33
ValidateContent: true,
4+
HashSnippetAnchors: true,
45
LinkFormat: 'Tfs',
56
Convention: 'InPlaceOverwrite',
67
TocLevel: 3,

src/ConfigReader.Tests/allConfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"Header": "GENERATED FILE - Source File: {relativePath}",
1414
"UrlPrefix": "TheUrlPrefix",
1515
"TreatMissingAsWarning": true,
16-
"ValidateContent": true
16+
"ValidateContent": true,
17+
"HashSnippetAnchors": true
1718
}

src/ConfigReader/ConfigDefaults.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public static ConfigResult Convert(ConfigInput? fileConfig, ConfigInput otherCon
1111
return new ConfigResult
1212
{
1313
ValidateContent = otherConfig.ValidateContent.GetValueOrDefault(),
14+
HashSnippetAnchors = otherConfig.HashSnippetAnchors.GetValueOrDefault(),
1415
ReadOnly = otherConfig.ReadOnly.GetValueOrDefault(),
1516
WriteHeader = otherConfig.WriteHeader,
1617
LinkFormat = otherConfig.LinkFormat.GetValueOrDefault(LinkFormat.GitHub),
@@ -30,6 +31,7 @@ public static ConfigResult Convert(ConfigInput? fileConfig, ConfigInput otherCon
3031
return new ConfigResult
3132
{
3233
ValidateContent = GetValueOrDefault("ValidateContent", otherConfig.ValidateContent, fileConfig.ValidateContent, false),
34+
HashSnippetAnchors = GetValueOrDefault("HashSnippetAnchors", otherConfig.HashSnippetAnchors, fileConfig.HashSnippetAnchors, false),
3335
ReadOnly = GetValueOrNull("ReadOnly", otherConfig.ReadOnly, fileConfig.ReadOnly),
3436
WriteHeader = GetValueOrNull("WriteHeader", otherConfig.WriteHeader, fileConfig.WriteHeader),
3537
LinkFormat = GetValueOrDefault("LinkFormat", otherConfig.LinkFormat, fileConfig.LinkFormat, LinkFormat.GitHub),

src/ConfigReader/ConfigInput.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public class ConfigInput
55
{
66
public bool? ReadOnly { get; set; }
77
public bool? ValidateContent { get; set; }
8+
public bool? HashSnippetAnchors { get; set; }
89
public LinkFormat? LinkFormat { get; set; }
910
public DocumentConvention? Convention { get; set; }
1011
public int? TocLevel { get; set; }

src/ConfigReader/ConfigReader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public static ConfigInput Parse(string contents)
4949
WriteHeader = config.WriteHeader,
5050
ReadOnly = config.ReadOnly,
5151
ValidateContent = config.ValidateContent,
52+
HashSnippetAnchors = config.HashSnippetAnchors,
5253
UrlsAsSnippets = config.UrlsAsSnippets,
5354
Exclude = config.Exclude,
5455
Header = config.Header,

src/ConfigReader/ConfigResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public class ConfigResult
55
{
66
public bool? ReadOnly;
77
public bool ValidateContent;
8+
public bool HashSnippetAnchors;
89
public LinkFormat LinkFormat;
910
public DocumentConvention Convention;
1011
public int TocLevel;

src/ConfigReader/ConfigSerialization.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public class ConfigSerialization
44
{
55
public bool? ReadOnly { get; set; }
66
public bool? ValidateContent { get; set; }
7+
public bool? HashSnippetAnchors { get; set; }
78
public string? LinkFormat { get; set; }
89
public string? Convention { get; set; }
910
public bool? WriteHeader { get; set; }

src/ConfigReader/LogBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public static string BuildConfigLogMessage(string root, ConfigResult config, str
1919
TocLevel: {config.TocLevel}
2020
MaxWidth: {config.MaxWidth}
2121
ValidateContent: {config.ValidateContent}
22+
HashSnippetAnchors: {config.HashSnippetAnchors}
2223
TreatMissingAsWarning: {config.TreatMissingAsWarning}
2324
FileConfigPath: {configFilePath} (exists:{File.Exists(configFilePath)})
2425
");

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591</NoWarn>
5-
<Version>21.4.0</Version>
5+
<Version>21.5.0</Version>
66
<AssemblyVersion>1.0.0</AssemblyVersion>
77
<PackageTags>Markdown, Snippets, mdsnippets, documentation, MarkdownSnippets</PackageTags>
88
<Description>Extracts snippets from code files and merges them into markdown documents.</Description>

src/MarkdownSnippets.MsBuild/DocoTask.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class DocoTask :
2525
public List<string> UrlsAsSnippets { get; set; } = new List<string>();
2626
public List<string> DocumentExtensions { get; set; } = new List<string>();
2727
public bool? TreatMissingAsWarning { get; set; }
28+
public bool? HashSnippetAnchors { get; set; }
2829

2930
public override bool Execute()
3031
{
@@ -50,6 +51,7 @@ public override bool Execute()
5051
UrlsAsSnippets = UrlsAsSnippets,
5152
DocumentExtensions = DocumentExtensions,
5253
TreatMissingAsWarning = TreatMissingAsWarning,
54+
HashSnippetAnchors = HashSnippetAnchors,
5355
});
5456

5557
var message = LogBuilder.BuildConfigLogMessage(root, configResult, configFilePath);
@@ -70,7 +72,8 @@ public override bool Execute()
7072
documentExtensions: configResult.DocumentExtensions,
7173
treatMissingAsWarning: configResult.TreatMissingAsWarning,
7274
maxWidth: configResult.MaxWidth,
73-
validateContent: configResult.ValidateContent);
75+
validateContent: configResult.ValidateContent,
76+
hashSnippetAnchors: configResult.HashSnippetAnchors);
7477

7578
var snippets = new List<Snippet>();
7679

src/MarkdownSnippets.Tool/CommandRunner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public static Task RunCommand(Invoke invoke, params string[] args)
3939
DocumentExtensions = options.DocumentExtensions.ToList(),
4040
UrlsAsSnippets = options.UrlsAsSnippets.ToList(),
4141
TreatMissingAsWarning = options.TreatMissingAsWarning,
42-
Convention = options.Convention
42+
Convention = options.Convention,
43+
HashSnippetAnchors = options.HashSnippetAnchors
4344
};
4445
return invoke(options.TargetDirectory!, configInput);
4546
});

src/MarkdownSnippets.Tool/Options.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ public class Options
5353
HelpText = "The default behavior for a missing snippet/include is to log an error (or throw an exception). To change that behavior to a warning set TreatMissingAsWarning to true. Optional. Defaults to false")]
5454
public bool? TreatMissingAsWarning { get; set; }
5555

56+
[Option("hash-snippet-anchors",
57+
Required = false,
58+
HelpText = "The default behavior for snippet anchors to be the name of the snippet. To minimize the outputted html a hash can be used. Optional. Defaults to false")]
59+
public bool? HashSnippetAnchors { get; set; }
60+
5661
[Option("header",
5762
Required = false,
5863
HelpText = @"The header to write. `{relativePath}` is replaced with the current .source.md file. Optional. Defaults to:

src/MarkdownSnippets.Tool/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ static async Task Inner(string targetDirectory, ConfigInput configInput)
4141
tocLevel: configResult.TocLevel,
4242
treatMissingAsWarning: configResult.TreatMissingAsWarning,
4343
maxWidth: configResult.MaxWidth,
44-
validateContent: configResult.ValidateContent);
44+
validateContent: configResult.ValidateContent,
45+
hashSnippetAnchors: configResult.HashSnippetAnchors);
4546

4647
var snippets = new List<Snippet>();
4748
await snippets.AppendUrlsAsSnippets(configResult.UrlsAsSnippets);

0 commit comments

Comments
 (0)