Merge pull request #2985 from evazion/feat-notes-ruby

Allow <ruby> tags for marking up furigana in notes.
This commit is contained in:
Albert Yi
2017-04-22 01:03:47 -07:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -34,6 +34,12 @@ div#note-container {
font-size: 0.8em;
}
ruby {
rt {
font-size: 0.8em;
}
}
ul {
margin-left: 1em;
margin-bottom: 1em;

View File

@@ -363,7 +363,7 @@ class DText
Sanitize.clean(
text,
:elements => %w(code center tn h1 h2 h3 h4 h5 h6 a span div blockquote br p ul li ol em strong small big b i font u s pre),
:elements => %w(code center tn h1 h2 h3 h4 h5 h6 a span div blockquote br p ul li ol em strong small big b i font u s pre ruby rb rt rp),
:attributes => {
"a" => %w(href title style),
"span" => %w(class style),