An open API service indexing awesome lists of open source software.

https://github.com/theopencms/the_string_addon

Some helper methods for String class
https://github.com/theopencms/the_string_addon

Last synced: over 1 year ago
JSON representation

Some helper methods for String class

Awesome Lists containing this project

README

          

### TheStringAddon

```
txt = txt.to_s

# Sanitize and empty lines process
txt = sanitize_for(txt, current_user)
txt = txt.empty_p2br

# MarkDown + Code Hightlight
txt = ::Markdown2Tags.process(txt)
txt = ::ColoredCode.with_pygments(txt)

# AutoLink
al_helper = ::AutoLink.new
txt = al_helper.auto_link(txt, sanitize: false, html: { target: :_blank, rel: :nofollow })

# Protect content of external links
txt = txt.add_nofollow_to_links if !current_user.admin?
txt = txt.wrap_nofollow_links_with_noindex

txt.strip
```

```

## Hello World
### Hello World
#### Hello World

*ITALIC*

**BOLD**

~~DELETED~~

_UNDERLINE_

==highlighted==

2(nd)

[Текст ссылки](адрес://ссылки.здесь "Заголовок ссылки")

foo_bar_baz

```python
# more python code
```

```