summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-05-07 02:14:44 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-05-07 02:15:05 -0600
commit0e4a124de5434109b053300a73c67168ffdfb159 (patch)
tree3685c964eea4ed02513f8062497be1804ed85780
parent8290aa15738e44f4e0a7d4c53b98b89833f21436 (diff)
remove unused assignment when parsing section title
-rw-r--r--lib/asciidoctor/parser.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb
index 5ee1e89a..b247a80e 100644
--- a/lib/asciidoctor/parser.rb
+++ b/lib/asciidoctor/parser.rb
@@ -1577,12 +1577,6 @@ class Parser
sect_style = attributes[1]
sect_id, sect_reftext, sect_title, sect_level, sect_atx = parse_section_title reader, document, attributes['id']
- if sect_reftext
- attributes['reftext'] = sect_reftext
- else
- sect_reftext = attributes['reftext']
- end
-
if sect_style
if book && sect_style == 'abstract'
sect_name, sect_level = 'chapter', 1
@@ -1601,6 +1595,7 @@ class Parser
sect_name = 'section'
end
+ attributes['reftext'] = sect_reftext if sect_reftext
section = Section.new parent, sect_level
section.id, section.title, section.sectname, section.source_location = sect_id, sect_title, sect_name, source_location
if sect_special