Skip to content

Commit 5a1e101

Browse files
mark-siljasonleenaylor
authored andcommitted
LT-22185: XHTML: Fix style when there are multiple ws (#454)
GenerateCssFromWsOptions() was only generating rules for one writing system. Changed this to generate rules for all enabled writing systems.
1 parent db3ab36 commit 5a1e101

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Src/xWorks/CssGenerator.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ private static StyleRule AdjustRuleIfParagraphNumberScheme(StyleRule rule, Confi
689689
private static List<StyleRule> GenerateCssFromWsOptions(ConfigurableDictionaryNode configNode, DictionaryNodeWritingSystemOptions wsOptions,
690690
string baseSelection, ReadOnlyPropertyTable propertyTable)
691691
{
692+
var rules = new List<StyleRule>();
692693
var cache = propertyTable.GetValue<LcmCache>("cache");
693694
foreach(var ws in wsOptions.Options.Where(opt => opt.IsEnabled))
694695
{
@@ -700,10 +701,10 @@ private static List<StyleRule> GenerateCssFromWsOptions(ConfigurableDictionaryNo
700701
if (!string.IsNullOrEmpty(configNode.Style))
701702
wsRule.Declarations.Properties.AddRange(GenerateCssStyleFromLcmStyleSheet(configNode.Style, wsId, propertyTable));
702703
if (!IsEmptyRule(wsRule))
703-
return new List<StyleRule> {wsRule};
704+
rules.Add(wsRule);
704705
}
705706

706-
return new List<StyleRule>();
707+
return rules;
707708
}
708709

709710
private static List<StyleRule> GenerateCssForWritingSystemPrefix(ConfigurableDictionaryNode configNode, string baseSelection, ReadOnlyPropertyTable propertyTable)

0 commit comments

Comments
 (0)