Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Oct 25, 2022
2 parents eb7af68 + 49300f5 commit 287b10f
Show file tree
Hide file tree
Showing 73 changed files with 856 additions and 592 deletions.
2 changes: 1 addition & 1 deletion MarkTheRipper.Core/Expressions/ApplyExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ public void Deconstruct(out IExpression function, out IExpression[] parameters)
}

public override string ToString() =>
$"{this.Function} {string.Join(" ", (object[])this.Parameters)}";
$"Apply: {this.Function} {string.Join(" ", (object[])this.Parameters)}";
}
2 changes: 1 addition & 1 deletion MarkTheRipper.Core/Expressions/ArrayExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ public void Deconstruct(out IExpression[] elements) =>
elements = this.Elements;

public override string ToString() =>
$"[{string.Join(",", (object[])this.Elements)}]";
$"Array: [{string.Join(",", (object[])this.Elements)}]";
}
10 changes: 5 additions & 5 deletions MarkTheRipper.Core/Expressions/ValueExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public void Deconstruct(out object? value) =>
public override string ToString() =>
this.Value switch
{
string str => $"\"{str}\"",
char ch => $"'{ch}'",
IFormattable f => f.ToString(null, CultureInfo.InvariantCulture),
null => "(null)",
_ => this.Value.ToString() ?? string.Empty,
string str => $"Value: \"{str}\"",
char ch => $"Value: '{ch}'",
IFormattable f => $"Value: {f.ToString(null, CultureInfo.InvariantCulture)}",
null => "Value: (null)",
_ => $"Value: {this.Value}",
};
}
2 changes: 1 addition & 1 deletion MarkTheRipper.Core/Expressions/VariableExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ public void Deconstruct(out string name) =>
name = this.Name;

public override string ToString() =>
this.Name;
$"Variable: {this.Name}";
}
4 changes: 2 additions & 2 deletions MarkTheRipper.Core/Metadata/IMetadataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
/////////////////////////////////////////////////////////////////////////////////////

using MarkTheRipper.Expressions;
using System;
using System.ComponentModel;
using System.Collections.Generic;

namespace MarkTheRipper.Metadata;

Expand All @@ -20,4 +19,5 @@ public interface IMetadataContext
IExpression? Lookup(string keyName);

IMetadataContext Spawn();
IMetadataContext InsertAndSpawn(Dictionary<string, IExpression> metadata);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</head>
<body>
<ul>
<li>aaa</li>
<li>bbb</li>
</ul>
<p>Hello MarkTheRipper!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<meta name="keywords" content="foo,bar" />
</head>
<body>
<h1>Tags: reftag</h1>
<h2>Title: <a href='ref.html' alt='ref.html'>ref</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='temp.html'>hoehoe</a>
<h1>Tags: bar</h1>
<h2>Title: <a href='temp.html' alt='temp.html'>hoehoe</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='temp.html'>hoehoe</a>
<h1>Tags: reftag</h1>
<h2>Title: <a href='ref.html' alt='ref.html'>ref</a>
<p>Hello MarkTheRipper!
This is test contents.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<meta name="keywords" content="foo,bar" />
</head>
<body>
<h1>Tags: reftag</h1>
<h2>Title: <a href='../../ref.html' alt='ref.html'>ref</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='aaa/bbb/temp.html'>hoehoe</a>
<h1>Tags: bar</h1>
<h2>Title: <a href='temp.html' alt='aaa/bbb/temp.html'>hoehoe</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='aaa/bbb/temp.html'>hoehoe</a>
<h1>Tags: reftag</h1>
<h2>Title: <a href='../../ref.html' alt='ref.html'>ref</a>
<p>Hello MarkTheRipper!
This is test contents.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<meta name="keywords" content="foo,bar" />
</head>
<body>
<h1>Tags: reftag</h1>
<h2>Title: <a href='../ref.html' alt='ref.html'>ref</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='aaa/temp.html'>hoehoe</a>
<h1>Tags: bar</h1>
<h2>Title: <a href='temp.html' alt='aaa/temp.html'>hoehoe</a>
<h1>Tags: foo</h1>
<h2>Title: <a href='temp.html' alt='aaa/temp.html'>hoehoe</a>
<h1>Tags: reftag</h1>
<h2>Title: <a href='../ref.html' alt='ref.html'>ref</a>
<p>Hello MarkTheRipper!
This is test contents.</p>

Expand Down
2 changes: 1 addition & 1 deletion MarkTheRipper.Engine.Tests/BulkRipperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ This is test contents.
</head>
<body>
<ul>
{foreach category.breadcrumb}
{foreach category.breadcrumbs}
<li>{item.name}</li>
{end}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name: cat1,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name: cat1,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand All @@ -16,7 +16,7 @@
}
},
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand All @@ -26,7 +26,7 @@
},
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand All @@ -26,7 +26,7 @@
},
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand All @@ -42,7 +42,7 @@
Name: cat3,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat3,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name: (root),
Entries: [
{
Metadata: {
HeaderMetadata: {
path: content1
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand All @@ -22,7 +22,7 @@
}
},
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand All @@ -40,7 +40,7 @@
},
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat1,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand All @@ -32,7 +32,7 @@
Name: cat2,
Entries: [
{
Metadata: {
HeaderMetadata: {
category: {
Name: cat2,
Parent: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
tag1: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
tag1: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand All @@ -13,7 +13,7 @@
tag2: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
tag1: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1
]
}
},
{
RelativeContentPath: content2,
Metadata: {
HeaderMetadata: {
tags: [
tag1
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
tag1: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1
]
}
},
{
RelativeContentPath: content2,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand All @@ -21,7 +21,7 @@
tag2: [
{
RelativeContentPath: content2,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
tag1: [
{
RelativeContentPath: content1,
Metadata: {
HeaderMetadata: {
tags: [
tag1
]
}
},
{
RelativeContentPath: content2,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand All @@ -21,7 +21,7 @@
tag2: [
{
RelativeContentPath: content2,
Metadata: {
HeaderMetadata: {
tags: [
tag1,
tag2
Expand All @@ -32,7 +32,7 @@
tag3: [
{
RelativeContentPath: content3,
Metadata: {
HeaderMetadata: {
tags: [
tag3
]
Expand Down
Loading

0 comments on commit 287b10f

Please sign in to comment.