Skip to content

Fix RDoc for Element #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/rexml/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ def previous_element
# :call-seq:
# has_text? -> true or false
#
# Returns +true if the element has one or more text noded,
# Returns +true+ if the element has one or more text noded,
# +false+ otherwise:
#
# d = REXML::Document.new '<a><b/>text<c/></a>'
Expand All @@ -1006,15 +1006,15 @@ def has_text?
# text(xpath = nil) -> text_string or nil
#
# Returns the text string from the first text node child
# in a specified element, if it exists, # +nil+ otherwise.
# in a specified element, if it exists, +nil+ otherwise.
#
# With no argument, returns the text from the first text node in +self+:
#
# d = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# d.root.text.class # => String
# d.root.text # => "some text "
#
# With argument +xpath+, returns text from the the first text node
# With argument +xpath+, returns text from the first text node
# in the element that matches +xpath+:
#
# d.root.text(1) # => "this is bold!"
Expand Down