Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a783de2

Browse filesBrowse files
committed
add regression test for unescaped pipe character in github output (issue #241)
1 parent 86112e6 commit a783de2
Copy full SHA for a783de2

1 file changed

+7Lines changed: 7 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/test_regression.py‎

Copy file name to clipboardExpand all lines: test/test_regression.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,3 +591,10 @@ def test_asciidoc_without_trailing_whitespace():
591591
result = tabulate([["longtext"]], headers=("bar",), tablefmt="asciidoc")
592592
expected = '[cols="<10",options="header"]\n|====\n| bar\n| longtext\n|===='
593593
assert_equal(expected, result)
594+
595+
596+
def test_github_escape_pipe_character():
597+
"Regression: github format must escape pipe character with a backslash (issue #241)"
598+
result = tabulate([["foo|bar"]], headers=("spam|eggs",), tablefmt="github")
599+
expected = '| spam\\|eggs |\n|-------------|\n| foo\\|bar |'
600+
assert_equal(expected, result)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.