You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tests for nested and indented inline anchors (#359)
* Add tests for nested and indented inline anchors
Introduced new tests to verify inline anchor generation within definition lists and indented code blocks. Ensures proper HTML output and validates parsing behavior to prevent future regressions.
This removes indented code support from our parsers.
The problem was that during our minimal parse phase anchors that lived in indented code (lists/definition lists) was not discovered because they were marked as part of an indented code block.
Removing support for indented code blocks since all code should be included through fenced blocks.
(cherry picked from commit 81d20d2)
* dotnet format
* remove unused debug code
Copy file name to clipboardExpand all lines: tests/authoring/Inline/InlineAnchors.fs
+85Lines changed: 85 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,13 @@
4
4
5
5
module ``inline elements``.``anchors DEPRECATED``
6
6
7
+
open Elastic.Markdown.Myst.InlineParsers
8
+
open Markdig.Syntax
9
+
open Swensen.Unquote
10
+
open System.Linq
7
11
open Xunit
8
12
open authoring
13
+
open authoring.MarkdownDocumentAssertions
9
14
10
15
type ``inline anchor in the middle`` () =
11
16
@@ -22,3 +27,83 @@ this is *regular* text and this $$$is-an-inline-anchor$$$ and this continues to
22
27
"""
23
28
[<Fact>]
24
29
let ``has no errors`` () = markdown |> hasNoErrors
30
+
31
+
type ``inline anchors embedded in definition lists`` () =
32
+
33
+
static let markdown = Setup.Generate [
34
+
Index """# Testing nested inline anchors
35
+
36
+
$$$search-type$$$
37
+
38
+
`search_type`
39
+
: (Optional, string) How distributed term frequencies are calculated for relevance scoring.
40
+
41
+
::::{dropdown} Valid values for `search_type`
42
+
`query_then_fetch`
43
+
: (Default) Distributed term frequencies are calculated locally for each shard running the search. We recommend this option for faster searches with potentially less accurate scoring.
44
+
45
+
$$$dfs-query-then-fetch$$$
46
+
47
+
`dfs_query_then_fetch`
48
+
: Distributed term frequencies are calculated globally, using information gathered from all shards running the search.
0 commit comments