From 4c2cb1b6df7c7c47c794f4f0f0cac570138c315e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 14 Oct 2021 11:47:50 +0300 Subject: [PATCH] vdoc: prevent leaking to the docs the `pure_v_but_overriden_by_` prefix --- vlib/v/parser/fn.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index 0ca3c11256..79dbee2bc8 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -421,7 +421,9 @@ fn (mut p Parser) fn_decl() ast.FnDecl { if existing.name != '' { if file_mode == .v && existing.file_mode != .v { // a definition made in a .c.v file, should have a priority over a .v file definition of the same function - name = p.prepend_mod('pure_v_but_overriden_by_${existing.file_mode}_$short_fn_name') + if !p.pref.is_fmt { + name = p.prepend_mod('pure_v_but_overriden_by_${existing.file_mode}_$short_fn_name') + } } else { p.table.redefined_fns << name }