File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,7 @@ def escape_empty(val):
737
737
"pretty" : "pretty" ,
738
738
"psql" : "psql" ,
739
739
"rst" : "rst" ,
740
+ "github" : "github" ,
740
741
"outline" : "outline" ,
741
742
"simple_outline" : "simple_outline" ,
742
743
"rounded_outline" : "rounded_outline" ,
Original file line number Diff line number Diff line change @@ -509,6 +509,23 @@ def test_github():
509
509
assert_equal (expected , result )
510
510
511
511
512
+ def test_github_multiline ():
513
+ "Output: github with multiline cells with headers"
514
+ table = [[2 , "foo\n bar" ]]
515
+ headers = ("more\n spam eggs" , "more spam\n & eggs" )
516
+ expected = "\n " .join (
517
+ [
518
+ "| more | more spam |" ,
519
+ "| spam eggs | & eggs |" ,
520
+ "|-------------|-------------|" ,
521
+ "| 2 | foo |" ,
522
+ "| | bar |" ,
523
+ ]
524
+ )
525
+ result = tabulate (table , headers , tablefmt = "github" )
526
+ assert_equal (expected , result )
527
+
528
+
512
529
def test_grid ():
513
530
"Output: grid with headers"
514
531
expected = "\n " .join (
You can’t perform that action at this time.
0 commit comments