File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,10 @@ def _escaped str
105105
106106 def simple_link name , options = { }
107107 require 'uri'
108- hash = URI . escape '#'
109- href = "#{ _escaped ( name ) } ?back=#{ _escaped ( page_name ) } #{ hash } step#{ current_anchor_num } "
108+ href = "#{ _escaped ( name ) } ?back=#{ _escaped ( page_name ) } "
109+ if @step_stack . length > 1
110+ href += URI . escape ( '#' ) + "step#{ current_anchor_num } "
111+ end
110112 if block_given?
111113 a ( { :href => href } . merge ( options ) ) do
112114 yield
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ def step_obj_for(path)
201201
202202 page = Nokogiri . parse ( "<html>#{ step_obj_for ( outer_path ) . to_html } </html>" )
203203
204- assert { page . css ( 'a' ) . first [ :href ] == "somewhere_else?back=outer%23step " }
204+ assert { page . css ( 'a' ) . first [ :href ] == "somewhere_else?back=outer" }
205205 end
206206 end
207207end
You can’t perform that action at this time.
0 commit comments