Skip to content

Feat: replace em dash with --#5125

Merged
w0rp merged 2 commits into
dense-analysis:masterfrom
micahcc:mcc/no_emdash
May 12, 2026
Merged

Feat: replace em dash with --#5125
w0rp merged 2 commits into
dense-analysis:masterfrom
micahcc:mcc/no_emdash

Conversation

@micahcc
Copy link
Copy Markdown
Contributor

@micahcc micahcc commented May 11, 2026

LLMs like to use em dash for no reason. I don't like non-ascii character in my text files, so I made a fixer to convert them from em dash to regular old -- which latex and markdown treat as EM dashes. Added tests. Yes some of this code was was partially created by claude.

Naming is the hard part, definitely open to renames. no_emdash ascii_emdash replace_emdash em_dash or emdash? etc.

It might be argued there are quite a few annoying unicodes that could be replaced, who really wants a 🤗 in their C++ code?

@micahcc micahcc changed the title no em dash Feat: replace em dash with -- May 11, 2026
@Spixmaster
Copy link
Copy Markdown
Contributor

This has no ending. Why limit to only one character? If one inputs garbage, it is the own fault. I dislike this very special use case.

Copy link
Copy Markdown
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see someone submitting a simple fixer function.

Cheers! 🍻

@w0rp
Copy link
Copy Markdown
Member

w0rp commented May 12, 2026

I dislike this very special use case.

You can not use the function.

@w0rp w0rp enabled auto-merge (squash) May 12, 2026 19:32
@w0rp w0rp merged commit ab35310 into dense-analysis:master May 12, 2026
8 checks passed
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.

3 participants