Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typographic-quotes

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typographic-quotes - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

index.es5.js

@@ -13,3 +13,3 @@ 'use strict';

var localeQuotes = quotesDB[locale];
var pattern = /(^|\s)(?:"(.*?)"|'(.*?)')(\s|$)/gim;
var pattern = /(^|\s)(?:"(.*?)"|'(.*?)')(\s|$|\.|,)/gim;

@@ -16,0 +16,0 @@ var primary = function primary(match) {

@@ -5,3 +5,3 @@ import quotesDB from 'typographic-quotes-l10n-db';

const localeQuotes = quotesDB[locale];
const pattern = /(^|\s)(?:"(.*?)"|'(.*?)')(\s|$)/gim;
const pattern = /(^|\s)(?:"(.*?)"|'(.*?)')(\s|$|\.|,)/gim;

@@ -8,0 +8,0 @@ const primary = (match, before='', part1='', part2='', after='')=> {

{
"name": "typographic-quotes",
"version": "1.0.2",
"version": "1.0.3",
"description": "Always use curly quotes",

@@ -5,0 +5,0 @@ "main": "index.es5.js",

@@ -19,2 +19,9 @@ import quotes from './index';

it('should fix simple quotes ending quite before punctuation', ()=> {
equal(quotes(`foo 'foo'. bar`), `foo “foo”. bar`);
equal(quotes(`foo "foo". bar`), `foo “foo”. bar`);
equal(quotes(`foo 'foo', bar`), `foo “foo”, bar`);
equal(quotes(`foo "foo", bar`), `foo “foo”, bar`);
});
it('should fix simple quotes and not messing up with apostrophes', ()=> {

@@ -45,2 +52,9 @@ equal(quotes(`foo's 'foo' bar`), `foo's “foo” bar`);

it('should fix nested quotes ending quite before punctuation', ()=> {
equal(quotes(`foo "foo 'inside' bar". Start`), `foo “foo ‘inside’ bar”. Start`);
equal(quotes(`foo 'foo "inside" bar'. Start`), `foo “foo ‘inside’ bar”. Start`);
equal(quotes(`foo "foo 'inside' bar", continuing`), `foo “foo ‘inside’ bar”, continuing`);
equal(quotes(`foo 'foo "inside" bar', continuing`), `foo “foo ‘inside’ bar”, continuing`);
});
it('should fix several nested quotes', ()=> {

@@ -47,0 +61,0 @@ equal(quotes(`foo "foo 'inside' bar" bar foo "foo 'inside' bar" bar`),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc