Skip to content

Commit

Permalink
tests: base prp file
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed May 9, 2024
1 parent 906983c commit 251a196
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions example/readme.prp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Tutorial

This action allows you to replace variables in a text file. The variables are defined in a map and can be used in the
text file with the following syntax: `{_ variable _}`. Spaces are allowed around the variable name.

### Example

Here's an example of how to use:

```typescript
import { processFiles } from 'library';

const variables = new Map<string, string>();
variables.set('EXAMPLE', 'World');
variables.set('what', 'Hello');

processFiles({
files: ['readme.prp.md'],
variables: variables,
encodings: 'utf8',
extension: '.prp.md'
});
```

### Greetings

{_ what _}, {_ EXAMPLE _}! {_what _} {_ EXAMPLE_}{_what_}

### Complex Variables

This section includes variables with more complex names to test the robustness of the regular expression in
the `replaceVariables` function.

{_ variable with spaces _}
{_ variable_with_underscores _}
{_ variable-with-dashes _}
{_ variable.with.dots _}

0 comments on commit 251a196

Please sign in to comment.