Skip to content

Commit

Permalink
🔧🐛 in extra attributes on html/body case
Browse files Browse the repository at this point in the history
  • Loading branch information
baileys-li committed Aug 30, 2021
1 parent 9c4eed4 commit dc3c431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ function checkIsWholePage (elem) {
// ------------------------------

function getTagClass (code, tagName = `body`) {
const regexp = new RegExp(`<${tagName}[^>]*class="(.*)"`);
const regexp = new RegExp(`<${tagName}[^>]*class="(.[^"]*)"`);
const result = code.match(regexp);

if (result) {
Expand All @@ -496,7 +496,7 @@ function getTagClass (code, tagName = `body`) {

// eslint-disable-next-line no-unused-vars
function runDev () {
const testMarkup = `<html class="page">
const testMarkup = `<html class="page" lang="en">
<body class="page__body"> <h1 class="page__title">Title</h1>
<div class="wrapper wrapper__container">
<header class="header">
Expand Down

0 comments on commit dc3c431

Please sign in to comment.