Last active
December 13, 2022 03:24
-
-
Save MrDesjardins/222d9842712a2f822c8a28a761c152a3 to your computer and use it in GitHub Desktop.
Some Regex for MDX to find potential issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MDX validations | |
## Title Format with quote | |
title: "(.*)(\\.*)" | |
## Ensure date is yyyy-mm-dd | |
(date: )(?!("((20[012]\d|19\d\d)|(1\d|2[0123]))-((0[0-9])|(1[012]))-((0[1-9])|([12][0-9])|(3[01]))")) | |
## Scan to see if we have all the code block starting a line with tripple ` | |
^(?!```).+(```)+.+$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment