Skip to content

Commit 0f3940b

Browse files
Merge branch 'main' into validate_latest
2 parents 654ea3b + 33a0897 commit 0f3940b

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ jobs:
3737
npx brrr builds/respec-w3c.js -o builds
3838
file_size=$(stat -c%s "builds/respec-w3c.js")
3939
xfer_file_size=$(stat -c%s "builds/respec-w3c.js.br")
40-
curl --fail -L -X PUT "https://respec.org/respec/size" \
40+
curl -L -X PUT "https://respec.org/respec/size" \
4141
-H "Authorization: $RESPEC_SECRET" \
42+
-s -w "HTTP Response Code: %{http_code}\n" \
4243
-d "size=$file_size" -d "xferSize=$xfer_file_size "\
4344
-d "sha=$GITHUB_SHA" -d "timestamp=$timestamp"
4445
env:

src/core/ui.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { html, pluralize } from "./import-maps.js";
1212
import css from "../styles/ui.css.js";
1313
import { markdownToHtml } from "./markdown.js";
14+
import { reindent } from "./reindent.js";
1415
import { sub } from "./pubsubhub.js";
1516
export const name = "core/ui";
1617

@@ -266,10 +267,15 @@ function rsErrorToHTML(err) {
266267
const plugin = err.plugin
267268
? `<p class="respec-plugin">(plugin: "${err.plugin}")</p>`
268269
: "";
270+
269271
const hint = err.hint
270-
? `\n<p class="respec-hint"><strong>How to fix:</strong> ${markdownToHtml(
271-
err.hint,
272-
{ inline: true }
272+
? `\n${markdownToHtml(
273+
`<p class="respec-hint"><strong>How to fix:</strong> ${reindent(
274+
err.hint
275+
)}`,
276+
{
277+
inline: !err.hint.includes("\n"),
278+
}
273279
)}\n`
274280
: "";
275281
const elements = Array.isArray(err.elements)

src/core/xref.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,7 @@ function showErrors({ ambiguous, notFound }) {
456456
};
457457

458458
const howToFix = (howToCiteURL, originalTerm) => {
459-
return docLink`
460-
[See search matches for "${originalTerm}"](${howToCiteURL}) or
461-
${"[Learn about this error|#error-term-not-found]"}.`;
459+
return docLink`[See search matches for "${originalTerm}"](${howToCiteURL}) or ${"[Learn about this error|#error-term-not-found]"}.`;
462460
};
463461

464462
for (const { query, elems } of notFound.values()) {

0 commit comments

Comments
 (0)