From 83ea529cf3cd410b598c3389a1edcc3d5593640c Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 28 Mar 2019 17:12:44 -0700
Subject: [PATCH] Ipynb writer: fixed carry-over of nbformat from metadata.

Previously we wrongly assumed it would be in a MetaString.
It's an a MetaInlines.
---
 src/Text/Pandoc/Writers/Ipynb.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Text/Pandoc/Writers/Ipynb.hs b/src/Text/Pandoc/Writers/Ipynb.hs
index 40248ed5a..f31cc38fd 100644
--- a/src/Text/Pandoc/Writers/Ipynb.hs
+++ b/src/Text/Pandoc/Writers/Ipynb.hs
@@ -67,7 +67,7 @@ pandocToNotebook opts (Pandoc meta blocks) = do
   let nbformat =
          case (lookupMeta "nbformat" jupyterMeta,
                lookupMeta "nbformat_minor" jupyterMeta) of
-               (Just (MetaString "4"), Just (MetaString y)) ->
+               (Just (MetaInlines [Str "4"]), Just (MetaInlines [Str y])) ->
                  case safeRead y of
                         Just z  -> (4, z)
                         Nothing -> (4, 5)