Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(Cite): Wrap standalone citations in brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Feb 18, 2021
1 parent e0456da commit 4113180
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"subpatterns": {
"semantic": ":--[A-z][A-z0-9]+",
"element": "(?:\\w*:--[A-z][A-z0-9]+|:root|^stencila-)",
"pseudo": "(?::{1,2}(?:\\w|-)+)",
"pseudo": "(?::{1,2}(?:\\w|-)+)|(:not(?:\\w|-)+)",
"combinator": "(:?\\s*(?:>|\\+|~|\\s+|\\|\\|)\\s*)"
}
}
Expand Down
1 change: 1 addition & 0 deletions src/extensions/cite-apa/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ See https://en.wikipedia.org/wiki/APA_style#In-text_citations
}
}

/* Hide numeric citation format */
:--Cite > a > :first-child {
display: none;
}
Expand Down
11 changes: 11 additions & 0 deletions src/extensions/cite-numeric/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@
}
}

:not(:--CiteGroup) > :--Cite {
&::before {
content: '[';
}
&::after {
content: ']';
}
}

/* Show numeric citation format */
:--Cite > a > :first-child {
display: inline;
}

/* Hide author-date citation format */
:--Cite > a > :last-child {
display: none;
}
Expand Down

0 comments on commit 4113180

Please sign in to comment.