Set #id for table in Pandoc Markdown

I use Pandoc markdown for source content. To do this, I write the “markup: pandoc” parameter in YAML in the header of Markdown page.

This markdown interpreter allows the use of multiline tables.
For example, like this

   Col1                                  col2
   ------------------------------ --------------------------------------------------
   ** text **                          some text \
                                           more text 

   ** tex2t **                         some text2 \ 
                                           more text2
Table: Table name {#tbl: mytable1}

The {#tbl: mytable1} I need to use this Markdown file, also to create a document in docx using Pandoc. It is automatically edited using a post-processing program.

The problem is that Hugo does not process the parameter {#tbl: mytable1} and displays it in the table header text

I need to either process this text and assign a title to the table, or hide it so that Hugo does not display the {#tbl: mytable1} in the html of the page.
I will be glad of any help.

I added {{ .Content | replaceRE "{#tbl:.*}" "$1" | safeHTML }} in the single.html layout. But i think what there is the better way.