lib/graphql-docs/helpers.rb in graphql-docs-0.6.1 vs lib/graphql-docs/helpers.rb in graphql-docs-0.6.2

- old
+ new

@@ -111,10 +111,13 @@ def fetch_include(filename) @templates ||= {} return @templates[filename] unless @templates[filename].nil? - @templates[filename] = ERB.new(File.read(File.join(@options[:templates][:includes], filename))) + contents = File.read(File.join(@options[:templates][:includes], filename)) + # normalize spacing so that CommonMarker doesn't treat it as `pre` + template = contents.gsub(/^\s{4}/m, ' ') + @templates[filename] = ERB.new(template) @templates[filename] end def helper_methods return @helper_methods if defined?(@helper_methods)