Place commas and periods inside quotation marks (EK00007)
Placing commas and periods inside quotation marks follows American English style and keeps your documentation consistent. Learn why, with examples.
American English style places commas and periods inside the closing quotation mark, so a single, predictable pattern runs through your documentation. EkLine flags a comma or period placed outside a closing quotation mark (rule EK00007) so you can move it in.
Why place commas and periods inside quotation marks?
Section titled “Why place commas and periods inside quotation marks?”Consistent quotation punctuation signals careful editing and matches the convention most software and API documentation follows. Placing commas and periods inside the closing mark keeps your prose aligned with American English style guides your readers expect. A single, predictable pattern also reads faster and avoids the visual snag of a stray mark after a quote.
What EkLine flags
Section titled “What EkLine flags”EK00007 matches a comma or period that sits directly after a closing quotation mark.
- ❌ Incorrect: The status is “active”.
- ✅ Correct: The status is “active.”
- ❌ Incorrect: Enter “yes”, then continue.
- ✅ Correct: Enter “yes,” then continue.
How to fix
Section titled “How to fix”Move the comma or period so it sits inside the closing quotation mark.
Do commas and periods go inside or outside quotation marks?
Section titled “Do commas and periods go inside or outside quotation marks?”In American English style, commas and periods go inside the closing quotation mark. This is the convention most software and API documentation follows.
When should you keep punctuation outside the quotation mark?
Section titled “When should you keep punctuation outside the quotation mark?”When the quotation marks enclose a literal value a reader must type exactly — such as a command or a code string — keep the punctuation outside so it isn’t mistaken for part of the value.
Rule details
Section titled “Rule details”| Property | Value |
|---|---|
| Rule ID | EK00007 |
| Category | Spelling and grammar |
| Default severity | Error |
| Enabled by default | No |
Ignore this rule
Section titled “Ignore this rule”To keep the punctuation outside the quotation mark on one line, add an inline comment:
<!-- ekline-ignore-next-line EK00007 -- literal value, keep period outside -->Set the flag to "true".To disable the rule across your project, add it to the ignore list in your configuration file.