Skip to content

Commit

Permalink
Add stub for phrasal adjectives
Browse files Browse the repository at this point in the history
  • Loading branch information
suchow committed Feb 7, 2016
1 parent 98540dc commit a04f0f3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions proselint/.proselintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"garner.mondegreens" : true,
"garner.needless_variants" : true,
"garner.oxymorons" : true,
"garner.phrasal_adjectives" : true,
"garner.preferred_forms" : true,
"garner.punctuation" : true,
"garner.redundancy" : true,
Expand Down
27 changes: 27 additions & 0 deletions proselint/checks/garner/phrasal_adjectives.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
"""Phrasal adjectives.
---
layout: post
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: Phrasal adjectives
date: 2014-06-10 12:31:19
categories: writing
---
Phrasal adjectives.
"""
from tools import existence_check, memoize


@memoize
def check(text):
"""Check the text."""
err = "garner.phrasal_adjectives"
msg = u"""No hyphen is necessary in phrasal adjectives with an adverb
ending in -ly."""

return existence_check(text, ["ly-"], err, msg,
require_padding=False, offset=-1)
3 changes: 3 additions & 0 deletions proselint/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ between you and i
I did it on accident
I feel nauseous

# Phrasal adjectives
It was a highly-anticipated event.

# Various misspellings
highfaluting
the statement was inadmissable in court
Expand Down

0 comments on commit a04f0f3

Please sign in to comment.