Fix default namespace in PrettyPrinter.formatNodes#50
Conversation
|
When I investigated #28 I noticed other instances of null default arguments for scope in |
|
I saw that, too. I'll let @adriaanm determine if he wants a separate PR for that last null. Perhaps cleaning up the neighborhood is appreciated in this case. |
|
Happy to let you decide on this! This does seem like a nice occasion to apply the boy scout rule :-) |
|
I'll have a look this evening (UK time). If it is indeed as simple as it looks then I'll add that to this PR, if not let's do it separately. Thanks guys. |
|
Second commit added which also fixes (and tests) the behaviour when passing in a |
|
Excellent! Btw, our commit guidelines would recommend a title like "Default to TopScope, not null for name space binding." (The commit stats already tell you which file was updated, and "fix" is too generic.) |
|
Thanks @adriaanm, have tweaked the commit messages accordingly; I hope they read better now. Assuming the build passes, do you reckon everything looks in order? |
|
Looks great to me -- thanks again! |
|
Hey @adriaanm - just wanted to check if you were waiting on any further action from me before merging this in? I couldn't find a specific contribution policy for this repo, but previous PRs looked to have been merged in with little formal process... Is there anything else you're expecting me to do? |
|
Sorry about the delay! |
Fix default namespace in PrettyPrinter.formatNodes
This replicates the fix from #28 and applies it to the
formatNodesmethod ofPrettyPrinteras well. Existing behaviour is the same bug that @ashawley highlighted before - namely the addition of an erroneous emptyxmlns=""at the top level of each node.