profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mdesson/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

mdesson/cirrus-python 7

Delivering you the weather via text from the Internet to your phone.

mdesson/coursia 1

Project for learning web: Plan your Concordia University Courses your way!

mdesson/knowtify 1

Run an executable, get notified. Plays nice with cron.

mdesson/CatFactsForever 0

For your friends who need to know cat facts - whether they know it or want it or not

mdesson/cirrus 0

Hyper-Local Weather for Nerds

mdesson/covid-alert-server 0

Exposure Notification: Diagnosis Server implementation / Notification d’exposition : Mise en œuvre du serveur de diagnostic

mdesson/covid-at-a-glance 0

A simple covid tracker

mdesson/discorgi 0

Discord bot. Fetches things for friends. Is good boy.

push eventmdesson/CatFactsForever

mdesson

commit sha b8d3719f381a7ad9e807bf62b43f736768909f12

Update README.md

view details

push time in 13 days

issue commentToothlessGear/node-gcm

Update changelog

Are there any known breaking changes within v1.x.x? I know this project uses semver, but I usually read through the changelog of a given package to validate before going through an upgrade. An updated changelog would be a great help

hypesystem

comment created time in a month

issue commenthtml-to-text/node-html-to-text

preserveNewlines adds extraneous newlines when outside of some html elements

That makes a lot of sense, thanks for the explanation. No worries on the timeline, I can try to work around it in the meantime with a temporary solution.

mdesson

comment created time in 2 months

issue commenthtml-to-text/node-html-to-text

preserveNewlines adds extraneous newlines when outside of some html elements

I apologize for the confusion and spammed issues, not sure what happened on the duplicate issues.

For the edits, I wasn't totally sure what the expected output should be upon further reflection.

Basically I used this simple script to test:

import  { fromString } from 'html-to-text'

const newlineOutside = '<p>top</p>\n<p>bottom</p>'
const newlineInside = '<p>top</p><p>\nbottom</p>'

const outputOutside = fromString(newlineOutside, {
		preserveNewlines: true,
});

const outputInside = fromString(newlineInside, {
		preserveNewlines: true,
});

console.log(outputOutside)
console.log('---')
console.log(outputInside)

On version 6.0.0^ it gives the output:

top




bottom
---
top


bottom

On version 5.1.1 it gives:

top

bottom
---
top

bottom

The edits were because while there seems to be an issue in 6.0.0^ I wasn't entirely sure what the desired behaviour should be. I personally prefer the 5.1.1 output, but in html there is typically a newline between paragraph tags, so the extra line actually makes sense.

In either case, the extra newlines when the \n is outside of the p tag is an unexpected behaviour. I'm just unsure if two newlines (like in 6.0.0) or one newline (like in 5.1.1) is the correct output.

I've edited the issue one last time, sorry again for the spammy edits and double issues. You can close out the other one.

mdesson

comment created time in 2 months

issue openedhtml-to-text/node-html-to-text

preserveNewlines adds extraneous newlines when outside of some html elements

Minimal HTML example

<p>top</p>\n<p>bottom</p>

Options

{ preserveNewlines: true }

Observed output

top




bottom

Expected output

top


bottom

Version information

  • html-to-text: 8.0.0 (bug introduced in 6.0.0)
  • node: v12.13.1

With preserveNewlines set to true, if \n is not placed inside a <p> tag, three extra newlines will be added. However if it's placed inside a <p> tag, it will have the desired output.

Note that I haven't tested this with other html tags.

created time in 2 months

issue openedhtml-to-text/node-html-to-text

preserveNewlines adds extraneous newlines when outside of some html elements

Minimal HTML example

<p>top</p>\n<p>bottom</p>

Options

{ preserveNewlines: true }

Observed output

top




bottom

Expected output

top


bottom

Version information

  • html-to-text: 8.0.0 (bug introduced in 6.0.0)
  • node: v12.13.1

With preserveNewlines set to true, if \n is not placed inside a <p> tag, three extra newlines will be added. However if it's placed inside a <p> tag, it will have the desired output.

Note that I haven't tested this with other html tags.

created time in 2 months

startedowncloud/ocis

started time in 2 months

startedimthenachoman/How-To-Secure-A-Linux-Server

started time in 3 months

push eventmdesson/cirrus

Michael Desson

commit sha b9b3ea837d2f0a0ebb1f941d7e431239da1d8d89

Added Makefile, postgres

view details

push time in 3 months