jbhannah / agate Goto Github PK
View Code? Open in Web Editor NEWFormat ruby characters (currently only furigana) in text for display
License: MIT License
Format ruby characters (currently only furigana) in text for display
License: MIT License
Test with RSpec and Travis-CI against all available Ruby versions, and use SimpleCov/Coveralls.io for coverage.
Create a class Agate::Formatter::HTML
, have :formatter => :html
be a default option with Agate::Parser
, and load and run the specified formatter automatically in Agate::Parser#parse
.
Formatter to strip ruby text from a passed string.
"Formatter" that echoes the text passed to it, mostly for testing purposes.
Take input via command line (piped through echo
or as an argument) and return formatted text.
Usage:
agate (-h|[-f|--format <format>] [-d|--delimiters <delimiters>] <string>)
Flags:
After all other issues in the v1.0.0 milestone have been resolved:
Write Rdoc documentation for inclusion on rdoc.info.
Possibilities:
Agate::Parser
Agate::Parser
is used internallyAllow user specification of custom delimiters to be used in matching Regexp (see #1) and as ruby parentheses (contents of rp
element). Default to【 】.
invalid character property name {Han}: (\p{Han}+)((?-mix:\())([\p{Hiragana}\p{Katakana}]+)((?-mix:\)))
Unicode block property regex:
\p{Hiragana}
Unicode block property regex:\p{Katakana}
Unicode block property regex:\p{Han}
(via) e.g.
/\p{Han}+【[\p{Hiragana}\p{Katakana}]+】/.match("勉強【べんきょう】します") # 勉強【べんきょう】
Detect the base language of the string being parsed to determine how to detect ruby characters. e.g. which regex to use: single character followed by delimited ruby text (all languages), or multiple characters followed by combined ruby text (e.g. Japanese kanji compounds).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.