diff --git a/src/csl/mod.rs b/src/csl/mod.rs index 10d78afb..55f830a9 100644 --- a/src/csl/mod.rs +++ b/src/csl/mod.rs @@ -1588,7 +1588,15 @@ impl<'a> StyleContext<'a> { let mut ctx = self.ctx(entry, props, locale, term_locale, true); ctx.writing .push_name_options(&self.csl.bibliography.as_ref()?.name_options); - self.csl.bibliography.as_ref()?.layout.render(&mut ctx); + + let layout = &self.csl.bibliography.as_ref()?.layout; + if let Some(prefix) = layout.prefix.as_ref() { + ctx.push_str(prefix); + } + layout.render(&mut ctx); + if let Some(suffix) = layout.suffix.as_ref() { + ctx.push_str(suffix); + } Some(ctx) } diff --git a/tests/citeproc-pass.txt b/tests/citeproc-pass.txt index 115dd7a0..b91e26a0 100644 --- a/tests/citeproc-pass.txt +++ b/tests/citeproc-pass.txt @@ -16,14 +16,17 @@ bugreports_ChineseCharactersFamilyOnlyPluralLabel bugreports_ContextualPluralWithMainItemFields bugreports_EmptyIfMatchNoneFail bugreports_MatchedAuthorAndDate +bugreports_NoEventInNestedMacroWithOldProcessor bugreports_SectionAndLocator bugreports_SimpleBib bugreports_SingletonIfMatchNoneFail +bugreports_StyleError001 bugreports_TitleCase bugreports_UndefinedInName2 bugreports_YearSuffixLingers bugreports_disambiguate bugreports_effingBug +bugreports_parenthesis bugreports_undefinedCrash collapse_AuthorCollapse collapse_AuthorCollapseDifferentAuthorsOneWithEtAl @@ -31,6 +34,7 @@ collapse_AuthorCollapseNoDate collapse_CitationNumberRangesMixed collapse_CitationNumberRangesMixed2 collapse_CitationNumberRangesMixed3 +collapse_CitationNumberRangesOneOnly collapse_NumericDuplicate collapse_NumericDuplicate2 collapse_TrailingDelimiter @@ -142,11 +146,13 @@ disambiguate_YearSuffixMacroSameYearExplicit disambiguate_YearSuffixMacroSameYearImplicit disambiguate_YearSuffixWithEtAlSubsequent display_DisplayBlock +etal_CitationAndBibliographyDecorationsInBibliography flipflop_OrphanQuote form_TitleShort form_TitleShortNoLong form_TitleTestNoLongFalse fullstyles_APA +fullstyles_ChicagoNoteWithBibliographyWithPublisher group_ShortOutputOnly group_SuppressValueWithEmptySubgroup group_SuppressWithEmptyNestedDateNode @@ -234,6 +240,7 @@ name_QuashOrdinaryVariableRenderedViaSubstitute name_RomanianTwo name_SemicolonWithAnd name_SubsequentAuthorSubstituteMultipleNames +name_SubsequentAuthorSubstituteSingleField name_SubstituteMacroInheritDecorations name_SubstituteName name_SubstituteOnDateGroupSpanFail @@ -375,9 +382,11 @@ punctuation_DelimiterWithStripPeriodsAndSubstitute3 punctuation_DoNotSuppressColonAfterPeriod punctuation_NoSuppressOfPeriodBeforeSemicolon quotes_Punctuation +quotes_PunctuationNasty sort_BibliographyResortOnUpdate sort_CaseInsensitiveBibliography sort_CaseInsensitiveCitation +sort_ChicagoYearSuffix1 sort_Citation sort_CitationNumberPrimaryAscendingViaMacroBibliography sort_CitationNumberPrimaryAscendingViaVariableBibliography diff --git a/tests/citeproc.rs b/tests/citeproc.rs index 396f936d..92418ce5 100644 --- a/tests/citeproc.rs +++ b/tests/citeproc.rs @@ -768,7 +768,7 @@ fn case_folding() { .content .write_buf(&mut buf, hayagriva::BufWriteFormat::Plain) .unwrap(); - assert_eq!(buf, ". my lowercase container title"); + assert_eq!(buf, ". my lowercase container title."); } #[test]