mirror of
https://github.com/Anduin2017/HowToCook.git
synced 2026-05-19 05:41:25 +08:00
fix: allow optional spaces in calorie patterns and apply textlint fixes
This commit is contained in:
6
.github/manual_lint.js
vendored
6
.github/manual_lint.js
vendored
@@ -75,9 +75,9 @@ const validators = [
|
||||
const contentBetweenTitles = lines.slice(mainTitleIndex + 1, firstSecondTitleIndex);
|
||||
let hasDifficultyLine = false;
|
||||
let hasCalorieLine = false;
|
||||
const difficultyPatternGeneral = /^预估烹饪难度:(★*)$/;
|
||||
const difficultyPatternStrict = /^预估烹饪难度:★{1,5}$/;
|
||||
const caloriePattern = /^预估卡路里:\d+大卡$/;
|
||||
const difficultyPatternGeneral = /^预估烹饪难度:\s*(★*)\s*$/;
|
||||
const difficultyPatternStrict = /^预估烹饪难度:\s*★{1,5}\s*$/;
|
||||
const caloriePattern = /^预估卡路里:\s*\d+\s*大卡$/;
|
||||
|
||||
for (const line of contentBetweenTitles) {
|
||||
if (difficultyPatternGeneral.test(line)) {
|
||||
|
||||
Reference in New Issue
Block a user