Skip to content

Commit

Permalink
Merge branch 'lang-attribute'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaspiterek committed Mar 1, 2024
2 parents 16b3c1a + 3618274 commit ea59653
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
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

0 comments on commit ea59653

Please sign in to comment.