@@ -264,19 +264,21 @@ inlineToNodes opts (Superscript xs) =
264264 then ((node (HTML_INLINE (T.pack "<sup>")) [] : inlinesToNodes opts xs ++
265265 [node (HTML_INLINE (T.pack "</sup>")) []]) ++ )
266266 else case traverse toSuperscriptInline xs of
267− Nothing ->
267+ Just xs' | not (writerPreferAscii opts)
268+ -> (inlinesToNodes opts xs' ++)
269+ _ ->
268270 ((node (TEXT (T.pack "^(")) [] : inlinesToNodes opts xs ++
269271 [node (TEXT (T.pack ")")) []]) ++ )
270− Just xs' -> (inlinesToNodes opts xs' ++)
271272inlineToNodes opts (Subscript xs) =
272273 if isEnabled Ext_raw_html opts
273274 then ((node (HTML_INLINE (T.pack "<sub>")) [] : inlinesToNodes opts xs ++
274275 [node (HTML_INLINE (T.pack "</sub>")) []]) ++ )
275276 else case traverse toSubscriptInline xs of
276− Nothing ->
277+ Just xs' | not (writerPreferAscii opts)
278+ -> (inlinesToNodes opts xs' ++)
279+ _ ->
277280 ((node (TEXT (T.pack "_(")) [] : inlinesToNodes opts xs ++
278281 [node (TEXT (T.pack ")")) []]) ++ )
279− Just xs' -> (inlinesToNodes opts xs' ++)
280282inlineToNodes opts (SmallCaps xs) =
281283 if isEnabled Ext_raw_html opts
282284 then ((node (HTML_INLINE (T.pack "<span class=\"smallcaps\">")) []
@@ -297,14 +299,18 @@ inlineToNodes opts (RawInline fmt xs)
297299 = (node (CUSTOM_INLINE (T.pack xs) T.empty) [] :)
298300 | otherwise = id
299301inlineToNodes opts (Quoted qt ils) =
300− ((node (TEXT start) [] :
301− inlinesToNodes opts ils ++ [node (TEXT end) []]) ++)
302+ ((node (HTML_INLINE start) [] :
303+ inlinesToNodes opts ils ++ [node (HTML_INLINE end) []]) ++)
302304 where (start, end) = case qt of
303305 SingleQuote
304306 | isEnabled Ext_smart opts -> ("'","'")
307+ | writerPreferAscii opts ->
308+ ("‘", "’")
305309 | otherwise -> ("‘", "’")
306310 DoubleQuote
307311 | isEnabled Ext_smart opts -> ("\"", "\"")
312+ | writerPreferAscii opts ->
313+ ("“", "”")
308314 | otherwise -> ("“", "”")
309315inlineToNodes _ (Code _ str) = (node (CODE (T.pack str)) [] :)
310316inlineToNodes opts (Math mt str) =