Skip to content

Commit

Permalink
Merge pull request #222 from earthpulse/cli-parse-md-to-html-fix
Browse files Browse the repository at this point in the history
added code block extension to parser
  • Loading branch information
juansensio authored Aug 21, 2024
2 parents b14c918 + c4bbca0 commit 29f1eac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eotdl/eotdl/datasets/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import frontmatter
import markdown
from markdown.extensions.fenced_code import FencedCodeExtension

from ..auth import with_auth
from .metadata import Metadata
Expand Down Expand Up @@ -73,7 +74,7 @@ def ingest_folder(
# retrieve dataset (create if doesn't exist)
dataset = retrieve_dataset(metadata, user)
if content:
content = markdown.markdown(content)
content = markdown.markdown(content, extensions=[FencedCodeExtension()])
update_metadata = True
if "description" in dataset:
# do not do this if the dataset is new, only if it already exists
Expand Down

0 comments on commit 29f1eac

Please sign in to comment.