Skip to content

Conversation

@lukasmwerner
Copy link
Contributor

Description

I was drafting a blog post and realized that Harper was missing these corrections.

How Has This Been Tested?

WIP

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@lukasmwerner lukasmwerner changed the title correct: lo and behold, and jack-'o-lantern feat: correct lo and behold, and jack-'o-lantern Nov 13, 2025
@hippietrail
Copy link
Collaborator

It should be jack-o'-lantern with the apostrophe following the o since it represents an elided f in the word of.

"Lo and behold" used to be in the predecessor to the current phrase_corrections and disappeared some time around the transition. I remember pointing it out when I noticed but it wasn't put back for whatever reason?

@lukasmwerner
Copy link
Contributor Author

It seems that I need this correction in the web edition as I didn't make that mistake in the pr itself but just the title. That should be fixed now.

@lukasmwerner lukasmwerner changed the title feat: correct lo and behold, and jack-'o-lantern feat: correct lo and behold, and jack-o'-lantern Nov 13, 2025
@hippietrail
Copy link
Collaborator

It seems that I need this correction in the web edition as I didn't make that mistake in the pr itself but just the title. That should be fixed now.

Yes I only noticed that after I'd sent my comment. I also thought the spelling you included "jack o'lantern" was an error. So I checked all the major online dictionaries: American Heritage, Cambridge, Collins, Longman, OED, Oxford, and Merriam-Webster. Interestingly it's not in any of them except for Collins. Being in any one of them is sufficient IMHO. It makes me wonder about at some point marking dictionary entries somehow so that users can allow or block specific spellings or sets of spellings by authority etc.

Just some observations (-:

"Use contraction when referring to `jack-o'-lanterns`",
"Corrects contraction of `jack o lanterns` to `jack o'lanterns` or `jack-o'-lanterns`",
LintKind::Punctuation
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I only just realized. In phrase_corrections like this will create two settings that have to be enabled/disabled individually. One for the singular and one for the plural. If you move them to the newer phrase_set_corrections you can put them both together with just a single setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's super neat! I'll also have to update my previous rule(#1829) to that new correction style as well.

@lukasmwerner
Copy link
Contributor Author

lukasmwerner commented Nov 13, 2025

I got this one from the Associated Press's style guide originally. But agreed that we will want to start adding rule-sets as suggested in #1827 so users will be able to start to follow specific groups of rules.

@elijah-potter
Copy link
Collaborator

@lukasmwerner, is this ready for review?

@lukasmwerner
Copy link
Contributor Author

I'm still needing to do testcases but otherwise this is done.

@elijah-potter
Copy link
Collaborator

@lukasmwerner, it looks like most style guides recommend you always include hyphens in jack-o'-lantern. Did you find a competing report?

@lukasmwerner
Copy link
Contributor Author

I haven't seen others but I was going off of AP style where they were using hyphenation. However, I was also going off of Wikipedia which states: 'A jack-o'-lantern (or jack o'lantern)'.

But if that isn't a strong enough case I'm happy to remove those cases.

@elijah-potter
Copy link
Collaborator

I don't think the cases need to be removed. I just think they should all map to the hyphenated version.

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