Skip to content
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

ensure all DocumentFragment parse methods take ParseOptions and an options-configuration block #1844

Closed
flavorjones opened this issue Dec 16, 2018 · 3 comments · Fixed by #2399
Assignees
Milestone

Comments

@flavorjones
Copy link
Member

flavorjones commented Dec 16, 2018

See #1692 for the beginning of this work on HTML::DocumentFragment

See #1843 for a rebase of this work onto a modern master

See branch 1844-fragment-parse-options-overhaul for the start of adding tests to HTML::DocumentFragment which are more thorough than the current test approach

Things I'd like to do as a result of this issue:

  1. [net new behavior] have all XML::Document and HTML::Document underlying parse methods (e.g., #read_io, #read_memory) save the ParseOptions as a Document attribute, to make testing a bit easier
  2. [partially implemented by Add an options parameter to all the methods that allow creation of an HTML document fragment #1692 ] have all XML::DocumentFragment and HTML::DocumentFragment parse methods take options and an options-configuration block
  3. [fixes] ensure the JRuby impl matches the CRuby behaviors
@GreSuh
Copy link

GreSuh commented May 7, 2019

Does this only apply for parsing http fragments or did I miss he change for Nokogiri::XML::DocumentFragment.parse ?

@flavorjones
Copy link
Member Author

@GreSuh thanks for asking this question. From the description above:

  1. have all XML::DocumentFragment and HTML::DocumentFragment parse methods take options and an options-configuration block

Hope this response helps.

@flavorjones flavorjones modified the milestones: v1.12.0, v1.13.0 Aug 2, 2021
flavorjones added a commit that referenced this issue Dec 24, 2021
Similar to Document constructors, we can now pass in parse options as
a parameter or via a config block.

Fixes #1692
Fixes #1844

Co-authored-by: Jack McCracken <jack.mccracken@shopify.com>
@flavorjones
Copy link
Member Author

See #2399 for an updated version of this branch.

flavorjones added a commit that referenced this issue Dec 24, 2021
Similar to Document constructors, we can now pass in parse options as
a parameter or via a config block.

Fixes #1692
Fixes #1844

Co-authored-by: Jack McCracken <jack.mccracken@shopify.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants