jarrett / rbbcode

Converts BBCode to HTML. Gracefully handles invalid input. Built on Treetop.
41 stars 9 forks source link

support for phpBB's bbcode uuid #29

Open Dahie opened 4 years ago

Dahie commented 4 years ago

Hi Jarrett,

For context, I'm writing an export tool for a phpBB forum to static markdown files. For that I'm slowly trying to catch most bbcode syntax cases that I find on the way. Some I deal in my exporter, some have there place here in the gem.

I found one thing today, I'm not entirely sure where to place.

in usual bbcode an image is described as [img]url[/url]. phpBB3 introduced the bbcode uuid that belongs to a post and helps to group images per post. It is stored in code as [img:fpbxmhnv]url[\img:fpbxmhnv]. More Background This is not part of any bbcode specification or documentation and thus I wonder if the gem should support it, of if my exporter should deal with it by cleaning it before passing it to rbbcode gem.

What do you think?

jarrett commented 4 years ago

I think we can support it easily enough. What should RbbCode emit when it hits the UID? Just ignore it?

On Thu, Jun 25, 2020 at 6:23 AM Daniel Senff notifications@github.com wrote:

Hi Jarrett,

For context, I'm writing an export tool for a phpBB forum to static markdown files. For that I'm slowly trying to catch most bbcode syntax cases that I find on the way. Some I deal in my exporter, some have there place here in the gem.

I found one thing today, I'm not entirely sure where to place.

in usual bbcode an image is described as [img]url[/url]. phpBB3 introduced the bbcode uuid that belongs to a post and helps to group images per post. It is stored in code as [img:fpbxmhnv]url[\img:fpbxmhnv]. This is not part of any bbcode specification or documentation and thus I wonder if the gem should support it, of if my exporter should deal with it by cleaning it before passing it to rbbcode gem.

What do you think?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jarrett/rbbcode/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAD6UDB4IA4XM55ROZJOF3RYMQTJANCNFSM4OIHFK3A .

-- -- This message, including attachments, is confidential and may contain privileged information. If you receive this message in error, please destroy it and notify me immediately.

Dahie commented 4 years ago

Yes, ignoring is fine, it's a phpBB internal value.

Am 2020-06-25 14:30, schrieb jarrett:

I think we can support it easily enough. What should RbbCode emit when it hits the UID? Just ignore it?

On Thu, Jun 25, 2020 at 6:23 AM Daniel Senff notifications@github.com wrote:

Hi Jarrett,

For context, I'm writing an export tool for a phpBB forum to static markdown files. For that I'm slowly trying to catch most bbcode syntax cases that I find on the way. Some I deal in my exporter, some have there place here in the gem.

I found one thing today, I'm not entirely sure where to place.

in usual bbcode an image is described as [img]url[/url]. phpBB3 introduced the bbcode uuid that belongs to a post and helps to group images per post. It is stored in code as [img:fpbxmhnv]url[\img:fpbxmhnv]. This is not part of any bbcode specification or documentation and thus I wonder if the gem should support it, of if my exporter should deal with it by cleaning it before passing it to rbbcode gem.

What do you think?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jarrett/rbbcode/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAD6UDB4IA4XM55ROZJOF3RYMQTJANCNFSM4OIHFK3A .

-- -- This message, including attachments, is confidential and may contain privileged information. If you receive this message in error, please destroy it and notify me immediately.

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Dahie commented 4 years ago

Oh, I just found that the URL and quote-tag can have the same. Example:

[url:3u958i1j]url[/url:3u958i1j]
[url=url:1unxtn0f]Text[/url:1unxtn0f]
[quote:jpz8sqzf]Text[\quote:jpz8sqzf]
[quote="Author":jpz8sqzf]Text[\quote:jpz8sqzf]