Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions tools/respec2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Renderer extends marked.Renderer {
return styleText("italic", this.parser.parseInline(token.tokens));
}
codespan(token) {
return styleText("underline", unescape(token.text));
return styleText("cyan", `\`${unescape(token.text)}\``);
}
paragraph(token) {
return unescape(this.parser.parseInline(token.tokens));
Expand Down Expand Up @@ -108,7 +108,7 @@ class Logger {
console.error(
" ",
styleText("bold", paddedTitle),
this._formatMarkdown(value)
this._reindent(this._formatMarkdown(value), paddedTitle.length + 3)
);
};
print("Count", rsError.elements && String(rsError.elements.length));
Expand All @@ -130,6 +130,13 @@ class Logger {
(!!rsError.cause?.stack || rsError.plugin === "unknown")
);
}

/**
* @param {string} text
*/
_reindent(text, padding = 0) {
Comment thread
marcoscaceres marked this conversation as resolved.
Resolved
return text.replaceAll("\n", `\n${" ".repeat(padding)}`);
}
}

class StaticServer {
Expand Down
Loading