Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support left/right single quotation marks in text and arguments #3192

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pygmt/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,11 @@ def non_ascii_to_octal(argstr):
c: "\\" + format(i, "o")
for c, i in zip(
"•…™—–fiž" # \03x. \030 is undefined
"’‘" # \047 and \140
"š" # \177
"Œ†‡Ł⁄‹Š›œŸŽł‰„“”" # \20x-\21x
"ı`´ˆ˜¯˘˙¨‚˚¸'˝˛ˇ", # \22x-\23x
[*range(25, 32), *range(127, 160)],
[*range(25, 32), 39, 96, *range(127, 160)],
strict=True,
)
}
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,5 +430,5 @@ def test_text_quotation_marks():
"""
fig = Figure()
fig.basemap(projection="X4c/2c", region=[0, 4, 0, 2], frame=0)
fig.text(x=2, y=1, text="\\234 \\140 ' \" \\216 \\217", font="20p")
fig.text(x=2, y=1, text='\\234 ‘ ’ " “ ”', font="20p") # noqa: RUF001
return fig