Все, что вам нужно сделать, это использовать except
в файле gitlab-ci.yml
и добавить ваши ветви непосредственно ниже:
mybuild:
stage: test
image: somedockerimage
script:
- some script running
except:
- branch-name
Это без проблем работает над моим проектом.
Если вы назначите вашу цитату в поле textContent
вашего абзаца p
, она будет отображаться в виде простого текста. Если вместо этого вы используете innerHTML
, он будет анализировать и отображать любой предоставленный вами HTML.
См. Пример.
const p = document.getElementById("sentences");
const origSentences = [
"This is the <br /> first sentence.",
"This is the second sentence.",
"This is the <br /> third sentence."
];
let remainingSentences = [];
function randomSentence() {
if (remainingSentences.length === 0)
remainingSentences = origSentences.slice();
const { length } = remainingSentences;
const [quote] = remainingSentences.splice(
Math.floor(Math.random() * length),
1
);
p.innerHTML = quote;
}
<p>
<button
onclick="randomSentence()"
type="button">
Random Sentence
</button>
</p>
<p id="sentences"></p>