From 804cb91d644ad8451c8fdf0346bf7b99e2c4a487 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 1 Apr 2022 17:25:29 +0100 Subject: [PATCH] add method documentation --- vlib/v/doc/comment.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/v/doc/comment.v b/vlib/v/doc/comment.v index 97e3f8df9e..d88d610a8f 100644 --- a/vlib/v/doc/comment.v +++ b/vlib/v/doc/comment.v @@ -24,10 +24,12 @@ pub fn (dc DocComment) example() string { return dc.text.all_after(doc.example_pattern) } +// is_multi_line_example returns true if an example line has no inline code pub fn (dc DocComment) is_multi_line_example() bool { return dc.text == '\x01 Example:' } +// has_triple_backtick returns true if the comment starts or ends a markdown code block pub fn (dc DocComment) has_triple_backtick() bool { return dc.text.starts_with('\x01 ```') }