diff --git a/src/WpfMath.Example/App.xaml.cs b/src/WpfMath.Example/App.xaml.cs
index 1930751c..89e8e09e 100644
--- a/src/WpfMath.Example/App.xaml.cs
+++ b/src/WpfMath.Example/App.xaml.cs
@@ -12,7 +12,7 @@ public partial class App : Application
{
public static new App Current
{
- get { return Application.Current as App; }
+ get { return (App) Application.Current; }
}
private void Application_Startup(object sender, StartupEventArgs e)
diff --git a/src/WpfMath.Example/MainWindow.xaml.cs b/src/WpfMath.Example/MainWindow.xaml.cs
index 4ab02329..2fc40177 100644
--- a/src/WpfMath.Example/MainWindow.xaml.cs
+++ b/src/WpfMath.Example/MainWindow.xaml.cs
@@ -37,10 +37,10 @@ public MainWindow()
FormulaSelector.SelectedIndex = 0;
}
- private TexFormula ParseFormula(string input)
+ private TexFormula? ParseFormula(string input)
{
// Create formula object from input text.
- TexFormula formula = null;
+ TexFormula? formula = null;
try
{
formula = this._formulaParser.Parse(input);
diff --git a/src/WpfMath.Example/WpfMath.Example.csproj b/src/WpfMath.Example/WpfMath.Example.csproj
index aaafc474..57522b58 100644
--- a/src/WpfMath.Example/WpfMath.Example.csproj
+++ b/src/WpfMath.Example/WpfMath.Example.csproj
@@ -6,8 +6,15 @@
true
Full
false
+ enable
-
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt
index 4c05af11..3a75b4db 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.2+2.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -33,7 +32,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt
index 0ba5034b..9fdf5869 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.bigMatrixExpression.approved.txt
@@ -102,7 +102,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -116,7 +115,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -130,7 +128,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -146,7 +143,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -176,7 +172,6 @@
{
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -200,7 +195,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -216,7 +210,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -230,7 +223,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -260,7 +252,6 @@
{
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -274,7 +265,6 @@
{
"Character": "s",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -288,7 +278,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -303,7 +292,6 @@
"BaseAtom": {
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -318,7 +306,6 @@
"SuperscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -433,7 +420,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -448,7 +434,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -462,7 +447,6 @@
"Denominator": {
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -485,7 +469,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -502,7 +485,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -516,7 +498,6 @@
"Denominator": {
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -539,7 +520,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -553,7 +533,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -569,7 +548,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -583,7 +561,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -617,7 +594,6 @@
{
"Character": "s",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -631,7 +607,6 @@
{
"Character": "i",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -645,7 +620,6 @@
{
"Character": "n",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -724,7 +698,6 @@
{
"Character": "c",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -738,7 +711,6 @@
{
"Character": "o",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -752,7 +724,6 @@
{
"Character": "s",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -880,7 +851,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -894,7 +864,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -909,7 +878,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -923,7 +891,6 @@
"Denominator": {
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -948,7 +915,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -962,7 +928,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -977,7 +942,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -998,7 +962,6 @@
{
"Character": "t",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1012,7 +975,6 @@
{
"Character": "a",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1026,7 +988,6 @@
{
"Character": "n",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1123,7 +1084,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1137,7 +1097,6 @@
"Denominator": {
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1161,7 +1120,6 @@
"Numerator": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1182,7 +1140,6 @@
{
"Character": "t",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1196,7 +1153,6 @@
{
"Character": "a",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1210,7 +1166,6 @@
{
"Character": "n",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1304,7 +1259,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt
index ba23cd46..0d49e304 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2 x123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt
index 5f05543d..ba3bba10 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.( 2(x)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt
index e771125e..7cd28e82 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)(x)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt
index ff79d932..9b4305f6 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.((2)x123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt
index 8fcd6dea..29fd9497 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2 (x)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt
index 55d7f499..4489bce4 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2(x)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt
index 15d5afc5..35d00713 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.binom.(2x123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -89,7 +87,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -103,7 +100,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -117,7 +113,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt
index fc9603f7..4c0eafea 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) (1)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt
index 5f8d6213..0815f85c 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red) 1123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt
index b8aada76..d6591577 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)(1)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt
index 1ee1dd52..6fd4bcc5 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.color.((red)1123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt
index 87af1443..c36f967c 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color (red) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt
index c1a40e98..2f8337be 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [HTML] (abcdef) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt
index 53929b28..a2311aa1 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [RGB] (128, 128, 128) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt
index d1d919fa..53d42a11 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [] (red) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
index 9b3fa746..7756b2fa 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt
index 6a593637..a0b98c4e 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [gray] (0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt
index b0861402..70174329 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(color [rgb] (0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt
index 942fa4bf..4345bba5 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox (red) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt
index 0be1c00f..6fad9c4b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [HTML] (abcdef) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt
index bf8207a0..8d10000c 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [RGB] (128, 128, 128) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt
index 71e09b26..b7199266 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [] (red) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
index bcdc30ff..3e617d1b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt
index 63b1cd52..30c3fd2f 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [gray] (0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt
index 0a1beec6..9f9b0ce4 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModels.(colorbox [rgb] (0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt
index 27eebde2..d7f21615 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color (red, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt
index dd23a49f..86bdd4cd 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [ARGB] (25, 128, 128, 128) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt
index bd2ae2a6..1c9cf128 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [HTML] (abcdef19) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt
index 24f9fa87..5eee3503 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [RGBA] (128, 128, 128, 25) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt
index e8d4cd55..5f3bdec8 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [] (red, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
index 6485a1e6..8a0bd7f6 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
index 8294ff04..c264aafa 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt
index 8c3b6b07..a6246ede 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [gray] (0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
index 62777199..cbec5ebb 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(color [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt
index 7feecf40..d9ecf27b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox (red, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt
index bcb2f44a..6584c641 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [ARGB] (25, 128, 128, 128) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt
index 1c00ff2e..4ddab5be 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [HTML] (abcdef19) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt
index 3cb03309..1176f702 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [RGBA] (128, 128, 128, 25) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt
index fb5122da..f61450b7 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [] (red, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
index 388b3981..1679a8e8 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [argb] (0.1, 0.5, 0.5, 0.5) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
index 97c6c585..9c378a1e 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [cmyk] (0.5, 0.5, 0.5, 0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt
index 2b25005b..83035e09 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [gray] (0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
index 931054d4..27559622 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorModelsWithOpacity.(colorbox [rgba] (0.5, 0.5, 0.5, 0.1) x).approved.txt
@@ -7,7 +7,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt
index b857d7c0..829c4b85 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) (1)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt
index f517cadf..8d1a3860 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red) 1123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt
index ea3a8daf..e7492002 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)(1)123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt
index 9ba31cbc..810fc9d6 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.colorbox.((red)1123).approved.txt
@@ -10,7 +10,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +44,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +57,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -73,7 +70,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt
index 2d3cf5fc..e121effa 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.commandsInText.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "\\",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "a",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "l",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -48,7 +45,6 @@
{
"Character": "p",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -62,7 +58,6 @@
{
"Character": "h",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -76,7 +71,6 @@
{
"Character": "a",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -100,7 +94,6 @@
{
"Character": "\\",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -114,7 +107,6 @@
{
"Character": "b",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -128,7 +120,6 @@
{
"Character": "e",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -142,7 +133,6 @@
{
"Character": "t",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -156,7 +146,6 @@
{
"Character": "a",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -180,7 +169,6 @@
{
"Character": "\\",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -194,7 +182,6 @@
{
"Character": "u",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -208,7 +195,6 @@
{
"Character": "n",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -222,7 +208,6 @@
{
"Character": "k",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -236,7 +221,6 @@
{
"Character": "n",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -250,7 +234,6 @@
{
"Character": "o",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -264,7 +247,6 @@
{
"Character": "w",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -278,7 +260,6 @@
{
"Character": "n",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -292,7 +273,6 @@
{
"Character": "c",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -306,7 +286,6 @@
{
"Character": "o",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -320,7 +299,6 @@
{
"Character": "m",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -334,7 +312,6 @@
{
"Character": "m",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -348,7 +325,6 @@
{
"Character": "a",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -362,7 +338,6 @@
{
"Character": "n",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -376,7 +351,6 @@
{
"Character": "d",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt
index cce0f5fe..288be3ce 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.complexMathrm.approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -37,7 +36,6 @@
{
"Character": "2",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -109,7 +107,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt
index 4b9ef5dc..df238321 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.cyrillicText.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "а",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "б",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "в",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt
index 685c3298..2d7257b0 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiterWithScripts.approved.txt
@@ -8,7 +8,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -35,7 +34,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -94,7 +92,6 @@
"SubscriptAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -108,7 +105,6 @@
"SuperscriptAtom": {
"Character": "b",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt
index cc26b878..2e83e0a6 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.((,)).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt
index 36b8d68d..6f1a3395 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(backslash,backslash).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt
index c29564fe..2291c8ca 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(langle,rangle).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt
index 312dbffa..c83bf2b1 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrace,rbrace).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt
index f4f0f611..7cd34ac4 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(lbrack,rbrack).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt
index a3804a64..54a074c5 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.delimiters.(vert,vert).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt
index a51f476e..1eef2a4a 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.(((,.,false,true)).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt
index 4b6387e3..7dd21434 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.emptyDelimiters.((.,),true,false)).approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt
index bc280047..1345680f 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.expressionAfterBraces.approved.txt
@@ -10,7 +10,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -37,7 +36,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -109,7 +107,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt
index 057ea7fa..89a7fb69 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.expressionInBraces.approved.txt
@@ -7,7 +7,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +33,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt
index f81280c0..95620905 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2 x123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt
index 30ac430d..1329428a 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.( 2(x)123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt
index 95c5ece2..7ea6d7f6 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)(x)123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt
index 115162b1..055c210b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.((2)x123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt
index bf568eae..c1d88992 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2 (x)123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt
index cd0124e7..81e7e083 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2(x)123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt
index cb8b0aca..6123b231 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.frac.(2x123).approved.txt
@@ -7,7 +7,6 @@
"Numerator": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"Denominator": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt
index 7f96e87c..da461d59 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.hat.approved.txt
@@ -5,7 +5,6 @@
"BaseAtom": {
"Character": "T",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt
index 903bf23d..bb64430f 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.intF.approved.txt
@@ -32,7 +32,6 @@
{
"Character": "f",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt
index 9e7b9efc..26cc4e37 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.integral.approved.txt
@@ -17,7 +17,6 @@
"LowerLimitAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -31,7 +30,6 @@
"UpperLimitAtom": {
"Character": "b",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt
index 61e05e81..26678c41 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.lim.approved.txt
@@ -10,7 +10,6 @@
{
"Character": "l",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -24,7 +23,6 @@
{
"Character": "i",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -38,7 +36,6 @@
{
"Character": "m",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -62,7 +59,6 @@
"LowerLimitAtom": {
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -87,7 +83,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt
index 475c71ff..9d23af73 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.limInCurlyBraces.approved.txt
@@ -11,7 +11,6 @@
{
"Character": "l",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -25,7 +24,6 @@
{
"Character": "i",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -39,7 +37,6 @@
{
"Character": "m",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -86,7 +83,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt
index 9cbdad1d..9608845f 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.mathcal.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "s",
"TextStyle": "mathcal",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "i",
"TextStyle": "mathcal",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "n",
"TextStyle": "mathcal",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt
index 70a0410f..55d59cfb 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.mathit.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "s",
"TextStyle": "mathit",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "i",
"TextStyle": "mathit",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "n",
"TextStyle": "mathit",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt
index 8a3ae046..200371ed 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.mathrm.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "s",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "i",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "n",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt
index 2be90394..0905c978 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.matrixExpression.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -33,7 +32,6 @@
{
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -68,7 +66,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -82,7 +79,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -107,7 +103,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -121,7 +116,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -159,7 +153,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -173,7 +166,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -198,7 +190,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -212,7 +203,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -252,7 +242,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -266,7 +255,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -291,7 +279,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -305,7 +292,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -343,7 +329,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -357,7 +342,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -382,7 +366,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -396,7 +379,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -436,7 +418,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -450,7 +431,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -475,7 +455,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -489,7 +468,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -527,7 +505,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -541,7 +518,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -566,7 +542,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -580,7 +555,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -663,7 +637,6 @@
{
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -677,7 +650,6 @@
{
"Character": "h",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -691,7 +663,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -705,7 +676,6 @@
{
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -719,7 +689,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -733,7 +702,6 @@
{
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -765,7 +733,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -779,7 +746,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -806,7 +772,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -820,7 +785,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -847,7 +811,6 @@
"BaseAtom": {
"Character": "v",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -861,7 +824,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -947,7 +909,6 @@
{
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -979,7 +940,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -993,7 +953,6 @@
"SubscriptAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1020,7 +979,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1034,7 +992,6 @@
"SubscriptAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1061,7 +1018,6 @@
"BaseAtom": {
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -1075,7 +1031,6 @@
"SubscriptAtom": {
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt
index 00f9481d..a9187803 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.multilineFormula.approved.txt
@@ -9,7 +9,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -23,7 +22,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -37,7 +35,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -51,7 +48,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -65,7 +61,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -94,7 +89,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -108,7 +102,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -122,7 +115,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -136,7 +128,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -150,7 +141,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -179,7 +169,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -193,7 +182,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -207,7 +195,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -221,7 +208,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -235,7 +221,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt
index dd7f7dc5..bab0196a 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.nestedMatrix.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "4",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -23,7 +22,6 @@
{
"Character": "7",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -37,7 +35,6 @@
{
"Character": "8",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -61,7 +58,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -80,7 +76,6 @@
{
"Character": "5",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -94,7 +89,6 @@
{
"Character": "7",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -125,7 +119,6 @@
{
"Character": "7",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -139,7 +132,6 @@
{
"Character": "8",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -168,7 +160,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -182,7 +173,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -234,7 +224,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -248,7 +237,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -262,7 +250,6 @@
{
"Character": "7",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -276,7 +263,6 @@
{
"Character": "8",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -290,7 +276,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt
index 340dd0ae..8bb33dee 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(matrix(line 1)line 2).approved.txt
@@ -12,7 +12,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -26,7 +25,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -40,7 +38,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -54,7 +51,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -68,7 +64,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -111,7 +106,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -125,7 +119,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -139,7 +132,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -153,7 +145,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -167,7 +158,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt
index 2ecfb27f..6ee0a73d 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.newLineAfterMatrix.(pmatrix(line 1)line 2).approved.txt
@@ -13,7 +13,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -27,7 +26,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -41,7 +39,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -55,7 +52,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -69,7 +65,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -135,7 +130,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -149,7 +143,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -163,7 +156,6 @@
{
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -177,7 +169,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -191,7 +182,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt
index 31dd0fa5..27f78b57 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.oneNonAsciiSymbolText.approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "А",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "И",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt
index 76533358..401567c1 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.( (1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt
index 9124e9a5..fbb306f1 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.( 1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt
index 7e8a5fb4..878d3398 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.((1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt
index 41c60113..ec93242e 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.overline.(1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt
index 8ff133d8..6110eb84 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.piecewiseDefinedFunction.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "f",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -33,7 +32,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -80,7 +78,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -107,7 +104,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -134,7 +130,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -148,7 +143,6 @@
{
"Character": "f",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -166,7 +160,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -193,7 +186,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -220,7 +212,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -262,7 +253,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -289,7 +279,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -316,7 +305,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -330,7 +318,6 @@
{
"Character": "f",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -348,7 +335,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -375,7 +361,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -402,7 +387,6 @@
{
"Character": "4",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -441,7 +425,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -458,7 +441,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -472,7 +454,6 @@
{
"Character": "l",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -486,7 +467,6 @@
{
"Character": "s",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -500,7 +480,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -514,7 +493,6 @@
{
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -528,7 +506,6 @@
{
"Character": "h",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -542,7 +519,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -556,7 +532,6 @@
{
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -570,7 +545,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt"
index e0727a4f..3ba7e8d4 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x \342\206\221 (y) _ (z)).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt"
index 33dd3c6a..4a2a26b7 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_(z)).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt"
index 4deb665f..d04243e3 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221(y)_z).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt"
index b5ebbb44..f8988543 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_ z).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt"
index 16b3200e..770efd36 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_(z)).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt" "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt"
index e502c72f..d45e2aea 100644
--- "a/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt"
+++ "b/src/WpfMath.Tests/TestResults/ParserTests.scripts.(x\342\206\221y_z).approved.txt"
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -18,7 +17,6 @@
"SubscriptAtom": {
"Character": "z",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -32,7 +30,6 @@
"SuperscriptAtom": {
"Character": "y",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt
index cec01150..4390b3b9 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.simpleCases.approved.txt
@@ -10,7 +10,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -50,7 +49,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -64,7 +62,6 @@
{
"Character": "f",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -78,7 +75,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -105,7 +101,6 @@
{
"Character": "0",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -160,7 +155,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -200,7 +194,6 @@
{
"Character": "o",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -214,7 +207,6 @@
{
"Character": "t",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -228,7 +220,6 @@
{
"Character": "h",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -242,7 +233,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -256,7 +246,6 @@
{
"Character": "r",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -270,7 +259,6 @@
{
"Character": "w",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -284,7 +272,6 @@
{
"Character": "i",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -298,7 +285,6 @@
{
"Character": "s",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -312,7 +298,6 @@
{
"Character": "e",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt
index 06af3536..a985d543 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.simpleMatrix.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "4",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -23,7 +22,6 @@
{
"Character": "7",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -37,7 +35,6 @@
{
"Character": "8",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -61,7 +58,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -77,7 +73,6 @@
{
"Character": "5",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -91,7 +86,6 @@
{
"Character": "9",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -108,7 +102,6 @@
{
"Character": "8",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -122,7 +115,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt
index e41a5394..1180b99e 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sin.approved.txt
@@ -10,7 +10,6 @@
{
"Character": "s",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -24,7 +23,6 @@
{
"Character": "i",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -38,7 +36,6 @@
{
"Character": "n",
"TextStyle": "mathrm",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -63,7 +60,6 @@
"UpperLimitAtom": {
"Character": "n",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -87,7 +83,6 @@
{
"Character": "x",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt
index 47ada8c8..33e160e0 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.spacesInText.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "a",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "b",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -54,7 +52,6 @@
{
"Character": "c",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt
index 18766172..809ec910 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( (1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -31,7 +30,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +43,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +56,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt
index 6ba57a54..0254a803 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.( 1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -31,7 +30,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +43,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +56,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt
index d08b1300..2b01b86b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.((1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -31,7 +30,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +43,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +56,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt
index 9e38faf5..96ac6123 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrt.(1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -31,7 +30,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -45,7 +43,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -59,7 +56,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt
index d1eb1cfa..59cfce83 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [ 2](1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"DegreeAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt
index febae95c..d1bb043d 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.( [2]1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"DegreeAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt
index 500ab7a3..5e176664 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([ 2 ] (1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"DegreeAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt
index 5d0edebe..0041f9bd 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.sqrtWithOptArgument.([2 ] 1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -21,7 +20,6 @@
"DegreeAtom": {
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -72,7 +68,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt
index 0051fefc..4bbec92d 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( (1)123).approved.txt
@@ -6,7 +6,6 @@
{
"Character": "1",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -48,7 +45,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt
index fc69eea7..93b64d3b 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.textArgumentParsing.( 1123).approved.txt
@@ -6,7 +6,6 @@
{
"Character": "1",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -48,7 +45,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt
index d98afadc..f4a43449 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.textCommand.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "t",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "e",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "s",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -48,7 +45,6 @@
{
"Character": "t",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt
index 80116885..c64a29ce 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.textWithExpression.approved.txt
@@ -6,7 +6,6 @@
{
"Character": "2",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -20,7 +19,6 @@
{
"Character": "+",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -34,7 +32,6 @@
{
"Character": "2",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt
index 2040ae9a..ee4d83c8 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.( (1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt
index 17230394..7f292843 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.( 1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt
index 5fa85cb4..5e788fdf 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.((1)123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt
index 4645b060..49218214 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.underline.(1123).approved.txt
@@ -7,7 +7,6 @@
"BaseAtom": {
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -30,7 +29,6 @@
{
"Character": "1",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -44,7 +42,6 @@
{
"Character": "2",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
@@ -58,7 +55,6 @@
{
"Character": "3",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt
index e35ac202..31695813 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.underscoreText.approved.txt
@@ -3,7 +3,6 @@
"RootAtom": {
"Character": "_",
"TextStyle": "text",
- "IsDefaultTextStyle": false,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt b/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt
index 157293e5..6c2d70a5 100644
--- a/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt
+++ b/src/WpfMath.Tests/TestResults/ParserTests.unmatchedDelimiters.approved.txt
@@ -4,7 +4,6 @@
"BaseAtom": {
"Character": "a",
"TextStyle": null,
- "IsDefaultTextStyle": true,
"IsTextSymbol": false,
"Type": "Ordinary",
"Source": {
diff --git a/src/WpfMath/Atoms/AccentedAtom.cs b/src/WpfMath/Atoms/AccentedAtom.cs
index cb2501fc..c42d106d 100644
--- a/src/WpfMath/Atoms/AccentedAtom.cs
+++ b/src/WpfMath/Atoms/AccentedAtom.cs
@@ -6,7 +6,7 @@ namespace WpfMath.Atoms
// Atom representing base atom with accent above it.
internal class AccentedAtom : Atom
{
- public AccentedAtom(SourceSpan source, Atom baseAtom, string accentName)
+ public AccentedAtom(SourceSpan? source, Atom? baseAtom, string accentName)
: base(source)
{
this.BaseAtom = baseAtom;
@@ -16,7 +16,7 @@ public AccentedAtom(SourceSpan source, Atom baseAtom, string accentName)
throw new ArgumentException("The specified symbol name is not an accent.", "accent");
}
- public AccentedAtom(SourceSpan source, Atom baseAtom, TexFormula accent)
+ public AccentedAtom(SourceSpan? source, Atom? baseAtom, TexFormula accent)
: base(source)
{
if (!(accent.RootAtom is SymbolAtom rootSymbol))
@@ -30,14 +30,14 @@ public AccentedAtom(SourceSpan source, Atom baseAtom, TexFormula accent)
}
// Atom over which accent symbol is placed.
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
// Atom representing accent symbol to place over base atom.
public SymbolAtom AccentAtom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
- CharSymbol GetBaseChar()
+ CharSymbol? GetBaseChar()
{
var baseAtom = this.BaseAtom;
while (baseAtom is AccentedAtom a)
diff --git a/src/WpfMath/Atoms/Atom.cs b/src/WpfMath/Atoms/Atom.cs
index 27d25578..41f4d7a0 100644
--- a/src/WpfMath/Atoms/Atom.cs
+++ b/src/WpfMath/Atoms/Atom.cs
@@ -5,7 +5,7 @@ namespace WpfMath.Atoms
// Atom (smallest unit) of TexFormula.
internal abstract class Atom
{
- protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
+ protected Atom(SourceSpan? source, TexAtomType type = TexAtomType.Ordinary)
{
this.Source = source;
this.Type = type;
@@ -13,7 +13,7 @@ protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
public TexAtomType Type { get; }
- public SourceSpan Source { get; }
+ public SourceSpan? Source { get; }
public Box CreateBox(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/BigOperatorAtom.cs b/src/WpfMath/Atoms/BigOperatorAtom.cs
index a54fff26..8064592c 100644
--- a/src/WpfMath/Atoms/BigOperatorAtom.cs
+++ b/src/WpfMath/Atoms/BigOperatorAtom.cs
@@ -16,17 +16,17 @@ private static Box ChangeWidth(Box box, double maxWidth)
}
public BigOperatorAtom(
- SourceSpan source,
- Atom baseAtom,
- Atom lowerLimitAtom,
- Atom upperLimitAtom,
+ SourceSpan? source,
+ Atom? baseAtom,
+ Atom? lowerLimitAtom,
+ Atom? upperLimitAtom,
bool? useVerticalLimits = null)
: this(source, baseAtom, lowerLimitAtom, upperLimitAtom)
{
this.UseVerticalLimits = useVerticalLimits;
}
- public BigOperatorAtom(SourceSpan source, Atom baseAtom, Atom lowerLimitAtom, Atom upperLimitAtom)
+ public BigOperatorAtom(SourceSpan? source, Atom? baseAtom, Atom? lowerLimitAtom, Atom? upperLimitAtom)
: base(source, TexAtomType.BigOperator)
{
this.BaseAtom = baseAtom;
@@ -36,12 +36,12 @@ public BigOperatorAtom(SourceSpan source, Atom baseAtom, Atom lowerLimitAtom, At
}
// Atom representing big operator.
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
// Atoms representing lower and upper limits.
- public Atom LowerLimitAtom { get; }
+ public Atom? LowerLimitAtom { get; }
- public Atom UpperLimitAtom { get; }
+ public Atom? UpperLimitAtom { get; }
// True if limits should be drawn over and under the base atom; false if they should be drawn as scripts.
public bool? UseVerticalLimits { get; }
@@ -83,16 +83,15 @@ protected override Box CreateBoxCore(TexEnvironment environment)
}
// Create boxes for upper and lower limits.
- var upperLimitBox = this.UpperLimitAtom == null ? null : this.UpperLimitAtom.CreateBox(
+ Box? upperLimitBox = this.UpperLimitAtom == null ? null : this.UpperLimitAtom.CreateBox(
environment.GetSuperscriptStyle());
- var lowerLimitBox = this.LowerLimitAtom == null ? null : this.LowerLimitAtom.CreateBox(
+ Box? lowerLimitBox = this.LowerLimitAtom == null ? null : this.LowerLimitAtom.CreateBox(
environment.GetSubscriptStyle());
// Make all component boxes equally wide.
var maxWidth = Math.Max(Math.Max(baseBox.Width, upperLimitBox == null ? 0 : upperLimitBox.Width),
lowerLimitBox == null ? 0 : lowerLimitBox.Width);
- if (baseBox != null)
- baseBox = ChangeWidth(baseBox, maxWidth);
+ baseBox = ChangeWidth(baseBox, maxWidth);
if (upperLimitBox != null)
upperLimitBox = ChangeWidth(upperLimitBox, maxWidth);
if (lowerLimitBox != null)
@@ -106,7 +105,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
if (this.UpperLimitAtom != null)
{
resultBox.Add(new StrutBox(0, opSpacing5, 0, 0));
- upperLimitBox.Shift = delta / 2;
+ upperLimitBox!.Shift = delta / 2;
resultBox.Add(upperLimitBox);
kern = Math.Max(texFont.GetBigOpSpacing1(style), texFont.GetBigOpSpacing3(style) -
upperLimitBox.Depth);
@@ -120,7 +119,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
if (this.LowerLimitAtom != null)
{
resultBox.Add(new StrutBox(0, Math.Max(texFont.GetBigOpSpacing2(style), texFont.GetBigOpSpacing4(style) -
- lowerLimitBox.Height), 0, 0));
+ lowerLimitBox!.Height), 0, 0));
lowerLimitBox.Shift = -delta / 2;
resultBox.Add(lowerLimitBox);
resultBox.Add(new StrutBox(0, opSpacing5, 0, 0));
diff --git a/src/WpfMath/Atoms/CharAtom.cs b/src/WpfMath/Atoms/CharAtom.cs
index 86197450..86373b75 100644
--- a/src/WpfMath/Atoms/CharAtom.cs
+++ b/src/WpfMath/Atoms/CharAtom.cs
@@ -5,7 +5,7 @@ namespace WpfMath.Atoms
// Atom representing single character in specific text style.
internal class CharAtom : CharSymbol
{
- public CharAtom(SourceSpan source, char character, string textStyle = null)
+ public CharAtom(SourceSpan? source, char character, string? textStyle = null)
: base(source)
{
this.TextStyle = textStyle;
@@ -15,15 +15,13 @@ public CharAtom(SourceSpan source, char character, string textStyle = null)
public char Character { get; }
// Null means default text style.
- public string TextStyle { get; }
-
- private bool IsDefaultTextStyle => this.TextStyle == null;
+ public string? TextStyle { get; }
public override ITeXFont GetStyledFont(TexEnvironment environment) =>
this.TextStyle == TexUtilities.TextStyleName ? environment.TextFont : base.GetStyledFont(environment);
protected override Result GetCharInfo(ITeXFont texFont, TexStyle style) =>
- this.IsDefaultTextStyle
+ this.TextStyle == null
? texFont.GetDefaultCharInfo(this.Character, style)
: texFont.GetCharInfo(this.Character, this.TextStyle, style);
diff --git a/src/WpfMath/Atoms/CharSymbol.cs b/src/WpfMath/Atoms/CharSymbol.cs
index 5ed44ca0..daf1a6e2 100644
--- a/src/WpfMath/Atoms/CharSymbol.cs
+++ b/src/WpfMath/Atoms/CharSymbol.cs
@@ -6,7 +6,7 @@ namespace WpfMath.Atoms
// Atom representing single character that can be marked as text symbol.
internal abstract class CharSymbol : Atom
{
- protected CharSymbol(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
+ protected CharSymbol(SourceSpan? source, TexAtomType type = TexAtomType.Ordinary)
: base(source, type)
{
this.IsTextSymbol = false;
diff --git a/src/WpfMath/Atoms/DummyAtom.cs b/src/WpfMath/Atoms/DummyAtom.cs
index 1160d414..5126547b 100644
--- a/src/WpfMath/Atoms/DummyAtom.cs
+++ b/src/WpfMath/Atoms/DummyAtom.cs
@@ -18,7 +18,7 @@ public DummyAtom(Atom atom)
{
}
- public Atom WithPreviousAtom(DummyAtom previousAtom)
+ public Atom WithPreviousAtom(DummyAtom? previousAtom)
{
if (this.Atom is IRow row)
{
diff --git a/src/WpfMath/Atoms/FencedAtom.cs b/src/WpfMath/Atoms/FencedAtom.cs
index a78f1285..e5520385 100644
--- a/src/WpfMath/Atoms/FencedAtom.cs
+++ b/src/WpfMath/Atoms/FencedAtom.cs
@@ -15,7 +15,7 @@ private static void CentreBox(Box box, double axis)
box.Shift = -(totalHeight / 2 - box.Height) - axis;
}
- public FencedAtom(SourceSpan source, Atom baseAtom, SymbolAtom leftDelimeter, SymbolAtom rightDelimeter)
+ public FencedAtom(SourceSpan? source, Atom? baseAtom, SymbolAtom? leftDelimeter, SymbolAtom? rightDelimeter)
: base(source)
{
this.BaseAtom = baseAtom ?? new RowAtom(null);
@@ -25,9 +25,9 @@ public FencedAtom(SourceSpan source, Atom baseAtom, SymbolAtom leftDelimeter, Sy
public Atom BaseAtom { get; }
- private SymbolAtom LeftDelimeter { get; }
+ private SymbolAtom? LeftDelimeter { get; }
- private SymbolAtom RightDelimeter { get; }
+ private SymbolAtom? RightDelimeter { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/FixedCharAtom.cs b/src/WpfMath/Atoms/FixedCharAtom.cs
index c0f907d4..231133f0 100644
--- a/src/WpfMath/Atoms/FixedCharAtom.cs
+++ b/src/WpfMath/Atoms/FixedCharAtom.cs
@@ -5,7 +5,7 @@ namespace WpfMath.Atoms
// Atom representing character that does not depend on text style.
internal class FixedCharAtom : CharSymbol
{
- public FixedCharAtom(SourceSpan source, CharFont charFont)
+ public FixedCharAtom(SourceSpan? source, CharFont charFont)
: base(source)
{
this.CharFont = charFont;
diff --git a/src/WpfMath/Atoms/FractionAtom.cs b/src/WpfMath/Atoms/FractionAtom.cs
index fac995fd..984f4d0d 100644
--- a/src/WpfMath/Atoms/FractionAtom.cs
+++ b/src/WpfMath/Atoms/FractionAtom.cs
@@ -23,9 +23,9 @@ private static TexAlignment CheckAlignment(TexAlignment alignment)
private readonly double? lineRelativeThickness;
public FractionAtom(
- SourceSpan source,
- Atom numerator,
- Atom denominator,
+ SourceSpan? source,
+ Atom? numerator,
+ Atom? denominator,
double relativeThickness,
TexAlignment numeratorAlignment,
TexAlignment denominatorAlignment)
@@ -35,9 +35,9 @@ public FractionAtom(
}
public FractionAtom(
- SourceSpan source,
- Atom numerator,
- Atom denominator,
+ SourceSpan? source,
+ Atom? numerator,
+ Atom? denominator,
bool drawLine,
TexAlignment numeratorAlignment,
TexAlignment denominatorAlignment)
@@ -47,15 +47,15 @@ public FractionAtom(
this.denominatorAlignment = CheckAlignment(denominatorAlignment);
}
- public FractionAtom(SourceSpan source, Atom numerator, Atom denominator, bool drawLine)
+ public FractionAtom(SourceSpan? source, Atom? numerator, Atom? denominator, bool drawLine)
: this(source, numerator, denominator, drawLine, TexUnit.Pixel, 0d)
{
}
public FractionAtom(
- SourceSpan source,
- Atom numerator,
- Atom denominator,
+ SourceSpan? source,
+ Atom? numerator,
+ Atom? denominator,
TexUnit unit,
double thickness,
TexAlignment numeratorAlignment,
@@ -66,15 +66,15 @@ public FractionAtom(
this.denominatorAlignment = CheckAlignment(denominatorAlignment);
}
- public FractionAtom(SourceSpan source, Atom numerator, Atom denominator, TexUnit unit, double thickness)
+ public FractionAtom(SourceSpan? source, Atom? numerator, Atom? denominator, TexUnit unit, double thickness)
: this(source, numerator, denominator, false, unit, thickness)
{
}
protected FractionAtom(
- SourceSpan source,
- Atom numerator,
- Atom denominator,
+ SourceSpan? source,
+ Atom? numerator,
+ Atom? denominator,
bool useDefaultThickness,
TexUnit unit,
double thickness)
@@ -91,9 +91,9 @@ protected FractionAtom(
this.lineThickness = thickness;
}
- public Atom Numerator { get; }
+ public Atom? Numerator { get; }
- public Atom Denominator { get; }
+ public Atom? Denominator { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/IRow.cs b/src/WpfMath/Atoms/IRow.cs
index 02b66807..727b06a7 100644
--- a/src/WpfMath/Atoms/IRow.cs
+++ b/src/WpfMath/Atoms/IRow.cs
@@ -6,6 +6,6 @@ namespace WpfMath
internal interface IRow
{
// Dummy atom representing atom just before first child atom.
- Atom WithPreviousAtom(DummyAtom previousAtom);
+ Atom WithPreviousAtom(DummyAtom? previousAtom);
}
}
diff --git a/src/WpfMath/Atoms/MatrixAtom.cs b/src/WpfMath/Atoms/MatrixAtom.cs
index e2a66b3d..340ac430 100644
--- a/src/WpfMath/Atoms/MatrixAtom.cs
+++ b/src/WpfMath/Atoms/MatrixAtom.cs
@@ -13,20 +13,20 @@ internal class MatrixAtom : Atom
public const double DefaultPadding = 0.35;
public MatrixAtom(
- SourceSpan source,
- IEnumerable> cells,
+ SourceSpan? source,
+ IEnumerable> cells,
MatrixCellAlignment matrixCellAlignment,
double verticalPadding = DefaultPadding,
double horizontalPadding = DefaultPadding) : base(source)
{
- MatrixCells = new ReadOnlyCollection>(
- cells.Select(row => new ReadOnlyCollection(row.ToList())).ToList());
+ MatrixCells = new ReadOnlyCollection>(
+ cells.Select(row => new ReadOnlyCollection(row.ToList())).ToList());
MatrixCellAlignment = matrixCellAlignment;
VerticalPadding = verticalPadding;
HorizontalPadding = horizontalPadding;
}
- public ReadOnlyCollection> MatrixCells { get; }
+ public ReadOnlyCollection> MatrixCells { get; }
public double VerticalPadding { get; }
@@ -45,7 +45,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
return ApplyCellPaddings(environment, cells, columnCount, matrixCellGaps);
}
- private IEnumerable CreateRowCellBoxes(TexEnvironment environment, ReadOnlyCollection row) =>
+ private IEnumerable CreateRowCellBoxes(TexEnvironment environment, ReadOnlyCollection row) =>
row.Select(atom => atom == null ? StrutBox.Empty : atom.CreateBox(environment));
///
@@ -142,7 +142,7 @@ Tuple GetTopBottomPadding(int i, int j)
return new Tuple(topBox, bottomBox);
}
- Tuple GetLeftRightPadding(int i, int j)
+ Tuple GetLeftRightPadding(int i, int j)
{
var value = matrixCellGaps[i][j].Horizontal;
var leftPadding = MatrixCellAlignment == MatrixCellAlignment.Left ? 0.0 : value;
@@ -151,7 +151,7 @@ Tuple GetLeftRightPadding(int i, int j)
? null
: new StrutBox(HorizontalPadding / 2 + leftPadding, 0.0, 0.0, 0.0);
var rightBox = new StrutBox(HorizontalPadding / 2 + rightPadding, 0.0, 0.0, 0.0);
- return new Tuple(leftBox, rightBox);
+ return new Tuple(leftBox, rightBox);
}
}
diff --git a/src/WpfMath/Atoms/NullAtom.cs b/src/WpfMath/Atoms/NullAtom.cs
index f421caaa..7c6160aa 100644
--- a/src/WpfMath/Atoms/NullAtom.cs
+++ b/src/WpfMath/Atoms/NullAtom.cs
@@ -4,7 +4,7 @@ namespace WpfMath.Atoms
{
internal class NullAtom : Atom
{
- public NullAtom(SourceSpan source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
+ public NullAtom(SourceSpan? source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
{
}
diff --git a/src/WpfMath/Atoms/OverUnderDelimiter.cs b/src/WpfMath/Atoms/OverUnderDelimiter.cs
index c32387b1..45ebacdc 100644
--- a/src/WpfMath/Atoms/OverUnderDelimiter.cs
+++ b/src/WpfMath/Atoms/OverUnderDelimiter.cs
@@ -7,7 +7,7 @@ namespace WpfMath
// Atom representing other atom with delimeter and script atoms over or under it.
internal class OverUnderDelimiter : Atom
{
- private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box scriptBox)
+ private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box? scriptBox)
{
var maxWidth = Math.Max(baseBox.Width, delimeterBox.Height + delimeterBox.Depth);
if (scriptBox != null)
@@ -16,9 +16,9 @@ private static double GetMaxWidth(Box baseBox, Box delimeterBox, Box scriptBox)
}
public OverUnderDelimiter(
- SourceSpan source,
- Atom baseAtom,
- Atom script,
+ SourceSpan? source,
+ Atom? baseAtom,
+ Atom? script,
SymbolAtom symbol,
TexUnit kernUnit,
double kern,
@@ -32,9 +32,9 @@ public OverUnderDelimiter(
this.Over = over;
}
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
- private Atom Script { get; }
+ private Atom? Script { get; }
private SymbolAtom Symbol { get; }
@@ -49,7 +49,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
// Create boxes for base, delimeter, and script atoms.
var baseBox = this.BaseAtom == null ? StrutBox.Empty : this.BaseAtom.CreateBox(environment);
var delimeterBox = DelimiterFactory.CreateBox(this.Symbol.Name, baseBox.Width, environment);
- var scriptBox = this.Script == null ? null : this.Script.CreateBox(this.Over ?
+ Box? scriptBox = this.Script == null ? null : this.Script.CreateBox(this.Over ?
environment.GetSuperscriptStyle() : environment.GetSubscriptStyle());
// Create centered horizontal box if any box is smaller than maximum width.
diff --git a/src/WpfMath/Atoms/OverlinedAtom.cs b/src/WpfMath/Atoms/OverlinedAtom.cs
index a29ab1b8..8b9f98f0 100644
--- a/src/WpfMath/Atoms/OverlinedAtom.cs
+++ b/src/WpfMath/Atoms/OverlinedAtom.cs
@@ -5,13 +5,13 @@ namespace WpfMath.Atoms
// Atom representing other atom with horizontal rule above it.
internal class OverlinedAtom : Atom
{
- public OverlinedAtom(SourceSpan source, Atom baseAtom)
+ public OverlinedAtom(SourceSpan? source, Atom? baseAtom)
: base(source)
{
this.BaseAtom = baseAtom;
}
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/PhantomAtom.cs b/src/WpfMath/Atoms/PhantomAtom.cs
index e3e909b6..5149776d 100644
--- a/src/WpfMath/Atoms/PhantomAtom.cs
+++ b/src/WpfMath/Atoms/PhantomAtom.cs
@@ -10,8 +10,8 @@ internal class PhantomAtom : Atom, IRow
private readonly bool useDepth;
public PhantomAtom(
- SourceSpan source,
- Atom baseAtom,
+ SourceSpan? source,
+ Atom? baseAtom,
bool useWidth = true,
bool useHeight = true,
bool useDepth = true)
@@ -23,7 +23,7 @@ public PhantomAtom(
this.useDepth = useDepth;
}
- public Atom WithPreviousAtom(DummyAtom previousAtom) =>
+ public Atom WithPreviousAtom(DummyAtom? previousAtom) =>
new PhantomAtom(
this.Source,
this.RowAtom.WithPreviousAtom(previousAtom),
diff --git a/src/WpfMath/Atoms/Radical.cs b/src/WpfMath/Atoms/Radical.cs
index 6bc0040a..a640cc42 100644
--- a/src/WpfMath/Atoms/Radical.cs
+++ b/src/WpfMath/Atoms/Radical.cs
@@ -13,7 +13,7 @@ internal class Radical : Atom
private const double scale = 0.55;
- public Radical(SourceSpan source, Atom baseAtom, Atom degreeAtom = null)
+ public Radical(SourceSpan? source, Atom baseAtom, Atom? degreeAtom = null)
: base(source)
{
this.BaseAtom = baseAtom;
@@ -22,7 +22,7 @@ public Radical(SourceSpan source, Atom baseAtom, Atom degreeAtom = null)
public Atom BaseAtom { get; }
- public Atom DegreeAtom { get; }
+ public Atom? DegreeAtom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/RowAtom.cs b/src/WpfMath/Atoms/RowAtom.cs
index 96026f1d..b7383415 100644
--- a/src/WpfMath/Atoms/RowAtom.cs
+++ b/src/WpfMath/Atoms/RowAtom.cs
@@ -34,56 +34,51 @@ static RowAtom()
ligatureKernChangeSet.Set((int)TexAtomType.Punctuation, true);
}
- public RowAtom(SourceSpan source, Atom baseAtom)
+ public RowAtom(SourceSpan? source, Atom? baseAtom)
: this(
source,
baseAtom is RowAtom
? (IEnumerable) ((RowAtom) baseAtom).Elements
- : new[] { baseAtom })
+ : new[] { baseAtom! }) // Nullable: Seems to require some sort of non-null assertion to make the analyzer happy
{
}
- public RowAtom(SourceSpan source)
+ public RowAtom(SourceSpan? source)
: base(source)
{
this.Elements = new List().AsReadOnly();
}
- private RowAtom(SourceSpan source, DummyAtom previousAtom, ReadOnlyCollection elements)
+ private RowAtom(SourceSpan? source, DummyAtom? previousAtom, ReadOnlyCollection elements)
: base(source)
{
this.PreviousAtom = previousAtom;
this.Elements = elements;
}
- internal RowAtom(SourceSpan source, IEnumerable elements)
+ internal RowAtom(SourceSpan? source, IEnumerable elements)
: base(source) =>
- this.Elements = elements.Where(x => x != null).ToList().AsReadOnly();
+ this.Elements = elements.Where(x => x != null).ToList().AsReadOnly()!;
// TODO[F]: Fix this with C# 8 migration: there shouldn't be nullable atoms in this collection
- public DummyAtom PreviousAtom { get; }
+ public DummyAtom? PreviousAtom { get; }
public ReadOnlyCollection Elements { get; }
- public Atom WithPreviousAtom(DummyAtom previousAtom) =>
+ public Atom WithPreviousAtom(DummyAtom? previousAtom) =>
new RowAtom(this.Source, previousAtom, this.Elements);
- public RowAtom WithSource(SourceSpan source) =>
+ public RowAtom WithSource(SourceSpan? source) =>
new RowAtom(source, this.PreviousAtom, this.Elements);
public RowAtom Add(Atom atom)
{
- if (atom is null) // TODO[F]: Mark the parameter as non-nullable and drop this check whe porting to C# 8
- {
- return new RowAtom(this.Source, this.PreviousAtom, this.Elements);
- }
-
var newElements = this.Elements.ToList();
newElements.Add(atom);
return new RowAtom(this.Source, this.PreviousAtom, newElements.AsReadOnly());
}
- private static DummyAtom ChangeAtomToOrdinary(DummyAtom currentAtom, DummyAtom previousAtom, Atom nextAtom)
+ private static DummyAtom ChangeAtomToOrdinary(DummyAtom currentAtom, DummyAtom? previousAtom, Atom? nextAtom)
{
var type = currentAtom.GetLeftType();
if (type == TexAtomType.BinaryOperator && (previousAtom == null ||
diff --git a/src/WpfMath/Atoms/ScriptsAtom.cs b/src/WpfMath/Atoms/ScriptsAtom.cs
index 7410a859..179c68a0 100644
--- a/src/WpfMath/Atoms/ScriptsAtom.cs
+++ b/src/WpfMath/Atoms/ScriptsAtom.cs
@@ -8,7 +8,7 @@ internal class ScriptsAtom : Atom
{
private static readonly SpaceAtom scriptSpaceAtom = new SpaceAtom(null, TexUnit.Point, 0.5, 0, 0);
- public ScriptsAtom(SourceSpan source, Atom baseAtom, Atom subscriptAtom, Atom superscriptAtom)
+ public ScriptsAtom(SourceSpan? source, Atom? baseAtom, Atom? subscriptAtom, Atom? superscriptAtom)
: base(source)
{
this.BaseAtom = baseAtom;
@@ -16,11 +16,11 @@ public ScriptsAtom(SourceSpan source, Atom baseAtom, Atom subscriptAtom, Atom su
this.SuperscriptAtom = superscriptAtom;
}
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
- public Atom SubscriptAtom { get; }
+ public Atom? SubscriptAtom { get; }
- public Atom SuperscriptAtom { get; }
+ public Atom? SuperscriptAtom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
@@ -57,9 +57,9 @@ protected override Box CreateBoxCore(TexEnvironment environment)
var delta = 0d;
double shiftUp, shiftDown;
- if (this.BaseAtom is AccentedAtom)
+ if (this.BaseAtom is AccentedAtom accentedAtom && accentedAtom.BaseAtom != null)
{
- var accentedBox = ((AccentedAtom)this.BaseAtom).BaseAtom.CreateBox(environment.GetCrampedStyle());
+ var accentedBox = accentedAtom.BaseAtom.CreateBox(environment.GetCrampedStyle());
shiftUp = accentedBox.Height - texFont.GetSupDrop(superscriptStyle.Style);
shiftDown = accentedBox.Depth + texFont.GetSubDrop(subscriptStyle.Style);
}
@@ -102,10 +102,10 @@ protected override Box CreateBoxCore(TexEnvironment environment)
shiftDown = baseBox.Depth + texFont.GetSubDrop(subscriptStyle.Style);
}
- Box superscriptBox = null;
- Box superscriptContainerBox = null;
- Box subscriptBox = null;
- Box subscriptContainerBox = null;
+ Box? superscriptBox = null;
+ Box? superscriptContainerBox = null;
+ Box? subscriptBox = null;
+ Box? subscriptContainerBox = null;
if (this.SuperscriptAtom != null)
{
@@ -141,6 +141,9 @@ protected override Box CreateBoxCore(TexEnvironment environment)
// Check if only superscript is set.
if (subscriptBox == null)
{
+ if (superscriptContainerBox == null)
+ throw new Exception("ScriptsAtom with neither subscript nor superscript defined");
+
superscriptContainerBox.Shift = -shiftUp;
resultBox.Add(superscriptContainerBox);
return resultBox;
@@ -149,6 +152,9 @@ protected override Box CreateBoxCore(TexEnvironment environment)
// Check if only subscript is set.
if (superscriptBox == null)
{
+ if (subscriptContainerBox == null)
+ throw new Exception("ScriptsAtom with neither subscript nor superscript defined");
+
subscriptContainerBox.Shift = Math.Max(Math.Max(shiftDown, texFont.GetSub1(style)), subscriptBox.Height - 4 *
Math.Abs(texFont.GetXHeight(style, lastFontId)) / 5);
resultBox.Add(subscriptContainerBox);
@@ -177,6 +183,9 @@ protected override Box CreateBoxCore(TexEnvironment environment)
scriptsInterSpace = shiftUp - superscriptBox.Depth + shiftDown - subscriptBox.Height;
// Create box containing both superscript and subscript.
+ if (superscriptContainerBox == null || subscriptContainerBox == null)
+ throw new Exception($"ScriptsAtom with superscriptContainerBox = {superscriptContainerBox} and subscriptContainerBox = {subscriptContainerBox} is not supposed to be here");
+
var scriptsBox = new VerticalBox();
superscriptContainerBox.Shift = delta;
scriptsBox.Add(superscriptContainerBox);
@@ -191,12 +200,12 @@ protected override Box CreateBoxCore(TexEnvironment environment)
public override TexAtomType GetLeftType()
{
- return this.BaseAtom.GetLeftType();
+ return this.BaseAtom!.GetLeftType(); // Nullable TODO: This probably needs null checking
}
public override TexAtomType GetRightType()
{
- return this.BaseAtom.GetRightType();
+ return this.BaseAtom!.GetRightType(); // Nullable TODO: This probably needs null checking
}
}
}
diff --git a/src/WpfMath/Atoms/SpaceAtom.cs b/src/WpfMath/Atoms/SpaceAtom.cs
index 19b734fe..30d0d3d8 100644
--- a/src/WpfMath/Atoms/SpaceAtom.cs
+++ b/src/WpfMath/Atoms/SpaceAtom.cs
@@ -46,7 +46,7 @@ public static void CheckUnit(TexUnit unit)
private readonly TexUnit depthUnit;
public SpaceAtom(
- SourceSpan source,
+ SourceSpan? source,
TexUnit widthUnit,
double width,
TexUnit heightUnit,
@@ -68,7 +68,7 @@ public SpaceAtom(
this.depth = depth;
}
- public SpaceAtom(SourceSpan source, TexUnit unit, double width, double height, double depth)
+ public SpaceAtom(SourceSpan? source, TexUnit unit, double width, double height, double depth)
: base(source)
{
CheckUnit(unit);
@@ -82,7 +82,7 @@ public SpaceAtom(SourceSpan source, TexUnit unit, double width, double height, d
this.depth = depth;
}
- public SpaceAtom(SourceSpan source)
+ public SpaceAtom(SourceSpan? source)
: base(source)
{
this.isHardSpace = true;
diff --git a/src/WpfMath/Atoms/StyledAtom.cs b/src/WpfMath/Atoms/StyledAtom.cs
index db065274..878c42e1 100644
--- a/src/WpfMath/Atoms/StyledAtom.cs
+++ b/src/WpfMath/Atoms/StyledAtom.cs
@@ -6,7 +6,7 @@ namespace WpfMath.Atoms
// Atom specifying graphical style.
internal class StyledAtom : Atom, IRow
{
- public StyledAtom(SourceSpan source, Atom atom, Brush backgroundColor, Brush foregroundColor)
+ public StyledAtom(SourceSpan? source, Atom? atom, Brush? backgroundColor, Brush? foregroundColor)
: base(source)
{
this.RowAtom = new RowAtom(source, atom);
@@ -17,11 +17,11 @@ public StyledAtom(SourceSpan source, Atom atom, Brush backgroundColor, Brush for
// RowAtom to which colors are applied.
public RowAtom RowAtom { get; }
- public Brush Background { get; }
+ public Brush? Background { get; }
- public Brush Foreground { get; }
+ public Brush? Foreground { get; }
- public Atom WithPreviousAtom(DummyAtom previousAtom)
+ public Atom WithPreviousAtom(DummyAtom? previousAtom)
{
var rowAtom = this.RowAtom.WithPreviousAtom(previousAtom);
return new StyledAtom(this.Source, rowAtom, this.Background, this.Foreground);
@@ -49,9 +49,9 @@ public override TexAtomType GetRightType()
}
public StyledAtom Clone(
- RowAtom rowAtom = null,
- Brush background = null,
- Brush foreground = null)
+ RowAtom? rowAtom = null,
+ Brush? background = null,
+ Brush? foreground = null)
{
return new StyledAtom(
this.Source,
diff --git a/src/WpfMath/Atoms/SymbolAtom.cs b/src/WpfMath/Atoms/SymbolAtom.cs
index 7045bdea..d85c3320 100644
--- a/src/WpfMath/Atoms/SymbolAtom.cs
+++ b/src/WpfMath/Atoms/SymbolAtom.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using WpfMath.Utils;
namespace WpfMath.Atoms
@@ -14,7 +15,7 @@ internal class SymbolAtom : CharSymbol
internal const string EmptyDelimiterName = "_emptyDelimiter";
// Dictionary of definitions of all symbols, keyed by name.
- private static readonly IDictionary> symbols;
+ private static readonly IDictionary> symbols;
// Set of all valid symbol types.
private static BitArray validSymbolTypes;
@@ -35,7 +36,11 @@ static SymbolAtom()
validSymbolTypes.Set((int)TexAtomType.Accent, true);
}
- public static bool TryGetAtom(string name, SourceSpan source, out SymbolAtom atom)
+#if !NET452
+ public static bool TryGetAtom(string name, SourceSpan? source, [NotNullWhen(true)] out SymbolAtom? atom)
+#else
+ public static bool TryGetAtom(string name, SourceSpan? source, out SymbolAtom? atom)
+#endif
{
if (!symbols.TryGetValue(name, out var factory))
{
@@ -48,13 +53,19 @@ public static bool TryGetAtom(string name, SourceSpan source, out SymbolAtom ato
return true;
}
- public static SymbolAtom GetAtom(string name, SourceSpan source) =>
+ public static SymbolAtom GetAtom(string name, SourceSpan? source) =>
TryGetAtom(name, source, out var atom) ? atom : throw new SymbolNotFoundException(name);
- public static bool TryGetAtom(SourceSpan name, out SymbolAtom atom) =>
- TryGetAtom(name.ToString(), name, out atom);
+#if !NET452
+ public static bool TryGetAtom(SourceSpan name, [NotNullWhen(true)] out SymbolAtom? atom)
+#else
+ public static bool TryGetAtom(SourceSpan name, out SymbolAtom? atom)
+#endif
+ {
+ return TryGetAtom(name.ToString(), name, out atom);
+ }
- public SymbolAtom(SourceSpan source, SymbolAtom symbolAtom, TexAtomType type)
+ public SymbolAtom(SourceSpan? source, SymbolAtom symbolAtom, TexAtomType type)
: base(source, type)
{
if (!validSymbolTypes[(int)type])
@@ -63,7 +74,7 @@ public SymbolAtom(SourceSpan source, SymbolAtom symbolAtom, TexAtomType type)
this.IsDelimeter = symbolAtom.IsDelimeter;
}
- public SymbolAtom(SourceSpan source, string name, TexAtomType type, bool isDelimeter)
+ public SymbolAtom(SourceSpan? source, string name, TexAtomType type, bool isDelimeter)
: base(source, type)
{
this.Name = name;
diff --git a/src/WpfMath/Atoms/TypedAtom.cs b/src/WpfMath/Atoms/TypedAtom.cs
index 5c7ce6db..49515a95 100644
--- a/src/WpfMath/Atoms/TypedAtom.cs
+++ b/src/WpfMath/Atoms/TypedAtom.cs
@@ -5,7 +5,7 @@ namespace WpfMath.Atoms
// Atom representing other atom with custom left and right types.
internal class TypedAtom : Atom
{
- public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType rightType)
+ public TypedAtom(SourceSpan? source, Atom? atom, TexAtomType leftType, TexAtomType rightType)
: base(source)
{
this.Atom = atom;
@@ -13,14 +13,14 @@ public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType
this.RightType = rightType;
}
- public Atom Atom { get; }
+ public Atom? Atom { get; }
public TexAtomType LeftType { get; }
public TexAtomType RightType { get; }
protected override Box CreateBoxCore(TexEnvironment environment) =>
- this.Atom.CreateBox(environment);
+ this.Atom!.CreateBox(environment); // Nullable TODO: This probably needs null checking
public override TexAtomType GetLeftType()
{
diff --git a/src/WpfMath/Atoms/UnderOverAtom.cs b/src/WpfMath/Atoms/UnderOverAtom.cs
index 09b10fc6..27be3548 100644
--- a/src/WpfMath/Atoms/UnderOverAtom.cs
+++ b/src/WpfMath/Atoms/UnderOverAtom.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics.CodeAnalysis;
using WpfMath.Boxes;
namespace WpfMath.Atoms
@@ -6,7 +7,10 @@ namespace WpfMath.Atoms
// Atom representing other atom with atoms optionally over and under it.
internal class UnderOverAtom : Atom
{
- private static Box ChangeWidth(Box box, double maxWidth)
+#if !NET452
+ [return: NotNullIfNotNull("box")]
+#endif
+ private static Box? ChangeWidth(Box? box, double maxWidth)
{
if (box != null && Math.Abs(maxWidth - box.Width) > TexUtilities.FloatPrecision)
return new HorizontalBox(box, maxWidth, TexAlignment.Center);
@@ -15,9 +19,9 @@ private static Box ChangeWidth(Box box, double maxWidth)
}
public UnderOverAtom(
- SourceSpan source,
- Atom baseAtom,
- Atom underOver,
+ SourceSpan? source,
+ Atom? baseAtom,
+ Atom? underOver,
TexUnit underOverUnit,
double underOverSpace,
bool underOverScriptSize,
@@ -53,13 +57,13 @@ public UnderOverAtom(
}
public UnderOverAtom(
- SourceSpan source,
- Atom baseAtom,
- Atom under,
+ SourceSpan? source,
+ Atom? baseAtom,
+ Atom? under,
TexUnit underUnit,
double underSpace,
bool underScriptSize,
- Atom over,
+ Atom? over,
TexUnit overUnit,
double overSpace,
bool overScriptSize)
@@ -79,11 +83,11 @@ public UnderOverAtom(
this.OverScriptSmaller = overScriptSize;
}
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
- public Atom UnderAtom { get; }
+ public Atom? UnderAtom { get; }
- public Atom OverAtom { get; }
+ public Atom? OverAtom { get; }
// Kern between base and under atom.
public double UnderSpace { get; }
@@ -105,7 +109,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
var baseBox = this.BaseAtom == null ? StrutBox.Empty : this.BaseAtom.CreateBox(environment);
// Create boxes for over and under atoms.
- Box overBox = null, underBox = null;
+ Box? overBox = null, underBox = null;
var maxWidth = baseBox.Width;
if (this.OverAtom != null)
@@ -128,7 +132,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
// Create and add box for over atom.
if (this.OverAtom != null)
{
- resultBox.Add(ChangeWidth(overBox, maxWidth));
+ resultBox.Add(ChangeWidth(overBox!, maxWidth));
resultBox.Add(new SpaceAtom(null, this.OverSpaceUnit, 0, this.OverSpace, 0).CreateBox(environment));
}
@@ -141,7 +145,7 @@ protected override Box CreateBoxCore(TexEnvironment environment)
if (this.UnderAtom != null)
{
resultBox.Add(new SpaceAtom(null, this.OverSpaceUnit, 0, this.UnderSpace, 0).CreateBox(environment));
- resultBox.Add(ChangeWidth(underBox, maxWidth));
+ resultBox.Add(ChangeWidth(underBox!, maxWidth));
}
resultBox.Depth = resultBox.Height + resultBox.Depth - totalHeight;
diff --git a/src/WpfMath/Atoms/UnderlinedAtom.cs b/src/WpfMath/Atoms/UnderlinedAtom.cs
index f19bebfd..88be9fbc 100644
--- a/src/WpfMath/Atoms/UnderlinedAtom.cs
+++ b/src/WpfMath/Atoms/UnderlinedAtom.cs
@@ -5,13 +5,13 @@ namespace WpfMath.Atoms
// Atom representing other atom that is underlined.
internal class UnderlinedAtom : Atom
{
- public UnderlinedAtom(SourceSpan source, Atom baseAtom)
+ public UnderlinedAtom(SourceSpan? source, Atom? baseAtom)
: base(source)
{
this.BaseAtom = baseAtom;
}
- public Atom BaseAtom { get; }
+ public Atom? BaseAtom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
diff --git a/src/WpfMath/Atoms/VerticalCenteredAtom.cs b/src/WpfMath/Atoms/VerticalCenteredAtom.cs
index 6cf528f7..bb2d7058 100644
--- a/src/WpfMath/Atoms/VerticalCenteredAtom.cs
+++ b/src/WpfMath/Atoms/VerticalCenteredAtom.cs
@@ -5,17 +5,17 @@ namespace WpfMath.Atoms
// Atom representing other atom vertically centered with respect to axis.
internal class VerticalCenteredAtom : Atom
{
- public VerticalCenteredAtom(SourceSpan source, Atom atom)
+ public VerticalCenteredAtom(SourceSpan? source, Atom? atom)
: base(source)
{
this.Atom = atom;
}
- public Atom Atom { get; }
+ public Atom? Atom { get; }
protected override Box CreateBoxCore(TexEnvironment environment)
{
- var box = this.Atom.CreateBox(environment);
+ var box = this.Atom!.CreateBox(environment); // Nullable TODO: This probably needs null checking
// Centre box relative to horizontal axis.
var totalHeight = box.Height + box.Depth;
diff --git a/src/WpfMath/Boxes/Box.cs b/src/WpfMath/Boxes/Box.cs
index be760846..3cdf8479 100644
--- a/src/WpfMath/Boxes/Box.cs
+++ b/src/WpfMath/Boxes/Box.cs
@@ -21,7 +21,7 @@ protected Box()
{
}
- protected Box(Brush foreground, Brush background)
+ protected Box(Brush? foreground, Brush? background)
{
this.children = new List();
this.childrenReadOnly = new ReadOnlyCollection(this.children);
@@ -34,19 +34,19 @@ public ReadOnlyCollection Children
get { return this.childrenReadOnly; }
}
- public SourceSpan Source
+ public SourceSpan? Source
{
get;
set;
}
- public Brush Foreground
+ public Brush? Foreground
{
get;
set;
}
- public Brush Background
+ public Brush? Background
{
get;
set;
diff --git a/src/WpfMath/Boxes/HorizontalBox.cs b/src/WpfMath/Boxes/HorizontalBox.cs
index de95bc9d..7b1e8537 100644
--- a/src/WpfMath/Boxes/HorizontalBox.cs
+++ b/src/WpfMath/Boxes/HorizontalBox.cs
@@ -38,7 +38,7 @@ public HorizontalBox(Box box)
this.Add(box);
}
- public HorizontalBox(Brush foreground, Brush background)
+ public HorizontalBox(Brush? foreground, Brush? background)
: base(foreground, background)
{
}
diff --git a/src/WpfMath/Boxes/OverUnderBox.cs b/src/WpfMath/Boxes/OverUnderBox.cs
index 492b6908..fe9da4c6 100644
--- a/src/WpfMath/Boxes/OverUnderBox.cs
+++ b/src/WpfMath/Boxes/OverUnderBox.cs
@@ -6,7 +6,7 @@ namespace WpfMath.Boxes
// Box representing other box with delimiter and script box over or under it.
internal class OverUnderBox : Box
{
- public OverUnderBox(Box baseBox, Box delimiterBox, Box scriptBox, double kern, bool over)
+ public OverUnderBox(Box baseBox, Box delimiterBox, Box? scriptBox, double kern, bool over)
: base()
{
this.BaseBox = baseBox;
@@ -35,7 +35,7 @@ public Box DelimiterBox
private set;
}
- public Box ScriptBox
+ public Box? ScriptBox
{
get;
private set;
@@ -69,7 +69,7 @@ public override void RenderTo(IElementRenderer renderer, double x, double y)
RenderDelimiter(translationX, translationY);
// Draw script box as superscript.
- RenderScriptBox(centerY - this.Kern - this.ScriptBox.Depth);
+ RenderScriptBox(centerY - this.Kern - this.ScriptBox!.Depth); // Nullable TODO: This probably needs null checking
}
else
{
@@ -81,7 +81,7 @@ public override void RenderTo(IElementRenderer renderer, double x, double y)
RenderDelimiter(translationX, translationY);
// Draw script box as subscript.
- RenderScriptBox(centerY + this.Kern + this.ScriptBox.Height);
+ RenderScriptBox(centerY + this.Kern + this.ScriptBox!.Height); // Nullable TODO: This probably needs null checking
}
void RenderDelimiter(double translationX, double translationY)
diff --git a/src/WpfMath/Controls/FormulaControl.xaml.cs b/src/WpfMath/Controls/FormulaControl.xaml.cs
index fa4b7413..2b16f185 100644
--- a/src/WpfMath/Controls/FormulaControl.xaml.cs
+++ b/src/WpfMath/Controls/FormulaControl.xaml.cs
@@ -15,7 +15,7 @@ namespace WpfMath.Controls
public partial class FormulaControl : UserControl
{
private static TexFormulaParser formulaParser = new TexFormulaParser();
- private TexFormula texFormula;
+ private TexFormula? texFormula;
public string Formula
{
diff --git a/src/WpfMath/Controls/VisualContainerElement.cs b/src/WpfMath/Controls/VisualContainerElement.cs
index a7da708d..39bf3236 100644
--- a/src/WpfMath/Controls/VisualContainerElement.cs
+++ b/src/WpfMath/Controls/VisualContainerElement.cs
@@ -9,7 +9,7 @@ namespace WpfMath.Controls
{
public class VisualContainerElement : FrameworkElement
{
- private DrawingVisual visual;
+ private DrawingVisual? visual;
public VisualContainerElement()
: base()
@@ -17,7 +17,7 @@ public VisualContainerElement()
this.visual = null;
}
- public DrawingVisual Visual
+ public DrawingVisual? Visual
{
get { return this.visual; }
set
@@ -36,7 +36,7 @@ protected override int VisualChildrenCount
get { return 1; }
}
- protected override Visual GetVisualChild(int index)
+ protected override Visual? GetVisualChild(int index)
{
return this.visual;
}
diff --git a/src/WpfMath/Converters/SVGConverter.cs b/src/WpfMath/Converters/SVGConverter.cs
index 67c9e713..a550d853 100644
--- a/src/WpfMath/Converters/SVGConverter.cs
+++ b/src/WpfMath/Converters/SVGConverter.cs
@@ -15,8 +15,7 @@ public class SVGConverter
public string ConvertGeometry(Geometry geometry)
{
StringBuilder svgOutput = new StringBuilder();
- GeometryGroup group = geometry as GeometryGroup;
- if (group != null)
+ if (geometry is GeometryGroup group)
{
AddGeometry(svgOutput, group);
}
@@ -76,75 +75,69 @@ private void AddGeometry(StringBuilder svgString, PathGeometry path)
foreach (PathSegment ps in pf.Segments)
{
- if (ps is PolyLineSegment)
+ if (ps is PolyLineSegment plSeg)
{
- PolyLineSegment seg = ps as PolyLineSegment;
- for (int i = 0; i < seg.Points.Count; ++i)
+ for (int i = 0; i < plSeg.Points.Count; ++i)
{
svgString.Append("L ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", plSeg.Points[i].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", plSeg.Points[i].Y);
}
}
- else if (ps is PolyBezierSegment)
+ else if (ps is PolyBezierSegment pbSeg)
{
- PolyBezierSegment seg = ps as PolyBezierSegment;
- for (int i = 0; i < seg.Points.Count; i += 3)
+ for (int i = 0; i < pbSeg.Points.Count; i += 3)
{
svgString.Append("C ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i].Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 1].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 1].Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 2].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 2].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 2].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pbSeg.Points[i + 2].Y);
}
}
- else if (ps is LineSegment)
+ else if (ps is LineSegment lSeg)
{
- LineSegment seg = ps as LineSegment;
svgString.Append("L ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", lSeg.Point.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", lSeg.Point.Y);
}
- else if (ps is BezierSegment)
+ else if (ps is BezierSegment bSeg)
{
- BezierSegment seg = ps as BezierSegment;
svgString.Append("C ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point1.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point1.Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point2.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point2.Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point3.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point3.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point3.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", bSeg.Point3.Y);
}
- else if (ps is QuadraticBezierSegment)
+ else if (ps is QuadraticBezierSegment qbSeg)
{
//Untested: BuildGeometry converts quadratic bezier to cubic
- QuadraticBezierSegment seg = ps as QuadraticBezierSegment;
svgString.Append("Q ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point1.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point1.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point1.Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Point2.Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point2.X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", qbSeg.Point2.Y);
}
- else if (ps is PolyQuadraticBezierSegment)
+ else if (ps is PolyQuadraticBezierSegment pqbSeg)
{
//Untested: BuildGeometry converts quadratic bezier to cubic
- PolyQuadraticBezierSegment seg = ps as PolyQuadraticBezierSegment;
- for (int i = 0; i < seg.Points.Count; i += 2)
+ for (int i = 0; i < pqbSeg.Points.Count; i += 2)
{
svgString.Append("Q ");
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i].Y);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].X);
- svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", seg.Points[i + 1].Y);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i + 1].X);
+ svgString.AppendFormat(CultureInfo.InvariantCulture, "{0} ", pqbSeg.Points[i + 1].Y);
}
}
else
diff --git a/src/WpfMath/DefaultTexFont.cs b/src/WpfMath/DefaultTexFont.cs
index 6435d5ed..5ac971f6 100644
--- a/src/WpfMath/DefaultTexFont.cs
+++ b/src/WpfMath/DefaultTexFont.cs
@@ -71,7 +71,7 @@ public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style)
// Create character for each part of extension.
var fontInfo = fontInfoList[charInfo.FontId];
var extension = fontInfo.GetExtension(charInfo.Character);
- var parts = new CharInfo[extension.Length];
+ var parts = new CharInfo?[extension.Length];
for (int i = 0; i < extension.Length; i++)
{
if (extension[i] == (int)TexCharKind.None)
@@ -92,7 +92,7 @@ public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style)
parts[TexFontUtilities.ExtensionBottom], parts[TexFontUtilities.ExtensionRepeat]);
}
- public CharFont GetLigature(CharFont leftCharFont, CharFont rightCharFont)
+ public CharFont? GetLigature(CharFont leftCharFont, CharFont rightCharFont)
{
if (leftCharFont.FontId != rightCharFont.FontId)
return null;
diff --git a/src/WpfMath/DefaultTexFontParser.cs b/src/WpfMath/DefaultTexFontParser.cs
index 5f3ac9ee..dd65905b 100644
--- a/src/WpfMath/DefaultTexFontParser.cs
+++ b/src/WpfMath/DefaultTexFontParser.cs
@@ -50,8 +50,11 @@ private static void SetCharChildParsers()
public DefaultTexFontParser()
{
- var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)));
+ var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!));
this.rootElement = doc.Root;
+
+ this.parsedTextStyles = new Dictionary();
+
ParseTextStyleMappings();
}
@@ -195,8 +198,6 @@ public IDictionary GetTextStyleMappings()
private void ParseTextStyleMappings()
{
- this.parsedTextStyles = new Dictionary();
-
var textStyleMappings = rootElement.Element("TextStyleMappings");
if (textStyleMappings == null)
throw new InvalidOperationException("Cannot find TextStyleMappings element.");
diff --git a/src/WpfMath/DelimiterFactory.cs b/src/WpfMath/DelimiterFactory.cs
index 31ca0722..7a93d165 100644
--- a/src/WpfMath/DelimiterFactory.cs
+++ b/src/WpfMath/DelimiterFactory.cs
@@ -9,7 +9,7 @@ namespace WpfMath
// Creates boxes containing delimeter symbol that exists in different sizes.
internal static class DelimiterFactory
{
- public static Box CreateBox(string symbol, double minHeight, TexEnvironment environment, SourceSpan source = null)
+ public static Box CreateBox(string symbol, double minHeight, TexEnvironment environment, SourceSpan? source = null)
{
var texFont = environment.MathFont;
var style = environment.Style;
@@ -43,25 +43,28 @@ public static Box CreateBox(string symbol, double minHeight, TexEnvironment envi
if (extension.Bottom != null)
resultBox.Add(new CharBox(environment, extension.Bottom) { Source = source });
- // Insert repeatable part multiple times until box is high enough.
- var repeatBox = new CharBox(environment, extension.Repeat) { Source = source };
- do
+ if (extension.Repeat != null)
{
- if (extension.Top != null && extension.Bottom != null)
+ // Insert repeatable part multiple times until box is high enough.
+ var repeatBox = new CharBox(environment, extension.Repeat) { Source = source };
+ do
{
- resultBox.Add(1, repeatBox);
- if (extension.Middle != null)
- resultBox.Add(resultBox.Children.Count - 1, repeatBox);
- }
- else if (extension.Bottom != null)
- {
- resultBox.Add(0, repeatBox);
- }
- else
- {
- resultBox.Add(repeatBox);
- }
- } while (resultBox.Height + resultBox.Depth < minHeight);
+ if (extension.Top != null && extension.Bottom != null)
+ {
+ resultBox.Add(1, repeatBox);
+ if (extension.Middle != null)
+ resultBox.Add(resultBox.Children.Count - 1, repeatBox);
+ }
+ else if (extension.Bottom != null)
+ {
+ resultBox.Add(0, repeatBox);
+ }
+ else
+ {
+ resultBox.Add(repeatBox);
+ }
+ } while (resultBox.Height + resultBox.Depth < minHeight);
+ }
return resultBox;
}
diff --git a/src/WpfMath/ExtensionChar.cs b/src/WpfMath/ExtensionChar.cs
index dce5fa8b..76f5a8d4 100644
--- a/src/WpfMath/ExtensionChar.cs
+++ b/src/WpfMath/ExtensionChar.cs
@@ -8,7 +8,7 @@ namespace WpfMath
// Extension character that contains character information for each of its parts.
internal class ExtensionChar
{
- public ExtensionChar(CharInfo top, CharInfo middle, CharInfo bottom, CharInfo repeat)
+ public ExtensionChar(CharInfo? top, CharInfo? middle, CharInfo? bottom, CharInfo? repeat)
{
this.Top = top;
this.Middle = middle;
@@ -16,25 +16,25 @@ public ExtensionChar(CharInfo top, CharInfo middle, CharInfo bottom, CharInfo re
this.Bottom = bottom;
}
- public CharInfo Top
+ public CharInfo? Top
{
get;
private set;
}
- public CharInfo Middle
+ public CharInfo? Middle
{
get;
private set;
}
- public CharInfo Bottom
+ public CharInfo? Bottom
{
get;
private set;
}
- public CharInfo Repeat
+ public CharInfo? Repeat
{
get;
private set;
diff --git a/src/WpfMath/GlueSettingsParser.cs b/src/WpfMath/GlueSettingsParser.cs
index 7a2f6c12..26117e2e 100644
--- a/src/WpfMath/GlueSettingsParser.cs
+++ b/src/WpfMath/GlueSettingsParser.cs
@@ -61,8 +61,12 @@ private static void SetStyleMappings()
public GlueSettingsParser()
{
- var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)));
+ var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!));
this.rootElement = doc.Root;
+
+ this.glueTypes = new List();
+ this.glueTypeMappings = new Dictionary();
+
ParseGlueTypes();
}
@@ -97,9 +101,6 @@ public IList GetGlueTypes()
private void ParseGlueTypes()
{
- this.glueTypes = new List();
- this.glueTypeMappings = new Dictionary();
-
int defaultIndex = -1;
int index = 0;
diff --git a/src/WpfMath/ITeXFont.cs b/src/WpfMath/ITeXFont.cs
index 15dc40d5..4b0406f4 100644
--- a/src/WpfMath/ITeXFont.cs
+++ b/src/WpfMath/ITeXFont.cs
@@ -14,7 +14,7 @@ internal interface ITeXFont
ExtensionChar GetExtension(CharInfo charInfo, TexStyle style);
- CharFont GetLigature(CharFont leftChar, CharFont rightChar);
+ CharFont? GetLigature(CharFont leftChar, CharFont rightChar);
CharInfo GetNextLargerCharInfo(CharInfo charInfo, TexStyle style);
diff --git a/src/WpfMath/Parsers/CommandParsers.cs b/src/WpfMath/Parsers/CommandParsers.cs
index d0148852..bdc337af 100644
--- a/src/WpfMath/Parsers/CommandParsers.cs
+++ b/src/WpfMath/Parsers/CommandParsers.cs
@@ -48,8 +48,8 @@ public CommandContext(
internal class CommandProcessingResult
{
- /// A parsed atom. May be null.
- public Atom Atom { get; }
+ /// A parsed atom..
+ public Atom? Atom { get; }
///
/// A position pointing to the part of the where the parsing should
@@ -63,7 +63,7 @@ internal class CommandProcessingResult
///
public AtomAppendMode AppendMode { get; }
- public CommandProcessingResult(Atom atom, int nextPosition, AtomAppendMode appendMode = AtomAppendMode.Add)
+ public CommandProcessingResult(Atom? atom, int nextPosition, AtomAppendMode appendMode = AtomAppendMode.Add)
{
Atom = atom;
NextPosition = nextPosition;
diff --git a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs
index 00ac207b..bcbb5dfe 100644
--- a/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs
+++ b/src/WpfMath/Parsers/Matrices/MatrixCommandParser.cs
@@ -8,13 +8,13 @@ namespace WpfMath.Parsers.Matrices
/// A parser for matrix-like constructs.
internal class MatrixCommandParser : ICommandParser
{
- private readonly string _leftDelimiterSymbolName;
- private readonly string _rightDelimiterSymbolName;
+ private readonly string? _leftDelimiterSymbolName;
+ private readonly string? _rightDelimiterSymbolName;
private readonly MatrixCellAlignment _cellAlignment;
public MatrixCommandParser(
- string leftDelimiterSymbolName,
- string rightDelimiterSymbolName,
+ string? leftDelimiterSymbolName,
+ string? rightDelimiterSymbolName,
MatrixCellAlignment cellAlignment)
{
_leftDelimiterSymbolName = leftDelimiterSymbolName;
@@ -38,14 +38,14 @@ public CommandProcessingResult ProcessCommand(CommandContext context)
var cells = ReadMatrixCells(context.Parser, context.Formula, cellsSource, context.Environment);
var matrix = new MatrixAtom(matrixSource, cells, _cellAlignment);
- SymbolAtom GetDelimiter(string name) =>
+ SymbolAtom? GetDelimiter(string? name) =>
name == null
? null
: TexFormulaParser.GetDelimiterSymbol(name, null) ??
throw new TexParseException($"The delimiter {name} could not be found");
- var leftDelimiter = GetDelimiter(_leftDelimiterSymbolName);
- var rightDelimiter = GetDelimiter(_rightDelimiterSymbolName);
+ SymbolAtom? leftDelimiter = GetDelimiter(_leftDelimiterSymbolName);
+ SymbolAtom? rightDelimiter = GetDelimiter(_rightDelimiterSymbolName);
var atom = leftDelimiter == null && rightDelimiter == null
? (Atom) matrix
diff --git a/src/WpfMath/Parsers/StandardCommands.cs b/src/WpfMath/Parsers/StandardCommands.cs
index df8784ed..34f3943f 100644
--- a/src/WpfMath/Parsers/StandardCommands.cs
+++ b/src/WpfMath/Parsers/StandardCommands.cs
@@ -39,9 +39,9 @@ public CommandProcessingResult ProcessCommand(CommandContext context)
context.Environment.CreateChildEnvironment());
var start = context.CommandNameStartPosition;
var atomSource = source.Segment(start, position - start);
- var topAtom = new List { topFormula.RootAtom };
- var bottomAtom = new List { bottomFormula.RootAtom };
- var atoms = new List> { topAtom, bottomAtom };
+ var topAtom = new List { topFormula.RootAtom };
+ var bottomAtom = new List { bottomFormula.RootAtom };
+ var atoms = new List> { topAtom, bottomAtom };
var matrixAtom = new MatrixAtom(atomSource, atoms, MatrixCellAlignment.Center);
var left = new SymbolAtom(atomSource, "(", TexAtomType.Opening, true);
var right = new SymbolAtom(atomSource, ")", TexAtomType.Closing, true);
@@ -76,7 +76,7 @@ public CommandProcessingResult ProcessCommand(CommandContext context)
: null;
var topRow = new[] {prevFormulaAtom};
- var rows = new List> {topRow};
+ var rows = new List> {topRow};
if (newMatrix != null)
{
rows.AddRange(newMatrix.MatrixCells);
diff --git a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs
index 09092584..5964123e 100644
--- a/src/WpfMath/PredefinedTexFormulaSettingsParser.cs
+++ b/src/WpfMath/PredefinedTexFormulaSettingsParser.cs
@@ -34,7 +34,7 @@ private static void AddToMap(IEnumerable mapList, string[] table)
public TexPredefinedFormulaSettingsParser()
{
- var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)));
+ var doc = XDocument.Load(new System.IO.StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)!));
this.rootElement = doc.Root;
}
diff --git a/src/WpfMath/SourceSpan.cs b/src/WpfMath/SourceSpan.cs
index c94efb95..2e4b0dd8 100644
--- a/src/WpfMath/SourceSpan.cs
+++ b/src/WpfMath/SourceSpan.cs
@@ -35,7 +35,7 @@ public SourceSpan(string sourceName, string source, int start, int length)
public SourceSpan Segment(int start) => new SourceSpan(SourceName, this.Source, this.Start + start, this.Length - start);
public SourceSpan Segment(int start, int length) => new SourceSpan(SourceName, this.Source, this.Start + start, length);
- public bool Equals(SourceSpan other)
+ public bool Equals(SourceSpan? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -45,7 +45,7 @@ public bool Equals(SourceSpan other)
&& string.Equals(SourceName, other.SourceName, StringComparison.Ordinal);
}
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/src/WpfMath/SystemFont.cs b/src/WpfMath/SystemFont.cs
index 609fba4b..1bfa26d7 100644
--- a/src/WpfMath/SystemFont.cs
+++ b/src/WpfMath/SystemFont.cs
@@ -24,7 +24,7 @@ public SystemFont(double size, FontFamily fontFamily)
public ExtensionChar GetExtension(CharInfo charInfo, TexStyle style) =>
throw MethodNotSupported(nameof(GetExtension));
- public CharFont GetLigature(CharFont leftChar, CharFont rightChar) => null;
+ public CharFont? GetLigature(CharFont leftChar, CharFont rightChar) => null;
public CharInfo GetNextLargerCharInfo(CharInfo charInfo, TexStyle style) =>
throw MethodNotSupported(nameof(GetNextLargerCharInfo));
diff --git a/src/WpfMath/TexEnvironment.cs b/src/WpfMath/TexEnvironment.cs
index 249ebefb..b6465cf8 100644
--- a/src/WpfMath/TexEnvironment.cs
+++ b/src/WpfMath/TexEnvironment.cs
@@ -13,7 +13,7 @@ public TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont)
{
}
- private TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont, Brush background, Brush foreground)
+ private TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont, Brush? background, Brush? foreground)
{
if (style == TexStyle.Display || style == TexStyle.Text ||
style == TexStyle.Script || style == TexStyle.ScriptScript)
@@ -41,13 +41,13 @@ public ITeXFont MathFont
public ITeXFont TextFont { get; }
- public Brush Background
+ public Brush? Background
{
get;
set;
}
- public Brush Foreground
+ public Brush? Foreground
{
get;
set;
diff --git a/src/WpfMath/TexFontInfo.cs b/src/WpfMath/TexFontInfo.cs
index bf34733e..58b6ad86 100644
--- a/src/WpfMath/TexFontInfo.cs
+++ b/src/WpfMath/TexFontInfo.cs
@@ -113,11 +113,10 @@ public double GetKern(char leftChar, char rightChar, double factor)
return kern * factor;
}
- public CharFont GetLigature(char left, char right)
+ public CharFont? GetLigature(char left, char right)
{
Tuple tpl = Tuple.Create(left, right);
- char ch;
- return this.ligatures.TryGetValue(tpl, out ch) ? new CharFont(ch, this.FontId) : null;
+ return this.ligatures.TryGetValue(tpl, out char ch) ? new CharFont(ch, this.FontId) : null;
}
public CharFont GetNextLarger(char character)
diff --git a/src/WpfMath/TexFormula.cs b/src/WpfMath/TexFormula.cs
index af77bbc3..00e09de2 100644
--- a/src/WpfMath/TexFormula.cs
+++ b/src/WpfMath/TexFormula.cs
@@ -10,19 +10,19 @@ namespace WpfMath
// Represents mathematical formula that can be rendered.
public sealed class TexFormula
{
- public string TextStyle
+ public string? TextStyle
{
get;
set;
}
- internal Atom RootAtom
+ internal Atom? RootAtom
{
get;
set;
}
- public SourceSpan Source { get; set; }
+ public SourceSpan? Source { get; set; }
public TexRenderer GetRenderer(TexStyle style, double scale, string systemTextFontName)
{
@@ -32,7 +32,7 @@ public TexRenderer GetRenderer(TexStyle style, double scale, string systemTextFo
return new TexRenderer(CreateBox(environment), scale);
}
- public void Add(TexFormula formula, SourceSpan source = null)
+ public void Add(TexFormula formula, SourceSpan? source = null)
{
Debug.Assert(formula != null);
Debug.Assert(formula.RootAtom != null);
@@ -50,7 +50,7 @@ formula.RootAtom is RowAtom
///
/// The atom to add.
/// The source that will be set for the resulting row atom.
- internal void Add(Atom atom, SourceSpan rowSource)
+ internal void Add(Atom atom, SourceSpan? rowSource)
{
if (this.RootAtom == null)
{
diff --git a/src/WpfMath/TexFormulaHelper.cs b/src/WpfMath/TexFormulaHelper.cs
index da181a1c..afb7764e 100644
--- a/src/WpfMath/TexFormulaHelper.cs
+++ b/src/WpfMath/TexFormulaHelper.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics;
using WpfMath.Atoms;
namespace WpfMath
@@ -132,12 +133,13 @@ public void AddRadical(TexFormula baseFormula, string degreeFormula)
public void AddRadical(TexFormula baseFormula)
{
- AddRadical(baseFormula, (TexFormula)null);
+ AddRadical(baseFormula, (TexFormula?)null);
}
- public void AddRadical(TexFormula baseFormula, TexFormula degreeFormula)
+ public void AddRadical(TexFormula baseFormula, TexFormula? degreeFormula)
{
- this.Add(new Radical(null, baseFormula?.RootAtom, degreeFormula?.RootAtom));
+ Debug.Assert(baseFormula.RootAtom != null);
+ this.Add(new Radical(null, baseFormula.RootAtom, degreeFormula?.RootAtom));
}
public void AddOperator(string operatorFormula, string lowerLimitFormula, string upperLimitFormula)
@@ -170,8 +172,8 @@ public void AddOperator(TexFormula operatorFormula, TexFormula lowerLimitFormula
public void AddOperator(
TexFormula operatorFormula,
- TexFormula lowerLimitFormula,
- TexFormula upperLimitFormula,
+ TexFormula? lowerLimitFormula,
+ TexFormula? upperLimitFormula,
bool useVerticalLimits)
{
this.Add(
@@ -315,7 +317,7 @@ public void PutDelimiterUnder(TexDelimiter delimiter, TexFormula subscriptName,
false);
}
- public void PutOver(TexFormula overFormula, TexUnit overUnit, double overSpace, bool overScriptSize)
+ public void PutOver(TexFormula? overFormula, TexUnit overUnit, double overSpace, bool overScriptSize)
{
this.Formula.RootAtom = new UnderOverAtom(
this._source,
@@ -327,18 +329,18 @@ public void PutOver(TexFormula overFormula, TexUnit overUnit, double overSpace,
true);
}
- public void PutOver(string overFormula, TexUnit overUnit, double overSpace, bool overScriptSize)
+ public void PutOver(string? overFormula, TexUnit overUnit, double overSpace, bool overScriptSize)
{
PutOver(overFormula == null ? null : ParseFormula(overFormula), overUnit, overSpace, overScriptSize);
}
- public void PutUnder(string underFormula, TexUnit underUnit, double underSpace, bool underScriptSize)
+ public void PutUnder(string? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize)
{
PutUnder(underFormula == null ? null : ParseFormula(underFormula), underUnit, underSpace,
underScriptSize);
}
- public void PutUnder(TexFormula underFormula, TexUnit underUnit, double underSpace, bool underScriptSize)
+ public void PutUnder(TexFormula? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize)
{
this.Formula.RootAtom = new UnderOverAtom(
this._source,
@@ -350,15 +352,15 @@ public void PutUnder(TexFormula underFormula, TexUnit underUnit, double underSpa
false);
}
- public void PutUnderAndOver(string underFormula, TexUnit underUnit, double underSpace, bool underScriptSize,
- string over, TexUnit overUnit, double overSpace, bool overScriptSize)
+ public void PutUnderAndOver(string? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize,
+ string? over, TexUnit overUnit, double overSpace, bool overScriptSize)
{
PutUnderAndOver(underFormula == null ? null : ParseFormula(underFormula), underUnit, underSpace,
underScriptSize, over == null ? null : ParseFormula(over), overUnit, overSpace, overScriptSize);
}
- public void PutUnderAndOver(TexFormula underFormula, TexUnit underUnit, double underSpace, bool underScriptSize,
- TexFormula over, TexUnit overUnit, double overSpace, bool overScriptSize)
+ public void PutUnderAndOver(TexFormula? underFormula, TexUnit underUnit, double underSpace, bool underScriptSize,
+ TexFormula? over, TexUnit overUnit, double overSpace, bool overScriptSize)
{
this.Formula.RootAtom = new UnderOverAtom(
this._source,
diff --git a/src/WpfMath/TexFormulaParser.cs b/src/WpfMath/TexFormulaParser.cs
index 9679a987..0b8808d5 100644
--- a/src/WpfMath/TexFormulaParser.cs
+++ b/src/WpfMath/TexFormulaParser.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Windows;
@@ -43,11 +44,11 @@ public class TexFormulaParser
"sqrt"
};
- private static IList symbols;
- private static IList delimeters;
- private static HashSet textStyles;
- private static readonly IDictionary> predefinedFormulas =
- new Dictionary>();
+ private static readonly IList symbols;
+ private static readonly IList delimeters;
+ private static readonly HashSet textStyles;
+ private static readonly IDictionary> predefinedFormulas =
+ new Dictionary>();
private static readonly string[][] delimiterNames =
{
@@ -65,16 +66,6 @@ public class TexFormulaParser
};
static TexFormulaParser()
- {
- Initialize();
- }
-
- internal static string[][] DelimiterNames
- {
- get { return delimiterNames; }
- }
-
- private static void Initialize()
{
//
// If start application isn't WPF, pack isn't registered by defaultTexFontParser
@@ -95,6 +86,11 @@ private static void Initialize()
predefinedFormulasParser.Parse(predefinedFormulas);
}
+ internal static string[][] DelimiterNames
+ {
+ get { return delimiterNames; }
+ }
+
internal static string GetDelimeterMapping(char character)
{
try
@@ -107,7 +103,7 @@ internal static string GetDelimeterMapping(char character)
}
}
- internal static SymbolAtom GetDelimiterSymbol(string name, SourceSpan source)
+ internal static SymbolAtom? GetDelimiterSymbol(string? name, SourceSpan? source)
{
if (name == null)
return null;
@@ -128,7 +124,7 @@ private static bool IsWhiteSpace(char ch)
return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
}
- private static bool ShouldSkipWhiteSpace(string style) => style != TexUtilities.TextStyleName;
+ private static bool ShouldSkipWhiteSpace(string? style) => style != TexUtilities.TextStyleName;
/// A registry for additional commands.
private readonly IReadOnlyDictionary _commandRegistry;
@@ -158,16 +154,16 @@ public TexFormulaParser() : this(
PredefinedColorParser.Instance)
{}
- public TexFormula Parse(string value, string textStyle = null) =>
+ public TexFormula Parse(string value, string? textStyle = null) =>
Parse(new SourceSpan("User input", value, 0, value.Length), textStyle);
- public TexFormula Parse(SourceSpan value, string textStyle = null)
+ public TexFormula Parse(SourceSpan value, string? textStyle = null)
{
var position = 0;
return Parse(value, ref position, false, textStyle, DefaultCommandEnvironment.Instance);
}
- internal TexFormula Parse(SourceSpan value, string textStyle, ICommandEnvironment environment)
+ internal TexFormula Parse(SourceSpan value, string? textStyle, ICommandEnvironment environment)
{
int localPostion = 0;
return Parse(value, ref localPostion, false, textStyle, environment);
@@ -176,7 +172,7 @@ internal TexFormula Parse(SourceSpan value, string textStyle, ICommandEnvironmen
private DelimiterInfo ParseUntilDelimiter(
SourceSpan value,
ref int position,
- string textStyle,
+ string? textStyle,
ICommandEnvironment environment)
{
var embeddedFormula = Parse(value, ref position, true, textStyle, environment);
@@ -217,7 +213,7 @@ private TexFormula Parse(
SourceSpan value,
ref int position,
bool allowClosingDelimiter,
- string textStyle,
+ string? textStyle,
ICommandEnvironment environment)
{
var formula = new TexFormula { Source = value, TextStyle = textStyle };
@@ -342,7 +338,7 @@ internal static SourceSpan ReadElementGroup(SourceSpan value, ref int position,
}
/// Reads a char-delimited element group if it exists; returns null if it isn't.
- private static SourceSpan ReadElementGroupOptional(
+ private static SourceSpan? ReadElementGroupOptional(
SourceSpan value,
ref int position,
char openChar,
@@ -442,7 +438,7 @@ private TexFormula ReadScript(
Parse(ReadElement(value, ref position), formula.TextStyle, environment.CreateChildEnvironment());
/// May return null for commands that produce no atoms.
- private Tuple ProcessCommand(
+ private Tuple ProcessCommand(
TexFormula formula,
SourceSpan value,
ref int position,
@@ -467,7 +463,7 @@ private Tuple ProcessCommand(
formula.TextStyle,
environment.CreateChildEnvironment());
source = value.Segment(start, position - start);
- return new Tuple(
+ return new Tuple(
AtomAppendMode.Add,
new FractionAtom(
source,
@@ -485,7 +481,7 @@ private Tuple ProcessCommand(
var internals = ParseUntilDelimiter(value, ref position, formula.TextStyle, environment);
var closing = internals.ClosingDelimiter;
source = value.Segment(start, position - start);
- return new Tuple(
+ return new Tuple(
AtomAppendMode.Add,
new FencedAtom(source, internals.Body, opening, closing));
}
@@ -496,7 +492,7 @@ private Tuple ProcessCommand(
formula.TextStyle,
environment.CreateChildEnvironment());
source = value.Segment(start, position - start);
- return new Tuple(
+ return new Tuple(
AtomAppendMode.Add,
new OverlinedAtom(source, overlineFormula.RootAtom));
}
@@ -512,14 +508,14 @@ private Tuple ProcessCommand(
var closing = ParseDelimiter(value, start, ref position);
closedDelimiter = true;
- return new Tuple(AtomAppendMode.Add, closing);
+ return new Tuple(AtomAppendMode.Add, closing);
}
case "sqrt":
{
// Command is radical.
SkipWhiteSpace(value, ref position);
- TexFormula degreeFormula = null;
+ TexFormula? degreeFormula = null;
if (value.Length > position && value[position] == leftBracketChar)
{
// Degree of radical is specified.
@@ -535,7 +531,8 @@ private Tuple ProcessCommand(
environment.CreateChildEnvironment());
source = value.Segment(start, position - start);
- return new Tuple(
+ Debug.Assert(sqrtFormula.RootAtom != null);
+ return new Tuple(
AtomAppendMode.Add,
new Radical(source, sqrtFormula.RootAtom, degreeFormula?.RootAtom));
}
@@ -547,7 +544,7 @@ private Tuple ProcessCommand(
var bodyFormula = Parse(bodyValue, formula.TextStyle, environment.CreateChildEnvironment());
source = value.Segment(start, position - start);
- return new Tuple(
+ return new Tuple(
AtomAppendMode.Add,
new StyledAtom(source, bodyFormula.RootAtom, null, new SolidColorBrush(color)));
}
@@ -559,7 +556,7 @@ private Tuple ProcessCommand(
var bodyFormula = Parse(bodyValue, formula.TextStyle, environment.CreateChildEnvironment());
source = value.Segment(start, position - start);
- return new Tuple(
+ return new Tuple(
AtomAppendMode.Add,
new StyledAtom(source, bodyFormula.RootAtom, new SolidColorBrush(color), null));
}
@@ -620,8 +617,7 @@ private void ProcessEscapeSequence(TexFormula formula,
var command = commandSpan.ToString();
var formulaSource = new SourceSpan(value.SourceName, value.Source, initialSrcPosition, commandSpan.End);
- SymbolAtom symbolAtom = null;
- if (SymbolAtom.TryGetAtom(commandSpan, out symbolAtom))
+ if (SymbolAtom.TryGetAtom(commandSpan, out SymbolAtom? symbolAtom))
{
// Symbol was found.
@@ -646,7 +642,7 @@ private void ProcessEscapeSequence(TexFormula formula,
{
// Predefined formula was found.
var predefinedFormula = factory(formulaSource);
- var atom = AttachScripts(formula, value, ref position, predefinedFormula.RootAtom, true, environment);
+ var atom = AttachScripts(formula, value, ref position, predefinedFormula!.RootAtom!, true, environment); // Nullable TODO: This might need null checking
formula.Add(atom, formulaSource);
}
else if (command.Equals("nbsp"))
@@ -753,7 +749,7 @@ private Atom AttachScripts(
var primesRowSource = new SourceSpan(
value.SourceName,
value.Source,
- primesRowAtom.Source.Start,
+ primesRowAtom.Source!.Start,
position - primesRowAtom.Source.Start);
primesRowAtom = primesRowAtom.WithSource(primesRowSource);
@@ -763,8 +759,8 @@ private Atom AttachScripts(
if (position == value.Length)
return atom;
- TexFormula superscriptFormula = null;
- TexFormula subscriptFormula = null;
+ TexFormula? superscriptFormula = null;
+ TexFormula? subscriptFormula = null;
var ch = value[position];
if (ch == superScriptChar)
@@ -804,7 +800,7 @@ private Atom AttachScripts(
var superscriptAtom = superscriptFormula?.RootAtom;
if (atom.GetRightType() == TexAtomType.BigOperator)
{
- var source = value.Segment(atom.Source.Start, position - atom.Source.Start);
+ var source = value.Segment(atom.Source!.Start, position - atom.Source.Start);
if (atom is BigOperatorAtom typedAtom)
{
return new BigOperatorAtom(
@@ -829,7 +825,7 @@ private Atom AttachScripts(
}
/// May return null.
- private Atom ConvertCharacter(
+ private Atom? ConvertCharacter(
TexFormula formula,
ref int position,
SourceSpan source,
diff --git a/src/WpfMath/TexPredefinedFormulaParser.cs b/src/WpfMath/TexPredefinedFormulaParser.cs
index a65afde5..fad99df4 100644
--- a/src/WpfMath/TexPredefinedFormulaParser.cs
+++ b/src/WpfMath/TexPredefinedFormulaParser.cs
@@ -66,9 +66,9 @@ private static Type[] GetArgumentTypes(IEnumerable args)
return result.ToArray();
}
- private static object[] GetArgumentValues(IEnumerable args)
+ private static object?[] GetArgumentValues(IEnumerable args)
{
- var result = new List