mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: add -comments and new comment merger (#11221)
This commit is contained in:
7
cmd/tools/vdoc/tests/testdata/basic/main.comments.out
vendored
Normal file
7
cmd/tools/vdoc/tests/testdata/basic/main.comments.out
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module main
|
||||
|
||||
const (
|
||||
source_root = 'temp'
|
||||
)
|
||||
fn funky()
|
||||
funky - comment for function below
|
||||
6
cmd/tools/vdoc/tests/testdata/basic/main.out
vendored
Normal file
6
cmd/tools/vdoc/tests/testdata/basic/main.out
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
module main
|
||||
|
||||
const (
|
||||
source_root = 'temp'
|
||||
)
|
||||
fn funky()
|
||||
@@ -1,8 +1,8 @@
|
||||
const (
|
||||
pub const (
|
||||
source_root = 'temp'
|
||||
)
|
||||
|
||||
// funky - comment for function below
|
||||
fn funky() {
|
||||
pub fn funky() {
|
||||
println('hi')
|
||||
}
|
||||
9
cmd/tools/vdoc/tests/testdata/multiline/main.comments.out
vendored
Normal file
9
cmd/tools/vdoc/tests/testdata/multiline/main.comments.out
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
module main
|
||||
|
||||
fn a1()
|
||||
normal comment
|
||||
fn a2()
|
||||
this should be merged into the same line
|
||||
fn a3()
|
||||
This should be its own parapgraph, because it ends with a dot.
|
||||
This should be another paragraph.
|
||||
5
cmd/tools/vdoc/tests/testdata/multiline/main.out
vendored
Normal file
5
cmd/tools/vdoc/tests/testdata/multiline/main.out
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module main
|
||||
|
||||
fn a1()
|
||||
fn a2()
|
||||
fn a3()
|
||||
16
cmd/tools/vdoc/tests/testdata/multiline/main.v
vendored
Normal file
16
cmd/tools/vdoc/tests/testdata/multiline/main.v
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// normal comment
|
||||
pub fn a1() {
|
||||
println('hi')
|
||||
}
|
||||
|
||||
// this should be merged
|
||||
// into the same line
|
||||
pub fn a2() {
|
||||
println('hi')
|
||||
}
|
||||
|
||||
// This should be its own parapgraph, because it ends with a dot.
|
||||
// This should be another paragraph.
|
||||
pub fn a3() {
|
||||
println('hi')
|
||||
}
|
||||
22
cmd/tools/vdoc/tests/testdata/newlines/main.comments.out
vendored
Normal file
22
cmd/tools/vdoc/tests/testdata/newlines/main.comments.out
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
module main
|
||||
|
||||
fn funky()
|
||||
hello
|
||||
|
||||
empty line
|
||||
newline using a full stop.
|
||||
```v
|
||||
code
|
||||
```
|
||||
|
||||
test
|
||||
====
|
||||
- foo
|
||||
- bar
|
||||
# test
|
||||
########### deep test
|
||||
#a shouldnt have a newline test
|
||||
|
||||
| foo bar | yes |
|
||||
|-----------|--------|
|
||||
| working | yup |
|
||||
3
cmd/tools/vdoc/tests/testdata/newlines/main.out
vendored
Normal file
3
cmd/tools/vdoc/tests/testdata/newlines/main.out
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module main
|
||||
|
||||
fn funky()
|
||||
23
cmd/tools/vdoc/tests/testdata/newlines/main.v
vendored
Normal file
23
cmd/tools/vdoc/tests/testdata/newlines/main.v
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// hello
|
||||
//
|
||||
// empty line
|
||||
// newline using a full stop.
|
||||
// ```v
|
||||
// code
|
||||
// ```
|
||||
//
|
||||
// test
|
||||
// ====
|
||||
// - foo
|
||||
// - bar
|
||||
// # test
|
||||
// ########### deep test
|
||||
// #a shouldnt have a newline
|
||||
// test
|
||||
//
|
||||
// | foo bar | yes |
|
||||
// |-----------|--------|
|
||||
// | working | yup |
|
||||
pub fn funky() {
|
||||
println('hi')
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
vdoc: No documentation found for /v/vmaster/cmd/tools/vdoc/tests/testdata/project1/main.v
|
||||
Reference in New Issue
Block a user