1
0
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:
Leo Developer
2021-08-19 09:20:43 +02:00
committed by GitHub
parent 337c325109
commit 7bffabbce2
15 changed files with 208 additions and 53 deletions

View File

@@ -0,0 +1,7 @@
module main
const (
source_root = 'temp'
)
fn funky()
funky - comment for function below

View File

@@ -0,0 +1,6 @@
module main
const (
source_root = 'temp'
)
fn funky()

View File

@@ -1,8 +1,8 @@
const (
pub const (
source_root = 'temp'
)
// funky - comment for function below
fn funky() {
pub fn funky() {
println('hi')
}

View 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.

View File

@@ -0,0 +1,5 @@
module main
fn a1()
fn a2()
fn a3()

View 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')
}

View 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 |

View File

@@ -0,0 +1,3 @@
module main
fn funky()

View 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')
}

View File

@@ -1 +0,0 @@
vdoc: No documentation found for /v/vmaster/cmd/tools/vdoc/tests/testdata/project1/main.v