Skip to content

Commit

Permalink
Revert "fix: frontmatter_pattern and tests (#5)" (#6)
Browse files Browse the repository at this point in the history
This reverts commit a842f12.
  • Loading branch information
holamgadol authored Dec 13, 2023
1 parent a842f12 commit 0317469
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion foliant/preprocessors/escapecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, *args, **kwargs):
self.content = None
self.pre_blocks_pattern = None
self._cache_dir_path = (self.project_path / self.options['cache_dir']).resolve()
self.frontmatter_pattern = re.compile(r'^((-|\+){3})\n([\s\S]+?)\n((-|\+){3})([\s\S]*)')
self.frontmatter_pattern = re.compile(r'^((-|\+){3})\n([\s\S]*)\n((-|\+){3})([\s\S]*)')

self.logger = self.logger.getChild('escapecode')

Expand Down
6 changes: 0 additions & 6 deletions tests/data/expected/frontmatter_yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

# Test

<escaped hash="d0dddce3714967d15e245995f15172ef"></escaped>

---

<escaped hash="bdc835608eb1fd397997a841ad7ceb68"></escaped>

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
Expand Down
10 changes: 0 additions & 10 deletions tests/data/input/frontmatter_yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ tempor incididunt ut labore."

# Test

```py
import re
```

---

```py
import os
```

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
Expand Down

0 comments on commit 0317469

Please sign in to comment.