milesj / decoda

A lightweight lexical string parser for BBCode styled markup.
MIT License
196 stars 52 forks source link

bbcode problem #95

Closed Nelrann closed 9 years ago

Nelrann commented 9 years ago

This code

[b]qsdqsdqsdqsdqsdqsdqsdqsdsqd

[/b]qsdqsdqsdqsdqsd

should display

qsdqsdqsdqsdqsdqsdqsdqsdsqd

qsdqsdqsdqsdqsd

it appears that

qsdqsdqsdqsdqsdqsdqsdqsdsqdqsdqsdqsdqsdqsd

there is same problem with other bbcode

milesj commented 9 years ago

I'm pretty sure I trim() the contents between tags. This is required for certain filters to work and I doubt I will change it.

alquerci commented 9 years ago

This issue is related to #63 but in that case for newlines. These issues blame the commit 01c690c9d94824cae5ebdaf32c9c63a459e9dac8 that fixed issue #50.

So I am of the same opinion as @connor4312 on https://github.com/milesj/decoda/pull/63#issuecomment-35121425

I think removing the trim would indeed be a better solution

A fix for #50 should be alquerci/decoda@eb8571ab2b9c2bddc67ac727764a924de3193ff2.

milesj commented 9 years ago

I'll have to look into the code again. Been a really long time since I've used it.

milesj commented 9 years ago

Removed the trim all together.