diff --git a/bridgetown-core/lib/bridgetown-core/rack/routes.rb b/bridgetown-core/lib/bridgetown-core/rack/routes.rb index 4f53346c5..770b603b9 100644 --- a/bridgetown-core/lib/bridgetown-core/rack/routes.rb +++ b/bridgetown-core/lib/bridgetown-core/rack/routes.rb @@ -28,7 +28,7 @@ def print_routes end puts puts "Routes:" - puts "=======" + puts "=======\n" if routes.blank? puts "No routes found. Have you commented all of your routes?" puts "Documentation: https://github.com/jeremyevans/roda-route_list#basic-usage-" diff --git a/bridgetown-routes/lib/bridgetown-routes/code_blocks.rb b/bridgetown-routes/lib/bridgetown-routes/code_blocks.rb index 536f3eb57..e3c3f1fe3 100644 --- a/bridgetown-routes/lib/bridgetown-routes/code_blocks.rb +++ b/bridgetown-routes/lib/bridgetown-routes/code_blocks.rb @@ -39,7 +39,7 @@ def eval_route_file(file, file_slug, app) # rubocop:disable Lint/UnusedMethodArg code = ruby_content[1] code_postmatch = ruby_content.post_match.lstrip front_matter_line_count = code.lines.count - 1 - if code.match?(%r!^\s*render_with\s|\(!).! && code.match?(%r!r\.[a-z]+\s+do!).! + if code.match?(%r!^\s*render_with(\s|\()!).! && code.match?(%r!r\.[a-z]+\s+do!).! code.concat("\nrender_with {}") end end diff --git a/bridgetown-routes/test/ssr/src/_routes/nested/[slug].erb b/bridgetown-routes/test/ssr/src/_routes/nested/[slug].erb index 2dcc60ea0..bf4a047d7 100644 --- a/bridgetown-routes/test/ssr/src/_routes/nested/[slug].erb +++ b/bridgetown-routes/test/ssr/src/_routes/nested/[slug].erb @@ -1,5 +1,6 @@ ---<% slug_param = params[:slug] +() # test for previous regexp bug title = "Nested Page with Slug" %>---