More dewikify fixes #188

Merged
matthijskooijman merged 8 commits from more-wikify-fixes into master 2019-01-17 19:47:12 +00:00
matthijskooijman commented 2019-01-14 21:38:01 +00:00 (Migrated from github.com)

This fixes a bunch more problems with (de)wikifying. Turned out that while wikifying was recently fixed, the period of it being broken had caused some bitrot with the dewikifying, which was no longer working or properly being done in a bunch of places. This should fix all of them, by more thoroughly running dewikify in a few general places.

This fixes a bunch more problems with (de)wikifying. Turned out that while wikifying was recently fixed, the period of it being broken had caused some bitrot with the dewikifying, which was no longer working or properly being done in a bunch of places. This should fix all of them, by more thoroughly running dewikify in a few general places.
matthijskooijman commented 2019-01-14 21:52:34 +00:00 (Migrated from github.com)

I justed added one more commit that makes all urls in outgoing e-mails absolute. Not entirely on-topic, but close enough (and we needed that for Meetjestad just now). That commit hasn't been tested thoroughly yet.

I justed added one more commit that makes all urls in outgoing e-mails absolute. Not entirely on-topic, but close enough (and we needed that for Meetjestad just now). That commit hasn't been tested thoroughly yet.
matthijskooijman commented 2019-01-16 12:07:54 +00:00 (Migrated from github.com)

I've just updated this PR to provide a better fix for text-handling in links by dewikify (backporting a change from upstream php-dom-wrapper, and removing two commits that added workarounds in dewikify) and added wordwrapping for outgoing e-mail (still a bit rough, but better than nothing).

I've just updated this PR to provide a better fix for text-handling in links by dewikify (backporting a change from upstream php-dom-wrapper, and removing two commits that added workarounds in dewikify) and added wordwrapping for outgoing e-mail (still a bit rough, but better than nothing).
laurensmartina (Migrated from github.com) approved these changes 2019-01-17 10:00:24 +00:00
laurensmartina (Migrated from github.com) left a comment

Please see comment about new element

Please see comment about new element
@ -309,0 +312,4 @@
// Dewikify a separate element instead of the entire
// document, since loading html into a document adds
// <html><body>.
$elem = $doc->createElement('root');
laurensmartina (Migrated from github.com) commented 2019-01-17 09:51:36 +00:00

Shouldn't the new element be destroyed here?

Shouldn't the new element be destroyed here?
matthijskooijman (Migrated from github.com) reviewed 2019-01-17 17:52:07 +00:00
@ -309,0 +312,4 @@
// Dewikify a separate element instead of the entire
// document, since loading html into a document adds
// <html><body>.
$elem = $doc->createElement('root');
matthijskooijman (Migrated from github.com) commented 2019-01-17 17:52:07 +00:00

What do you mean by destroyed? PHP does reference counting / garbage collection, so it should clean up things by itself? Everything happens in a new document, which should also be cleaned up?

What do you mean by destroyed? PHP does reference counting / garbage collection, so it should clean up things by itself? Everything happens in a new document, which should also be cleaned up?
laurensmartina (Migrated from github.com) reviewed 2019-01-17 19:40:30 +00:00
@ -309,0 +312,4 @@
// Dewikify a separate element instead of the entire
// document, since loading html into a document adds
// <html><body>.
$elem = $doc->createElement('root');
laurensmartina (Migrated from github.com) commented 2019-01-17 19:40:30 +00:00

I somehow did not notice that $doc is a new instance, created within this method. So $doc gets destroyed directly after exiting the method and with it so does the newly created element.
In sort, ignore my comment here. :-)

I somehow did not notice that `$doc` is a new instance, created within this method. So `$doc` gets destroyed directly after exiting the method and with it so does the newly created element. In sort, ignore my comment here. :-)
matthijskooijman (Migrated from github.com) reviewed 2019-01-17 19:46:16 +00:00
@ -309,0 +312,4 @@
// Dewikify a separate element instead of the entire
// document, since loading html into a document adds
// <html><body>.
$elem = $doc->createElement('root');
matthijskooijman (Migrated from github.com) commented 2019-01-17 19:46:16 +00:00

Ok, ignored ;-)

Also, note that createElement creates a node, but does not add it anywhere in the tree.

Ok, ignored ;-) Also, note that `createElement` *creates* a node, but does not *add* it anywhere in the tree.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha!188
No description provided.