Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Latest commit

 

History

History
47 lines (34 loc) · 1 KB

README.md

File metadata and controls

47 lines (34 loc) · 1 KB

Important

DText was moved to the Danbooru repository in commit d965f959b. See lib/dtext_rb in the Danbooru repo.


DText

A Ruby library for parsing DText, Danbooru's text formatting language.

Installation

sudo apt-get install ruby ruby-dev g++ libc-dev make patch xz-utils ragel
gem install bundler
bundle install
bin/rake

Usage

ruby -Ilib -rdtext -e 'puts DText.parse("hello world")'
# => <p>hello world</p>

Development

bin/rake clean
bin/rake compile
bin/rake test
bin/rake bench

To build in debug mode:

bin/rake clean
DTEXT_DEBUG=true bin/rake compile

To build with Clang:

MAKE="make --environment-overrides" CXX="/usr/bin/clang++" bin/rake