Browse Source

Remove uneeded escape chars

pull/1/head
Luke Childs 6 years ago
parent
commit
d93d481e74
  1. 6
      index.js

6
index.js

@ -6,13 +6,13 @@ const chalk = require('chalk');
const prettyMs = require('pretty-ms');
const getMetaTag = (html, property) => {
const regex = new RegExp(`<meta[^>]*property=[\"|\']${property}[\"|\'][^>]*>`, 'i');
const regex = new RegExp(`<meta[^>]*property=["|']${property}["|'][^>]*>`, 'i');
return regex.exec(html)[0];
};
const getMetaTagContent = (metaTagHtml) => {
const regex = /content=[\"]([^\"]*)[\"]/i;
const getMetaTagContent = metaTagHtml => {
const regex = /content=["]([^"]*)["]/i;
return regex.exec(metaTagHtml)[1];
};

Loading…
Cancel
Save