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

Double-quote characters in comments show as guillemets in output #1666

Closed
davmac314 opened this issue Aug 29, 2023 · 9 comments · Fixed by #1700
Closed

Double-quote characters in comments show as guillemets in output #1666

davmac314 opened this issue Aug 29, 2023 · 9 comments · Fixed by #1700
Assignees
Labels
Milestone

Comments

@davmac314
Copy link

When double-quote characters are entered in a comment "like this", they appear in the output as guillemets «like this».

This is presumably intended, but it is not appropriate for some languages, and doesn't seem to be configurable.

@paskal paskal added the backend label Sep 6, 2023
@paskal
Copy link
Sponsor Collaborator

paskal commented Sep 6, 2023

We use blackfriday SmartypantsAngledQuotes option is responsible for it.

With this option "quoted" text translates to «quoted» text (current behaviour), without it to “quoted” text. Would be the second option be more appropriate? I think I can add it to the frontend so it would be possible to change it per-site based on your preferences and site language.

@paskal paskal self-assigned this Sep 6, 2023
@davmac314
Copy link
Author

Would be the second option be more appropriate?

Yes, thanks!

@paskal
Copy link
Sponsor Collaborator

paskal commented Sep 16, 2023

For reference, I found that European documentation which states that in most listed European Union official languages „...“ is the correct form, and it's not available in the parser we use at all. I'll think about how to implement this change and how to do it without complicating the code a bit later. It's a very minor piece of functionality, and it feels weird to include it into the backend, maybe we should add replacement rules to the frontend so that all variants would be supported.

@davmac314
Copy link
Author

It would probably be best to just leave quotes alone, in my opinion. I.e. people can type whatever sort of quotes they like, and how they enter it is how it should be displayed.

@paskal
Copy link
Sponsor Collaborator

paskal commented Nov 18, 2023

I've addressed this in #1700. Please verify if that would work for you.

@davmac314
Copy link
Author

Looks like it should - I'll try to test on the weekend. Thanks!

@davmac314
Copy link
Author

I'm afraid it doesn't seem to work. I have built your branch and am running with --disable-fancy-html-formatting:

root@bmdragon:~# ps -Af|grep remark42
remark42 2218378 2218377  0 06:27 pts/1    00:00:00 -bash
remark42 2218749       1  0 06:52 ?        00:00:00 /bin/sh /home/remark42/run-remark.sh
remark42 2218750 2218749  0 06:52 ?        00:00:01 ./remark42.linux-amd64 server --url=https://davmac.org/remark42/ --secret=XXXXXXXX --site=davmac.org --address=127.0.0.1 --port=8001 --smtp.host=localhost --smtp.port=25 --auth.github.cid=XXXXXXXXXXXXX --auth.github.csec=XXXXXXXXXXXXXX --auth.email.enable --auth.email.from=remark42@davmac.org --auth.anon --notify.admins=email --admin.shared.id=XXXXXXXXXXX --admin.shared.email=davmac@davmac.org --disable-fancy-html-formatting

But when I make a comment with "quotes" it still comes out as guillemets. See this page: https://davmac.org/blog/escape-from-system-d-vi.html

Am I doing something wrong?

@paskal
Copy link
Sponsor Collaborator

paskal commented Nov 25, 2023

You did everything right, I missed passing the parameter I created in three places. Now it should work as expected, please take a look once more.

@davmac314
Copy link
Author

Working! Thanks again.

@paskal paskal added this to the v1.13.0 milestone Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants