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

LT-21785: Add more style support #77

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions Src/xWorks/ConfiguredLcmGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@ private static IFragment GenerateAudioWsContent(string wsId,
private static void GenerateRunWithPossibleLink(GeneratorSettings settings, string writingSystem, IFragmentWriter writer, string style,
string text, Guid linkDestination, bool rightToLeft, ConfigurableDictionaryNode config, string externalLink = null)
{
settings.ContentGenerator.StartRun(writer, writingSystem);
settings.ContentGenerator.StartRun(writer, config, settings.PropertyTable, writingSystem);
var wsRtl = settings.Cache.WritingSystemFactory.get_Engine(writingSystem).RightToLeftScript;
if (rightToLeft != wsRtl)
{
Expand Down Expand Up @@ -3031,7 +3031,7 @@ private static void GenerateTableRow(ITsString rowUSFM, IFragmentWriter writer,
private static void GenerateError(string text, IFragmentWriter writer, GeneratorSettings settings)
{
var writingSystem = settings.Cache.WritingSystemFactory.GetStrFromWs(settings.Cache.WritingSystemFactory.UserWs);
settings.ContentGenerator.StartRun(writer, writingSystem);
settings.ContentGenerator.StartRun(writer, null, settings.PropertyTable, writingSystem);
settings.ContentGenerator.SetRunStyle(writer, null, settings.PropertyTable, writingSystem, null, true);
if (text.Contains(TxtLineSplit))
{
Expand Down
2 changes: 1 addition & 1 deletion Src/xWorks/ILcmContentGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IFragment GenerateGroupingNode(object field, string className, ConfigurableDicti
void EndMultiRunString(IFragmentWriter writer);
void StartBiDiWrapper(IFragmentWriter writer, bool rightToLeft);
void EndBiDiWrapper(IFragmentWriter writer);
void StartRun(IFragmentWriter writer, string writingSystem);
void StartRun(IFragmentWriter writer, ConfigurableDictionaryNode config, ReadOnlyPropertyTable propTable, string writingSystem);
void EndRun(IFragmentWriter writer);
void SetRunStyle(IFragmentWriter writer, ConfigurableDictionaryNode config, ReadOnlyPropertyTable propertyTable, string writingSystem, string runStyle, bool error);
void StartLink(IFragmentWriter writer, ConfigurableDictionaryNode config, Guid destination);
Expand Down
2 changes: 1 addition & 1 deletion Src/xWorks/LcmJsonGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void EndBiDiWrapper(IFragmentWriter writer)
{
}

public void StartRun(IFragmentWriter writer, string writingSystem)
public void StartRun(IFragmentWriter writer, ConfigurableDictionaryNode config, ReadOnlyPropertyTable propTable, string writingSystem)
{
var jsonWriter = (JsonFragmentWriter)writer;
jsonWriter.StartObject();
Expand Down
Loading
Loading