From e7db190fca71762df459f353c6d6e8f9ed667aac Mon Sep 17 00:00:00 2001 From: pR0Ps Date: Fri, 26 Dec 2014 13:49:51 -0500 Subject: [PATCH] No need to use regexp to compare equality --- meta_yaml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta_yaml.py b/meta_yaml.py index 27909ad..d1dfde7 100644 --- a/meta_yaml.py +++ b/meta_yaml.py @@ -51,7 +51,6 @@ from __future__ import absolute_import from __future__ import unicode_literals from markdown import Extension from markdown.preprocessors import Preprocessor -import re import yaml try: from yaml import CSafeLoader as Loader @@ -87,10 +86,10 @@ class MetaYamlPreprocessor(Preprocessor): """ Parse Meta-Data and store in Markdown.Meta. """ yaml_block = [] line = lines.pop(0) - if re.match(r'-{3}', line): + if line == "---": while lines: line = lines.pop(0) - if re.match(r'(\.{3}|-{3})', line): + if line in ("---", "..."): break yaml_block.append(line) else: