3148bc2ae6cec9e4f27ad0cd25645a834e208a02
[oweals/minetest.git] / doc / mkdocs / code_tag.patch
1 @@ -691,7 +691,7 @@
2              yield tup
3          yield 0, '</div>\n'
4  
5 -    def _wrap_pre(self, inner):
6 +    def _wrap_pre_code(self, inner):
7          style = []
8          if self.prestyles:
9              style.append(self.prestyles)
10 @@ -704,10 +704,10 @@
11  
12          # the empty span here is to keep leading empty lines from being
13          # ignored by HTML parsers
14 -        yield 0, ('<pre' + (style and ' style="%s"' % style) + '><span></span>')
15 +        yield 0, ('<pre' + (style and ' style="%s"' % style) + '><code><span></span>')
16          for tup in inner:
17              yield tup
18 -        yield 0, '</pre>'
19 +        yield 0, '</code></pre>'
20  
21      def _format_lines(self, tokensource):
22          """
23 @@ -815,7 +815,7 @@
24          individual lines, in custom generators. See docstring
25          for `format`. Can be overridden.
26          """
27 -        return self._wrap_div(self._wrap_pre(source))
28 +        return self._wrap_div(self._wrap_pre_code(source))
29  
30      def format_unencoded(self, tokensource, outfile):
31          """