# Get ruby-bbcode-to-md to ignore \[quote\]

**URL:** https://meta.discourse.org/t/get-ruby-bbcode-to-md-to-ignore-quote/75106
**Category:** Development
**Created:** [November 30, 2017, 6:41pm UTC](https://meta.discourse.org/t/get-ruby-bbcode-to-md-to-ignore-quote/75106 "2017-11-30T18:41:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 30, 2017, 6:41pm UTC](https://meta.discourse.org/t/get-ruby-bbcode-to-md-to-ignore-quote/75106/1 "2017-11-30T18:41:16Z")

</div>

I’m doing some work on the xenforo importer and have modified it so that it converts the BBcode `[quote]` tags into Discourse `[quote="username,post:<post_number>, topic:<topic_id>]` tags, but ruby-bbcode-to-md breaks it since it doesn’t know how awesome those `[quote]`s are.

My solution has mostly been to just not use @neil’s ruby-bbcode-to-md ([GitHub - nlalonde/ruby-bbcode-to-md: Convert BBCode to Markdown. · GitHub](https://github.com/nlalonde/ruby-bbcode-to-md)) and just piecemeal replace tags in the importer. This seems sucky (but I think it’s good enough)

Should I fork the library and try to get it to ignore those quotes? Should there be a way to get the library to know to ignore those? (Seems like a regex nightmare to me).

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [November 30, 2017, 6:42pm UTC](https://meta.discourse.org/t/get-ruby-bbcode-to-md-to-ignore-quote/75106/2 "2017-11-30T18:42:40Z")

</div>

I haven’t looked at that library in a very long time… Fork and hack away.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 11, 2018, 2:44pm UTC](https://meta.discourse.org/t/get-ruby-bbcode-to-md-to-ignore-quote/75106/3 "2018-12-11T14:44:02Z")

</div>

I ran into same issue when doing a vBulletin bulk import.

> [@pfaffman](#):
>
> Should there be a way to get the library to know to ignore those?

Looking into [source code](https://github.com/nlalonde/ruby-bbcode-to-md/blob/master/lib/ruby-bbcode-to-md.rb#L64-L65) there is a way to blacklist selected tags. Here is what you are looking for if you want to blacklist/ignore `[quote]` tags:

```plaintext
xyz.bbcode_to_md(false, {}, :disable, :quote)

```

I applied the above fix to import script base libraries as per:

[https://github.com/discourse/discourse/commit/71a5369fef33f2d8d3b1d5420a5a6e775c439b0d](https://github.com/discourse/discourse/commit/71a5369fef33f2d8d3b1d5420a5a6e775c439b0d)
