Skip to content

Commit

Permalink
Update README.md (#26)
Browse files Browse the repository at this point in the history
fix spelling mistakes
  • Loading branch information
vcluopeng authored May 31, 2022
1 parent 72bb375 commit d79a982
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider
["hello"] = (args, content, ctx) => new ValueTask<string>("Hello world!")
});

Console.WriteLine(await process.EvaluateAsync("This is an [hello]"));
Console.WriteLine(await processor.EvaluateAsync("This is an [hello]"));
```

Which results in
Expand All @@ -59,7 +59,7 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider
}
});

Console.WriteLine(await process.EvaluateAsync("[bold text='bold text' 1234]"));
Console.WriteLine(await processor.EvaluateAsync("[bold text='bold text' 1234]"));
```

### Content arguments
Expand All @@ -75,7 +75,7 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider
}
});

Console.WriteLine(await process.EvaluateAsync("[bold]bold text[/bold]"));
Console.WriteLine(await processor.EvaluateAsync("[bold]bold text[/bold]"));
```

For single tags, the content is `null`. It means that you can detect if a shortcode was
Expand All @@ -96,7 +96,7 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider
}
});

Console.WriteLine(await process.EvaluateAsync("[bold 'bold text']"));
Console.WriteLine(await processor.EvaluateAsync("[bold 'bold text']"));
```

```
Expand All @@ -118,7 +118,7 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider
}
});

Console.WriteLine(await process.EvaluateAsync("[bold id='a' 'some text']"));
Console.WriteLine(await processor.EvaluateAsync("[bold id='a' 'some text']"));
```

```
Expand Down Expand Up @@ -202,8 +202,8 @@ var processor = new ShortcodesProcessor(new NamedShortcodeProvider

app.Run((httpContext) =>
{
var context = new Context({ ["HttpContext"] = httpContext });
var result = await process.EvaluateAsync("The current user is [username]", context);
var context = new Context(){ ["HttpContext"] = httpContext };
var result = await processor.EvaluateAsync("The current user is [username]", context);
return context.Response.WriteAsync(result);
});
```
Expand Down

0 comments on commit d79a982

Please sign in to comment.