Skip to content

Commit

Permalink
fix erroneous /
Browse files Browse the repository at this point in the history
fixes #270
  • Loading branch information
SimonCropp committed Aug 5, 2020
1 parent b767651 commit 8ac5fd6
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ https://nuget.org/packages/MarkdownSnippets/ [![NuGet Status](https://img.shield
## Reading snippets from files

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

Expand All @@ -29,7 +29,7 @@ var snippets = FileSnippetExtractor.Read(files);
## Reading snippets from a directory structure

<!-- snippet: ReadingDirectorySimple -->
<a id='snippet-readingdirectorysimple'/></a>
<a id='snippet-readingdirectorysimple'></a>
```cs
// extract snippets from files
var snippetExtractor = new DirectorySnippetExtractor(
Expand All @@ -45,7 +45,7 @@ var snippets = snippetExtractor.ReadSnippets(@"C:\path");
## Full Usage

<!-- snippet: markdownProcessingSimple -->
<a id='snippet-markdownprocessingsimple'/></a>
<a id='snippet-markdownprocessingsimple'></a>
```cs
var directory = @"C:\path";

Expand Down
2 changes: 1 addition & 1 deletion docs/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The [dotnet tool](/readme.md#installation) and the [MSBuild Task](msbuild.md) su
Add a file named `mdsnippets.json` at the target directory with the following content:

<!-- snippet: sampleConfig.json -->
<a id='snippet-sampleConfig.json'/></a>
<a id='snippet-sampleConfig.json'></a>
```json
{
"ReadOnly": false,
Expand Down
2 changes: 1 addition & 1 deletion docs/github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Markdown snippets can be run inside a [GitHub Action](https://help.github.com/en
Add the following to `.github\workflows\on-push-do-doco.yml` in the target repository.

<!-- snippet: on-push-do-docs.yml -->
<a id='snippet-on-push-do-docs.yml'/></a>
<a id='snippet-on-push-do-docs.yml'></a>
```yml
name: on-push-do-docs
on:
Expand Down
2 changes: 1 addition & 1 deletion docs/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To change this file edit the source file and then run MarkdownSnippets.
When a .md file is written, a header is include. The default header is:

<!-- snippet: HeaderWriterTests.DefaultHeader.verified.txt -->
<a id='snippet-HeaderWriterTests.DefaultHeader.verified.txt'/></a>
<a id='snippet-HeaderWriterTests.DefaultHeader.verified.txt'></a>
```txt
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Expand Down
2 changes: 1 addition & 1 deletion docs/max-width.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Max Width setting is used to control the maximum characters per line of a sn
### Code Api

<!-- snippet: DirectoryMarkdownProcessorRunMaxWidth -->
<a id='snippet-directorymarkdownprocessorrunmaxwidth'/></a>
<a id='snippet-directorymarkdownprocessorrunmaxwidth'></a>
```cs
var processor = new DirectoryMarkdownProcessor(
"targetDirectory",
Expand Down
4 changes: 2 additions & 2 deletions docs/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If a line is `toc` it will be replaced with a table of contents
So if a markdown document contains the following:

<!-- snippet: tocBefore.txt -->
<a id='snippet-tocBefore.txt'/></a>
<a id='snippet-tocBefore.txt'></a>
```txt
# Title
Expand All @@ -32,7 +32,7 @@ Text2
The result will be rendered:

<!-- snippet: tocAfter.txt -->
<a id='snippet-tocAfter.txt'/></a>
<a id='snippet-tocAfter.txt'></a>
```txt
# Title
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The resulting markdown will be:

<!-- snippet: MySnippetName -->
Some blurb about the below snippet
<a id='snippet-MySnippetName'/></a>
<a id='snippet-MySnippetName'></a>
```
My Snippet Code
```
Expand All @@ -143,7 +143,7 @@ Notes:
Defines the format of `snippet source` links that appear under each snippet.

<!-- snippet: LinkFormat.cs -->
<a id='snippet-LinkFormat.cs'/></a>
<a id='snippet-LinkFormat.cs'></a>
```cs
namespace MarkdownSnippets
{
Expand All @@ -160,7 +160,7 @@ namespace MarkdownSnippets
<!-- endsnippet -->

<!-- snippet: BuildLink -->
<a id='snippet-buildlink'/></a>
<a id='snippet-buildlink'></a>
```cs
if (linkFormat == LinkFormat.GitHub)
{
Expand Down
2 changes: 1 addition & 1 deletion readme.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The resulting markdown will be:

<!-- snippet: MySnippetName -->
Some blurb about the below snippet
<a id='snippet-MySnippetName'/></a>
<a id='snippet-MySnippetName'></a>
```
My Snippet Code
```
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591</NoWarn>
<Version>19.1.3</Version>
<Version>19.1.4</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Markdown, Snippets, mdsnippets, documentation, MarkdownSnippets</PackageTags>
<Description>Extracts snippets from code files and merges them into markdown documents.</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/MarkdownSnippets/Processing/SnippetMarkdownHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void WriteSnippet(Action<string> appendLine, Snippet snippet, uint index)
{
var anchor = GetAnchorText(snippet, index);

appendLine($"<a id='{anchor}'/></a>");
appendLine($"<a id='{anchor}'></a>");
WriteSnippetValueAndLanguage(appendLine, snippet);

if (TryGetSupText(snippet,anchor, out var supText))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\one.md
<!-- snippet: snippet1 -->
<a id='snippet-snippet1'/></a>
<a id='snippet-snippet1'></a>
```.cs
the code from snippet1
```
Expand All @@ -13,7 +13,7 @@ snippet: snippet1

\two.md
<!-- snippet: snippet2 -->
<a id='snippet-snippet2'/></a>
<a id='snippet-snippet2'></a>
```.cs
the code from snippet2
```
Expand Down
4 changes: 2 additions & 2 deletions src/Tests/DirectoryMarkdownProcessorTests.NonMd.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ snippet: snippet1

\one.txt
<!-- snippet: snippet1 -->
<a id='snippet-snippet1'/></a>
<a id='snippet-snippet1'></a>
```.cs
the code from snippet1
```
Expand All @@ -13,7 +13,7 @@ the code from snippet1

\two.txt
<!-- snippet: snippet2 -->
<a id='snippet-snippet2'/></a>
<a id='snippet-snippet2'></a>
```.cs
the code from snippet2
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- snippet: https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/license.txt -->
<a id='snippet-https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/license.txt'/></a>
<a id='snippet-https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/license.txt'></a>
```txt
The MIT License (MIT)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a id='snippet-thekey'/></a>
<a id='snippet-thekey'></a>
```thelanguage
theValue
```
Expand Down

0 comments on commit 8ac5fd6

Please sign in to comment.