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 lang attribute for quotation marks #24

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions news/23.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- fix quotation marks using `lang` attribute from blockquote instead of the html ones
4 changes: 2 additions & 2 deletions src/components/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const View = (props) => {
slateSettings: {
...config.settings.slate,
toolbarButtons: config.settings.slate.toolbarButtons.filter(
(index) => index - config.settings.slate.toolbarButtons,
(index) => index - config.settings.slate.toolbarButtons
),
},
};
Expand All @@ -37,7 +37,7 @@ const View = (props) => {
<blockquote
className={data.plaintext?.length < 1 && 'isEmpty'}
cite={data.cite}
lang={data.quotationLanguage || intl.locale}
lang={data.quotationLanguage != intl.locale && data.quotationLanguage}
>
{!isEditMode ? (
<TextBlockView {...props} />
Expand Down
31 changes: 17 additions & 14 deletions src/theme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,30 @@
margin-bottom: 1em;
}

.block.quote blockquote:not(.isEmpty) {
html {
&[lang='de'] {
p {
&::before {
content: '„';
}
.block.quote blockquote:not(.isEmpty) {
p {
&::before {
content: '„';
}

&::after {
content: '“';
&::after {
content: '“';
}
}
}
}

&[lang='en'] {
p {
&::before {
content: '"';
}
.block.quote blockquote:not(.isEmpty) {
p {
&::before {
content: '"';
}

&::after {
content: '"';
&::after {
content: '"';
}
}
}
}
Expand Down
Loading