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

Fix export when using ':t export option #532

Merged
merged 1 commit into from Jan 16, 2022
Merged

Fix export when using ':t export option #532

merged 1 commit into from Jan 16, 2022

Conversation

kaushalmodi
Copy link
Owner

@kaushalmodi kaushalmodi commented Jan 15, 2022

@kaushalmodi kaushalmodi marked this pull request as draft January 15, 2022 23:46
@kaushalmodi
Copy link
Owner Author

kaushalmodi commented Jan 16, 2022

  • Fix the smart quote conversion not happening even when the ':t option is set.

From the tests, it's quickly evident that Hugo/Goldmark do a better
job at smart quote conversions.

Org mode's smart quote conversion is always converting single quotes
to ’. For example, 'abc' will convert to ’abc’. If
that's the desired behavior, enable it by using

    :EXPORT_OPTIONS: ':t

Goldmark converts 'abc' to ‘abc’. This is the default
behavior because ox-hugo ignores the user-set value of
`org-export-with-smart-quotes' due to the above reason.
@kaushalmodi kaushalmodi changed the title Smart quote support: Recognize org-export-with-smart-quotes Fix export when using ':t export option Jan 16, 2022
@kaushalmodi
Copy link
Owner Author

This PR basically adds tests to see the difference between Org mode's and Goldmark's smart quote conversion. It looks like Goldmark does a more correct job when converting single quotes to smart quotes. Org mode is always converting single quotes to ’!!

@kaushalmodi kaushalmodi marked this pull request as ready for review January 16, 2022 07:20
@kaushalmodi kaushalmodi merged commit 9f5735e into main Jan 16, 2022
@kaushalmodi kaushalmodi deleted the smart-quotes branch January 16, 2022 07:36
@kaushalmodi
Copy link
Owner Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant