@@ -6,7 +6,7 @@ pub mod ast;
66
77use ast:: {
88 ast_to_html, ast_to_jats, ast_to_markdown, ast_to_plain_text, html_to_ast, jats_to_ast,
9- markdown_to_ast, normalize_crossref_abstract_ast , plain_text_ast_to_jats, plain_text_to_ast,
9+ markdown_to_ast, normalise_crossref_abstract_ast , plain_text_ast_to_jats, plain_text_to_ast,
1010 strip_structural_elements_from_ast_for_conversion, validate_ast_content,
1111} ;
1212
@@ -322,15 +322,15 @@ pub fn convert_to_jats(
322322 }
323323}
324324
325- /// Normalize stored abstract-like markup into the subset we safely emit to Crossref.
326- pub fn normalize_crossref_abstract_jats ( content : & str ) -> ThothResult < String > {
325+ /// normalise stored abstract-like markup into the subset we safely emit to Crossref.
326+ pub fn normalise_crossref_abstract_jats ( content : & str ) -> ThothResult < String > {
327327 let ast = if looks_like_markup ( content) {
328328 jats_to_ast ( content)
329329 } else {
330330 plain_text_to_ast ( content)
331331 } ;
332- let normalized = normalize_crossref_abstract_ast ( ast) ?;
333- Ok ( ast_to_jats ( & normalized ) )
332+ let normalised = normalise_crossref_abstract_ast ( ast) ?;
333+ Ok ( ast_to_jats ( & normalised ) )
334334}
335335
336336/// Convert from JATS XML to specified format using a specific tag name
@@ -366,7 +366,7 @@ pub fn convert_from_jats(
366366 } ) ;
367367 }
368368
369- // Read paths need to tolerate legacy stored markup and normalize it on the fly.
369+ // Read paths need to tolerate legacy stored markup and normalise it on the fly.
370370 let ast = jats_to_ast ( jats_xml) ;
371371
372372 // For title conversion, strip structural elements before validation
@@ -667,16 +667,16 @@ mod tests {
667667 }
668668
669669 #[ test]
670- fn test_normalize_crossref_abstract_jats_splits_breaks_and_removes_empty_paragraphs ( ) {
670+ fn test_normalise_crossref_abstract_jats_splits_breaks_and_removes_empty_paragraphs ( ) {
671671 let input = "<p></p><p>First line<break/>Second line</p>" ;
672- let output = normalize_crossref_abstract_jats ( input) . unwrap ( ) ;
672+ let output = normalise_crossref_abstract_jats ( input) . unwrap ( ) ;
673673 assert_eq ! ( output, "<p>First line</p><p>Second line</p>" ) ;
674674 }
675675
676676 #[ test]
677- fn test_normalize_crossref_abstract_jats_flattens_inline_only_content ( ) {
677+ fn test_normalise_crossref_abstract_jats_flattens_inline_only_content ( ) {
678678 let input = "This has <bold>bold</bold> text." ;
679- let output = normalize_crossref_abstract_jats ( input) . unwrap ( ) ;
679+ let output = normalise_crossref_abstract_jats ( input) . unwrap ( ) ;
680680 assert_eq ! ( output, "<p>This has <bold>bold</bold> text.</p>" ) ;
681681 }
682682 // --- convert_to_jats tests end ---
0 commit comments