Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Make sure your repository settings are set up to deploy from GitHub actions see:
https://github.com/elastic/{your-repository}/settings/pages

---
![docs/source/_static/img/github-pages.png](docs/source/_static/img/github-pages.png)
![actions/publish/github-pages.png](actions/publish/github-pages.png)

---

Expand Down
1 change: 1 addition & 0 deletions docs-builder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "publish", "publish", "{CD2887E3-BDA9-434B-A5BF-9ED38DE20332}"
ProjectSection(SolutionItems) = preProject
actions\publish\action.yml = actions\publish\action.yml
actions\publish\github-pages.png = actions\publish\github-pages.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "publish-vercel", "publish-vercel", "{A2A34BBC-CB5E-4100-9529-A12B6ECB769C}"
Expand Down

This file was deleted.

76 changes: 0 additions & 76 deletions docs/source/_static/templates/settings.jinja

This file was deleted.

102 changes: 0 additions & 102 deletions docs/source/_static/yaml/settings.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions docs/source/syntax/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@ This feature is not currently supported in Elastic Docs V3.
## Block-level images

```markdown
![APM](/_static/img/apm.png)
![APM](img/apm.png)
```

![APM](/_static/img/apm.png)
![APM](img/apm.png)

Or, use the `image` directive.

```markdown
:::{image} /_static/img/observability.png
:::{image} img/observability.png
:alt: Elasticsearch
:width: 250px
:::
```

:::{image} /_static/img/observability.png
:::{image} img/observability.png
:alt: Elasticsearch
:width: 250px
:::

## Inline images

```markdown
Here is the same image used inline ![Elasticsearch](/_static/img/observability.png)
Here is the same image used inline ![Elasticsearch](img/observability.png)
```

Here is the same image used inline ![Elasticsearch](/_static/img/observability.png)
Here is the same image used inline ![Elasticsearch](img/observability.png)

## Asciidoc syntax

Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ protected override DirectiveBlock CreateFencedBlock(BlockProcessor processor)
if (processor.Context is not ParserContext context)
throw new Exception("Expected parser context to be of type ParserContext");

var directive = info.Trim(['{', '}', '`', ':']);
var closingBracket = info.IndexOf('}');
var directive = info[..closingBracket].Trim(['{', '}', '`', ':']);
if (UnsupportedLookup.TryGetValue(directive, out var issueId))
return new UnsupportedDirectiveBlock(this, directive.ToString(), issueId, context);

Expand Down Expand Up @@ -156,6 +157,9 @@ public override BlockState TryOpen(BlockProcessor processor)
if (line.IndexOf("{") == -1)
return BlockState.None;

if (line.IndexOf("}") == -1)
return BlockState.None;

return base.TryOpen(processor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,18 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
var anchor = anchors.Length > 1 ? anchors[1].Trim() : null;
url = anchors[0];

if (!string.IsNullOrWhiteSpace(url) && uri != null)
if (!string.IsNullOrWhiteSpace(url))
{
var pathOnDisk = Path.Combine(includeFrom, url.TrimStart('/'));
if (uri.IsFile && !context.Build.ReadFileSystem.File.Exists(pathOnDisk))
if ((uri is null || uri.IsFile) && !context.Build.ReadFileSystem.File.Exists(pathOnDisk))
processor.EmitError(line, column, length, $"`{url}` does not exist. resolved to `{pathOnDisk}");
}
else
{
if (string.IsNullOrEmpty(anchor))
processor.EmitWarning(line, column, length, $"No url was specified for the link.");
link.Url = "";
}

if (link.FirstChild == null || !string.IsNullOrEmpty(anchor))
{
Expand Down
Loading
Loading