Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #637 : Markdown footnotes #700

Merged
merged 2 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions assets/themes/default/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,12 @@ input:checked ~ .cw-container > .cw-text {
margin: auto $horizontal-margin;
}
}

// Footnote related styles
.footnote-definition {
p {
font-size: smaller;
// Make sur the definition is inline with the label-definition
display: inline;
}
}
3 changes: 3 additions & 0 deletions plume-models/src/safe_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ lazy_static! {
.add_tag_attributes("label", ["for"].iter())
.add_tag_attributes("input", ["type", "checked"].iter())
.add_allowed_classes("input", ["cw-checkbox"].iter())
// Related to https://github.com/Plume-org/Plume/issues/637
.add_allowed_classes("sup", ["footnote-reference", "footnote-definition-label"].iter())
.add_allowed_classes("div", ["footnote-definition"].iter())
.add_allowed_classes("span", ["cw-container", "cw-text"].iter())
.attribute_filter(|elem, att, val| match (elem, att) {
("input", "type") => Some("checkbox".into()),
Expand Down