1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vdoc: highlight inline examples for -f html (#13879)

This commit is contained in:
Nick Treleaven
2022-03-31 17:32:32 +01:00
committed by GitHub
parent 5c43493183
commit a87cd9663e
6 changed files with 9 additions and 9 deletions

View File

@@ -85,7 +85,7 @@ fn trace_error(x string) {
}
// error returns a default error instance containing the error given in `message`.
// Example: `if ouch { return error('an error occurred') }`
// Example: if ouch { return error('an error occurred') }
[inline]
pub fn error(message string) IError {
trace_error(message)
@@ -95,7 +95,7 @@ pub fn error(message string) IError {
}
// error_with_code returns a default error instance containing the given `message` and error `code`.
// `if ouch { return error_with_code('an error occurred', 1) }`
// Example: if ouch { return error_with_code('an error occurred', 1) }
[inline]
pub fn error_with_code(message string, code int) IError {
trace_error('$message | code: $code')