File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,10 @@ def _escaped str
105
105
106
106
def simple_link name , options = { }
107
107
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
110
112
if block_given?
111
113
a ( { :href => href } . merge ( options ) ) do
112
114
yield
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ def step_obj_for(path)
201
201
202
202
page = Nokogiri . parse ( "<html>#{ step_obj_for ( outer_path ) . to_html } </html>" )
203
203
204
- assert { page . css ( 'a' ) . first [ :href ] == "somewhere_else?back=outer%23step " }
204
+ assert { page . css ( 'a' ) . first [ :href ] == "somewhere_else?back=outer" }
205
205
end
206
206
end
207
207
end
You can’t perform that action at this time.
0 commit comments