Skip to content

Commit

Permalink
Better handling of apostrophes in company names (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylen authored Jun 23, 2018
1 parent cbff2a9 commit 780627b
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Name | Website | Region
[Kodify](/company-profiles/kodify.md) | https://kodify.io | EU & Worldwide
[Koding](/company-profiles/koding.md) ⚠ | https://koding.com | Worldwide
[LaterPay](/company-profiles/laterpay.md) | https://www.laterpay.net/ |
[Let's Encrypt](/company-profiles/let-s-encrypt.md) | https://letsencrypt.org | US and Canada
[Let's Encrypt](/company-profiles/lets-encrypt.md) | https://letsencrypt.org | US and Canada
[Librato](/company-profiles/librato.md) ⚠ | https://www.librato.com/ |
[Lightbend](/company-profiles/lightbend.md) ⚠ | http://www.lightbend.com/ | Worldwide
[Linaro](/company-profiles/linaro.md) ⚠ | https://www.linaro.org/ |
Expand Down Expand Up @@ -244,7 +244,7 @@ Name | Website | Region
[Novoda](/company-profiles/novoda.md) | https://www.novoda.com/ | UK & Europe
[npm](/company-profiles/npm.md) ⚠ | https://www.npmjs.com/ |
[Nuna](/company-profiles/nuna.md) | https://www.nuna.com/ | US
[O'Reilly Media](/company-profiles/o-reilly-media.md) ⚠ | http://www.oreilly.com/ |
[O'Reilly Media](/company-profiles/oreilly-media.md) ⚠ | http://www.oreilly.com/ |
[Oddball](/company-profiles/oddball.md) | https://oddball.io/ | US
[Olark](/company-profiles/olark.md) | https://www.olark.com/ | UTC-8 to UTC+1
[Olo](/company-profiles/olo.md) | https://www.olo.com/ | US
Expand Down
1 change: 1 addition & 0 deletions bin/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const headingsOptional = [
function companyNameToProfileFilename( companyName ) {
return companyName.toLowerCase()
.replace( /&/g, ' and ' )
.replace( /'/g, '' )
.replace( /[^a-z0-9]+/gi, '-' )
.replace( /^-|-$/g, '' );
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ If you know something we don't, help us fill it in! Here's how:

- Read our [Contributing Guidelines](https://github.com/remoteintech/remote-jobs/blob/master/CONTRIBUTING.md)
- Have a look at our [example company profile](https://github.com/remoteintech/remote-jobs/blob/master/company-profiles/example.md)
- Follow the structure of the example profile and [send us a pull request with your changes to this file!](https://github.com/remoteintech/remote-jobs/edit/master/company-profiles/o-reilly-media.md)
- Follow the structure of the example profile and [send us a pull request with your changes to this file!](https://github.com/remoteintech/remote-jobs/edit/master/company-profiles/oreilly-media.md)
1 change: 1 addition & 0 deletions test/fixtures/bad-profile-titles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Name | Website | Region
[10up](/company-profiles/10up.md) | https://10up.com/ | Worldwide
[17hats](/company-profiles/17hats.md) | https://www.17hats.com/ | Worldwide
[18F](/company-profiles/18f.md) | https://18f.gsa.gov/ | USA
[Let's Encrypt](/company-profiles/let-s-encrypt.md) | https://letsencrypt.org | US and Canada
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Let's Encrypt

## Company blurb

Let’s Encrypt is a free, automated, and open certificate authority brought to you by the Internet Security Research Group (ISRG). ISRG is a California public benefit corporation, and is recognized by the IRS as a tax-exempt organization under Section 501(c)(3) of the Internal Revenue Code.

## How to apply

[Let's Encrypt](https://letsencrypt.org/jobs/)
3 changes: 2 additions & 1 deletion test/validation-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ describe( 'validation script errors', () => {

it( 'should catch invalid titles in company profiles', () => {
expect( runValidationWithFixtures( 'bad-profile-titles' ) ).to.eql( {
exitCode: 6,
exitCode: 7,
output: [
'10up.md: Expected 1 first-level heading but found 0',
'10up.md: The main title is wrapped inside of another element.',
'10up.md: Company name looks wrong: ""',
'17hats.md: Expected filename "a-company-called-17hats.md" for company "A company called 17hats"',
'18f.md: Company name looks wrong: "$%$#%$"',
'and-yet.md: Expected 1 first-level heading but found 2',
'let-s-encrypt.md: Expected filename "lets-encrypt.md" for company "Let\'s Encrypt"',
],
} );
} );
Expand Down

0 comments on commit 780627b

Please sign in to comment.