Problem with context raw?
@kou 已經在處理了。
開始於 2021年2月2日。
評估
這個 Issue 還沒有評估資料。
描述
Running ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [i386-mingw32]
xml_string = '<root><foo>&</foo><bar><</bar><baz>></baz><bat>"</bat></root>'
d = Document.new(xml_string, {raw: ['foo', 'baz']})
d.to_s # => "<root><foo>&</foo><bar><</bar><baz>></baz><bat>"</bat></root>"
root = d.root # => <root> ... </>
foo, bar, baz, bat = *d.root
# Each is an Element object:
[foo, bar, baz, bat].map {|e| e.class }.uniq # => [REXML::Element]
# Each element is marked as raw/not-raw as appropriate:
[foo, bar, baz, bat].map {|e| e.raw } # => [true, false, true, false]
# The first child of each is a Text object:
[foo, bar, baz, bat].map {|e| e.first.class }.uniq # => [REXML::Text]
# Each text is marked as raw/not-raw as appropriate:
[foo, bar, baz, bat].map {|e| e.first.raw } # => [true, true, true, true]
Is this correct? I expected that last result to be [true, false, true, false].
- 主要語言
- Ruby
- 星號
- 181
- 分支
- 105
- 平均合併
- 11 小時 3 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/rexml 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 55/100
-
XPath underscored function name is wrongly accepted可能已有人在做 @sjh9714 於 47 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 55/100
-
難度 3/5 1-2 天 新手友好度 55/100
-
難度 4/5 3-5 天 新手友好度 48/100
-
難度 5/5 一週以上 新手友好度 35/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 7 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 7 天內回覆
-
bugsnag
難度 2/5 1-3 小時 新手友好度 62/100
JoeMcB/improvcoaches#827 ·
-
難度 1/5 1 小時以內 新手友好度 72/100
TheOdinProject/curriculum#31465 ·
維護者通常 1 天內回覆
-
area: docs eco: ruby good first issue help wanted lane: free-agent roadmap size: XS type: docs
難度 1/5 1 小時以內 新手友好度 66/100
arminazimi/evergreen#465 ·
維護者通常 1 天內回覆