@@ -582,13 +582,17 @@ def convert_source_suffix(app: Sphinx, config: Config) -> None:
582
582
# The default filetype is determined on later step.
583
583
# By default, it is considered as restructuredtext.
584
584
config .source_suffix = {source_suffix : 'restructuredtext' }
585
+ logger .info (__ ("Converting `source_suffix = %r` to `source_suffix = %r`." ),
586
+ source_suffix , config .source_suffix )
585
587
elif isinstance (source_suffix , (list , tuple )):
586
588
# if list, considers as all of them are default filetype
587
589
config .source_suffix = dict .fromkeys (source_suffix , 'restructuredtext' )
590
+ logger .info (__ ("Converting `source_suffix = %r` to `source_suffix = %r`." ),
591
+ source_suffix , config .source_suffix )
588
592
elif not isinstance (source_suffix , dict ):
589
- logger . warning ( __ ("The config value `source_suffix' expects "
590
- "a string, list of strings, or dictionary. "
591
- "But `%r' is given." % source_suffix ))
593
+ msg = __ ("The config value `source_suffix' expects a dictionary, "
594
+ "a string, or a list of strings. Got `%r' instead (type %s)." )
595
+ raise ConfigError ( msg % ( source_suffix , type ( source_suffix ) ))
592
596
593
597
594
598
def convert_highlight_options (app : Sphinx , config : Config ) -> None :
0 commit comments