[!IMPORTANT] DText was moved to the Danbooru repository in commit d965f959b. See lib/dtext_rb in the Danbooru repo.
A Ruby library for parsing DText, Danbooru's text formatting language.
sudo apt-get install ruby ruby-dev g++ libc-dev make patch xz-utils ragel
gem install bundler
bundle install
bin/rake
ruby -Ilib -rdtext -e 'puts DText.parse("hello world")'
# => <p>hello world</p>
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