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

xml update #397

Merged
merged 2 commits into from
Jan 10, 2022
Merged

xml update #397

merged 2 commits into from
Jan 10, 2022

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Dec 21, 2021

No description provided.

@Tieske Tieske marked this pull request as draft December 21, 2021 16:48
@alerque
Copy link
Member

alerque commented Dec 30, 2021

I kind of thought we were deprecating rather than fixing the XML module. See #311. Did your stance on that change?

@Tieske
Copy link
Member Author

Tieske commented Dec 31, 2021

no, I didn't change my mind on that. But was trying to get my head around the work involved into support more complex xml work like canonicalization and namespace support. So this was an exercise to learn, just pushed it to a branch since I also ran into a fix for the other retorted issue.

But currently still my opinion is that it should be removed from Penlight, though some of the work here could be reused in another project for that purpose.

@alerque
Copy link
Member

alerque commented Jan 1, 2022

Okay that makes sense. And for the record I wouldn't even be opposed to merging this –better tests, bug fixes, and even new features– as long as you happen to have done the work anyway provided the whole module is clearly documented as deprecated and about to be removed. Anybody using the improvements should be aware they may immanently need to switch to another library. But having the history here to then extract as a good launching point for another library project does make sense to me.

refactoring some code, and a lot of doc updates
@Tieske Tieske marked this pull request as ready for review January 10, 2022 11:25
@Tieske Tieske merged commit b749d88 into master Jan 10, 2022
@Tieske Tieske deleted the xml branch January 10, 2022 11:25
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 13, 2022
## 1.12.0 (2022-Jan-10)
 - deprecate: module `pl.text` the contents have moved to `pl.stringx` (removal later)
   [#407](lunarmodules/Penlight#407)
 - deprecate: module `pl.xml`, please switch to a more specialized library (removal later)
   [#409](lunarmodules/Penlight#409)
 - feat: `utils.npairs` added. An iterator with a range that honours the `n` field
   [#387](lunarmodules/Penlight#387)
 - fix: `xml.maptags` would hang if it encountered text-nodes
   [#396](lunarmodules/Penlight#396)
 - fix: `text.dedent` didn't handle declining indents nor empty lines
   [#402](lunarmodules/Penlight#402)
 - fix: `dir.getfiles`, `dir.getdirectories`, and `dir.getallfiles` now have the
   directory optional, as was already documented
   [#405](lunarmodules/Penlight#405)
 - feat: `array2d.default_range` now also takes a spreadsheet range, which means
   also other functions now take a range. [#404](lunarmodules/Penlight#404)
 - fix: `lapp` enums allow [patterns magic characters](https://www.lua.org/pil/20.2.html)
   [#393](lunarmodules/Penlight#393)
 - fix: `text.wrap` and `text.fill` numerous fixes for handling whitespace,
   accented characters, honouring width, etc.
   [#400](lunarmodules/Penlight#400)
 - feat: `text.wrap` and `text.fill` have a new parameter to forcefully break words
   longer than the width given.
   [#400](lunarmodules/Penlight#400)
 - fix: `stringx.expandtabs` could error out on Lua 5.3+
   [#406](lunarmodules/Penlight#406)
 - fix: `pl` the module would not properly forward the `newindex` metamethod
   on the global table.
   [#395](lunarmodules/Penlight#395)
 - feat: `utils.enum` added to create enums and prevent magic strings
   [#408](lunarmodules/Penlight#408)
 - change: `xml.new` added some sanity checks on input
   [#397](lunarmodules/Penlight#397)
 - added: `xml.xml_escape` and `xml.xml_unescape` functions (previously private)
   [#397](lunarmodules/Penlight#397)
 - feat: `xml.tostring` now also takes numeric indents (previously only strings)
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.walk` now detects recursion (errors out)
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.clone` now detects recursion (errors out)
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.compare` now detects recursion (errors out)
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.compare` text compares now work
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.compare` attribute order compares now only compare if both inputs provide an order
   [#397](lunarmodules/Penlight#397)
 - fix: `xml.compare` child comparisons failing now report proper error
   [#397](lunarmodules/Penlight#397)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants