Skip to content

Commit 53294c2

Browse files
committed
Use correct filename for custom stylesheet
1 parent 8565963 commit 53294c2

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/SIL.Machine/Corpora/FileParatextProjectSettingsParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public FileParatextProjectSettingsParser(string projectDir)
1414

1515
protected override UsfmStylesheet CreateStylesheet(string fileName)
1616
{
17-
string customStylesheetFileName = Path.Combine(_projectDir, fileName);
17+
string customStylesheetFileName = Path.Combine(_projectDir, "custom.sty");
1818
return new UsfmStylesheet(
1919
fileName,
2020
File.Exists(customStylesheetFileName) ? customStylesheetFileName : null
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using NUnit.Framework;
2+
3+
namespace SIL.Machine.Corpora;
4+
5+
public class FileParatextProjectSettingsParserTests
6+
{
7+
[Test]
8+
public void Parse_CustomStylesheet()
9+
{
10+
FileParatextProjectSettingsParser parser = new(CorporaTestHelpers.UsfmTestProjectPath);
11+
ParatextProjectSettings settings = parser.Parse();
12+
UsfmTag testTag = settings.Stylesheet.GetTag("test");
13+
Assert.That(testTag.StyleType, Is.EqualTo(UsfmStyleType.Character));
14+
Assert.That(testTag.TextType, Is.EqualTo(UsfmTextType.Other));
15+
}
16+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
\Marker test
2+
\Endmarker test*
3+
\TextType Other
4+
\StyleType Character

0 commit comments

Comments
 (0)