@@ -69,7 +69,8 @@ impl MetaSyntax {
6969 comment_start_pattern, comment_end_pattern
7070 ) )
7171 . unwrap ( ) ;
72- let stub_begin = Regex :: new ( & format ! ( r"{}STUB:\s*" , comment_start_pattern) ) . unwrap ( ) ;
72+ let stub_begin =
73+ Regex :: new ( & format ! ( r"{}STUB:[\s&&[^\n]]*" , comment_start_pattern) ) . unwrap ( ) ;
7374 let stub_end = Regex :: new ( & comment_end_pattern) . unwrap ( ) ;
7475
7576 Self {
@@ -337,16 +338,16 @@ print("a")
337338 MetaString :: stub( "class Kauppalista:\n " ) ,
338339 MetaString :: stub( " def __init__(self):\n " ) ,
339340 MetaString :: stub( " self.tuotteet = []\n " ) ,
340- MetaString :: stub( "\n " ) ,
341+ MetaString :: stub( " \n " ) ,
341342 MetaString :: stub( " def tuotteita(self):\n " ) ,
342343 MetaString :: stub( " return len(self.tuotteet)\n " ) ,
343- MetaString :: stub( "\n " ) ,
344+ MetaString :: stub( " \n " ) ,
344345 MetaString :: stub( " def lisaa(self, tuote: str, maara: int):\n " ) ,
345346 MetaString :: stub( " self.tuotteet.append((tuote, maara))\n " ) ,
346- MetaString :: stub( "\n " ) ,
347+ MetaString :: stub( " \n " ) ,
347348 MetaString :: stub( " def tuote(self, n: int):\n " ) ,
348349 MetaString :: stub( " return self.tuotteet[n - 1][0]\n " ) ,
349- MetaString :: stub( "\n " ) ,
350+ MetaString :: stub( " \n " ) ,
350351 MetaString :: stub( " def maara(self, n:int):\n " ) ,
351352 MetaString :: stub( " return self.uotteet[n - 1][1]\n " ) ,
352353 ] ;
0 commit comments