// HTML output code debugging (crutch) for highlight.js lib
const highlightingBlock = document.querySelector('.someblock pre > code.html');
const highlightingStringsArr = highlightingBlock.innerHTML.split('\n');
let newHighlightingStringsArr = Array();
const regExp = /^\t\t\t/;
highlightingStringsArr.forEach((string) => {
newHighlightingStringsArr.push(string.replace(regExp, ' '));
});
highlightingBlock.textContent = newHighlightingStringsArr.join('\n');
<?php
$name = stripslashes($_POST["name"]);
$email = stripslashes($_POST["email"]);
$message = stripslashes($_POST["message"]);
$secret = "YOUR_SECRET_KEY";
$response = $_POST["captcha"];
$verify = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}");
$captcha_success = json_decode($verify);
if ($captcha_success->success == false) {
//Пользователь не прошел вирфикацию
}
else if ($captcha_success->success == true) {
//Пользователь прошел вирфикацию
}
?>
Аналогично, чтобы включить строгий режим для функции, поместите оператор "use strict"; (или 'use strict';) в тело функции перед любыми другими операторами.
Question:
We're using gulp-sass package that is only a wrapper for node-sass.
We encounter lots of deprecation warnings like:
DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("variable-exists")) instead.
This is a valid warning and is related to an old version of Susy Grid. But it is extremely annoying during our development process because it produces hundreds of warnings on each execution of the Sass task.
It would be really great to be able to disable these warnings somehow. Or at least show them only once and not on each execution.
Is there a chance to do that or do you already plan to update this behavior?
Thanks in advance!
Answer:
There's no way for the compiler to differentiate between code you own and code you don't.
These deprecation warnings are important. They're telling you that your code will cease to work very soon, and you should take steps to resolve the warnings asap.
If it's code you don't control then we recommend opening issues on the code's repo, or submitting a PR to resolve the warnings.
There is simply no way to disable these warning. If you don't want to see them I suggest downgrading to an older version of Sass and never updating again.
PS D:\OSPanel\domains\my-site-bak> gulp
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'D:\OSPanel\domains\my-site-bak\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///D:/OSPanel/domains/my-site-bak/gulpfile.js:49:14
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
PS D:\OSPanel\domains\my-site-bak>
- разбить строку в текстовом блоке на буквы
- пройтись циклом и обернуть в свой контейнер каждую букву.
- чётным и нечётным присвоить разные зед-индексы
- ну и перезаписать в основной контейнер.
Другого алгоритма не вижу в таком случае.