From 5e37798560b33865a375ee409cc4fca832d9477e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 25 Nov 2023 09:34:46 +0200 Subject: [PATCH] ci: run `VAUTOFIX=1 ./v check-md -hide-warnings .` to fix doc failures --- doc/docs.md | 26 +++++++++++--------------- examples/js_dom_cube/README.md | 6 ++---- examples/js_dom_draw/README.md | 6 ++---- vlib/eventbus/README.md | 6 ++---- vlib/sokol/README.md | 8 +++----- vlib/x/ttf/README.md | 16 +++++++--------- 6 files changed, 27 insertions(+), 41 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index fc2fae19a9..bcdca5416e 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -2926,10 +2926,8 @@ To dereference a reference, use the `*` operator, just like in C. ## Constants ```v -const ( - pi = 3.14 - world = '世界' -) +const pi = 3.14 +const world = '世界' println(pi) println(world) @@ -2961,16 +2959,14 @@ fn rgb(r int, g int, b int) Color { } } -const ( - numbers = [1, 2, 3] - red = Color{ - r: 255 - g: 0 - b: 0 - } - // evaluate function call at compile time* - blue = rgb(0, 0, 255) -) +const numbers = [1, 2, 3] +const red = Color{ + r: 255 + g: 0 + b: 0 +} +// evaluate function call at compile time* +const blue = rgb(0, 0, 255) println(numbers) println(red) @@ -7157,4 +7153,4 @@ Assignment Operators += -= *= /= %= &= |= ^= >>= <<= >>>= -``` +``` \ No newline at end of file diff --git a/examples/js_dom_cube/README.md b/examples/js_dom_cube/README.md index 48ac4fcb96..d26f7275bf 100644 --- a/examples/js_dom_cube/README.md +++ b/examples/js_dom_cube/README.md @@ -115,9 +115,7 @@ module main import vweb import os -const ( - http_port = 3001 -) +const http_port = 3001 struct App { vweb.Context @@ -145,4 +143,4 @@ pub fn (mut app App) controller_get_all_task() vweb.Result { file := os.read_file('./index.html') or { panic(err) } return app.html(file) } -``` +``` \ No newline at end of file diff --git a/examples/js_dom_draw/README.md b/examples/js_dom_draw/README.md index fe03af2f20..ba904441c7 100644 --- a/examples/js_dom_draw/README.md +++ b/examples/js_dom_draw/README.md @@ -117,9 +117,7 @@ module main import vweb import os -const ( - http_port = 3001 -) +const http_port = 3001 struct App { vweb.Context @@ -147,4 +145,4 @@ pub fn (mut app App) controller_get_all_task() vweb.Result { file := os.read_file('./index.html') or { panic(err) } return app.html(file) } -``` +``` \ No newline at end of file diff --git a/vlib/eventbus/README.md b/vlib/eventbus/README.md index 6f39ecc3b8..2521395d4a 100644 --- a/vlib/eventbus/README.md +++ b/vlib/eventbus/README.md @@ -63,9 +63,7 @@ module main import eventbus // initialize it globally -const ( - eb = eventbus.new[string]() -) +const eb = eventbus.new[string]() fn main() { // get a mutable reference to the subscriber @@ -121,4 +119,4 @@ fn do_work() { This is mainly for security because if publisher & subscriber are both passed around, a client can easily publish events acting as the server. -So a client should only be able to use the Subscriber methods. +So a client should only be able to use the Subscriber methods. \ No newline at end of file diff --git a/vlib/sokol/README.md b/vlib/sokol/README.md index 9ecf10cb74..db764ef19d 100644 --- a/vlib/sokol/README.md +++ b/vlib/sokol/README.md @@ -16,10 +16,8 @@ import time import math import sokol.audio -const ( - sw = time.new_stopwatch() - sw_start_ms = sw.elapsed().milliseconds() -) +const sw = time.new_stopwatch() +const sw_start_ms = sw.elapsed().milliseconds() @[inline] fn sintone(periods int, frame int, num_frames int) f32 { @@ -54,4 +52,4 @@ fn main() { time.sleep(2000 * time.millisecond) audio.shutdown() } -``` +``` \ No newline at end of file diff --git a/vlib/x/ttf/README.md b/vlib/x/ttf/README.md index 67d4bc88d9..c9a7fea53c 100644 --- a/vlib/x/ttf/README.md +++ b/vlib/x/ttf/README.md @@ -247,14 +247,12 @@ import sokol.gfx import x.ttf import os -const ( - win_width = 600 - win_height = 700 - bg_color = gx.white - font_paths = [ - 'arial.ttf', - ] -) +const win_width = 600 +const win_height = 700 +const bg_color = gx.white +const font_paths = [ + 'arial.ttf', +] struct App_data { pub mut: @@ -332,4 +330,4 @@ fn main() { app.gg.run() } -``` +``` \ No newline at end of file