diff --git a/include/fmt/format.h b/include/fmt/format.h index 44a2059a..06bf30fa 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3731,6 +3731,7 @@ FMT_END_NAMESPACE **Example**:: + #define FMT_STRING_ALIAS 1 #include // A compile-time error because 'd' is an invalid specifier for strings. std::string s = format(fmt("{:d}"), "foo"); diff --git a/support/rst2md.py b/support/rst2md.py index 59187ced..b1a193ce 100644 --- a/support/rst2md.py +++ b/support/rst2md.py @@ -113,8 +113,9 @@ class Translator(nodes.NodeVisitor): for i, entry in enumerate(row): text = entry[0][0] if len(entry) > 0 else '' if i != 0: - self.write(' ') + self.write('|') self.write('{:{}}'.format(text, widths[i])) + self.write('\n') def visit_table(self, node): table = node.children[0] @@ -122,14 +123,13 @@ class Translator(nodes.NodeVisitor): thead = table[-2] tbody = table[-1] widths = [int(cs['colwidth']) for cs in colspecs] - sep = ' '.join(['-' * w for w in widths]) - self.write(sep) + sep = '|'.join(['-' * w for w in widths]) + '\n' + self.write('\n\n') self.write_row(thead[0], widths) self.write(sep) for row in tbody: self.write_row(row, widths) - self.write(sep) - raise nodes.StopTraversal + raise nodes.SkipChildren def depart_table(self, node): pass