diff --git a/docs/commonmark.mdx b/docs/commonmark.mdx index 78b7aa1..25ae332 100644 --- a/docs/commonmark.mdx +++ b/docs/commonmark.mdx @@ -174,14 +174,54 @@ echo "Hello, world!"; // [code! f] echo "Hello, world!"; // [code! **] ``` +#### Diff annotations (Insert/Remove) + +To show code changes, you can add insert and remove annotations to highlight additions and deletions. + +```php +$user = User::find(1); // [code! remove] +$user = User::findOrFail(1); // [code! insert] +``` + +This will add `insert` and `remove` classes to the corresponding line elements. + +If you don't want to write out the full keywords, you can use these shorthands: + +```php +$user = User::find(1); // [code! --] +$user = User::findOrFail(1); // [code! ++] +``` + +You can also use `add`, `del`, or `delete` as alternative keywords for insert and remove respectively. + +##### **Gutter diff symbols** + +When you have the gutter enabled, diff annotations will automatically replace line numbers with diff symbols: + +- Insert lines show `+` instead of the line number +- Remove lines show `-` instead of the line number +- Regular lines continue to show normal line numbers + +```php +$environment = new Environment; +$environment + ->addExtension(new CommonMarkCoreExtension) + ->addExtension(new PhikiExtension(Theme::GithubLight, withGutter: true)); +``` + +This provides a visual indication in the gutter that matches standard diff format conventions. + #### Sample CSS ##### **Highlighted lines** -When you use an inline highlight annotation, Phiki will try to find an `editor.lineHighlightBackground` or `editor.selectionHighlightBackground` color inside of your chosen theme(s) and add a CSS variable to the `
` element. +When you use an inline highlight annotation, Phiki will automatically try to find an `editor.lineHighlightBackground` or `editor.selectionHighlightBackground` color inside of your chosen theme(s) and add a CSS variable to the `` element. If it can't find one, it will fallback to the default background color of the theme. +Phiki automatically adds the following CSS variable: +- `--phiki-line-highlight` - Background color for highlighted lines + Those CSS variables are then applied to the line element the same as other styled elements.@@ -211,3 +251,48 @@ pre.phiki.focus:hover .line { filter: blur(0); } ``` + +##### **Diff annotations** + +When you use diff annotations (insert/remove), Phiki will automatically try to find `markup.inserted` and `markup.deleted` colors inside of your chosen theme(s) and add CSS variables to the ` ` element. + +If it can't find them, it will fallback to the default background color of the theme. + +Phiki automatically adds the following CSS variables to the `` element: + +- `--phiki-diff-insert-bg` - Background color for inserted lines +- `--phiki-diff-insert-fg` - Text color for inserted lines +- `--phiki-diff-remove-bg` - Background color for removed lines +- `--phiki-diff-remove-fg` - Text color for removed lines + +You can use these variables in your CSS: + +```css +.phiki .line.insert { + background-color: var(--phiki-diff-insert-bg); + color: var(--phiki-diff-insert-fg); +} + +.phiki .line.remove { + background-color: var(--phiki-diff-remove-bg); + color: var(--phiki-diff-remove-fg); +} +``` + ++If you're using multiple themes, Phiki will also add CSS variables for each theme so you can style them differently in dark mode, for example. + + +```css +@media (prefers-color-scheme: dark) { + .phiki .line.insert { + background-color: var(--phiki-dark-diff-insert-bg) !important; + color: var(--phiki-dark-diff-insert-fg) !important; + } + + .phiki .line.remove { + background-color: var(--phiki-dark-diff-remove-bg) !important; + color: var(--phiki-dark-diff-remove-fg) !important; + } +} +``` diff --git a/meta/commonmark.php b/meta/commonmark.php index 553db9c..7b166d5 100644 --- a/meta/commonmark.php +++ b/meta/commonmark.php @@ -6,9 +6,9 @@ use Phiki\Adapters\CommonMark\PhikiExtension; use Phiki\Theme\Theme; -require_once __DIR__ . '/../vendor/autoload.php'; +require_once __DIR__.'/../vendor/autoload.php'; -$environment = new Environment(); +$environment = new Environment; $environment->addExtension(new CommonMarkCoreExtension)->addExtension(new PhikiExtension(Theme::GithubLight)); $converter = new MarkdownConverter($environment); diff --git a/src/Adapters/CommonMark/Transformers/Annotations/AnnotationType.php b/src/Adapters/CommonMark/Transformers/Annotations/AnnotationType.php index ce4eca6..65f9917 100644 --- a/src/Adapters/CommonMark/Transformers/Annotations/AnnotationType.php +++ b/src/Adapters/CommonMark/Transformers/Annotations/AnnotationType.php @@ -6,10 +6,12 @@ enum AnnotationType { case Highlight; case Focus; + case Insert; + case Remove; /** * Get the keywords used to denote this annotation type. - * + * * e.g. highlight can be denoted by `[code! highlight]`. */ public function keywords(): array @@ -17,6 +19,8 @@ public function keywords(): array return match ($this) { self::Highlight => ['highlight', 'hl', '~~'], self::Focus => ['focus', 'f', '**'], + self::Insert => ['insert', 'add', '++'], + self::Remove => ['remove', 'del', 'delete', '--'], }; } @@ -28,6 +32,8 @@ public function getLineClasses(): array return match ($this) { self::Highlight => ['highlight'], self::Focus => ['focus'], + self::Insert => ['insert'], + self::Remove => ['remove'], }; } @@ -50,6 +56,8 @@ public static function fromKeyword(string $keyword): self return match ($keyword) { 'highlight', 'hl', '~~' => self::Highlight, 'focus', 'f', '**' => self::Focus, + 'insert', 'add', '++' => self::Insert, + 'remove', 'del', 'delete', '--' => self::Remove, default => throw new \InvalidArgumentException("Unknown annotation keyword: {$keyword}"), }; } diff --git a/src/Adapters/CommonMark/Transformers/AnnotationsTransformer.php b/src/Adapters/CommonMark/Transformers/AnnotationsTransformer.php index f5f60ed..6b4424c 100644 --- a/src/Adapters/CommonMark/Transformers/AnnotationsTransformer.php +++ b/src/Adapters/CommonMark/Transformers/AnnotationsTransformer.php @@ -10,7 +10,9 @@ use Phiki\Contracts\RequiresThemesInterface; use Phiki\Grammar\Grammar; use Phiki\Phast\Element; +use Phiki\Phast\Text; use Phiki\Support\Arr; +use Phiki\Theme\ThemeColorExtractor; use Phiki\Transformers\AbstractTransformer; use Phiki\Transformers\Concerns\RequiresGrammar; use Phiki\Transformers\Concerns\RequiresThemes; @@ -40,15 +42,15 @@ class AnnotationsTransformer extends AbstractTransformer implements RequiresGram /** * The collected list of annotations. - * + * * @var array> */ protected array $annotations = []; /** * Create a new instance. - * - * @param string $prefix The prefix used to denote annotations, e.g. `code` for `[code! highlight]`. + * + * @param string $prefix The prefix used to denote annotations, e.g. `code` for `[code! highlight]`. */ public function __construct(protected string $prefix = 'code') {} @@ -120,10 +122,10 @@ public function preprocess(string $code): string // We store a list of these in a constant: // - strings are characters for line comments // - arrays are beginning and ending comment pairs (block comments) - [$l, $b] = Arr::partition($commentChars, fn(string|array $chars) => is_string($chars)); + [$l, $b] = Arr::partition($commentChars, fn (string|array $chars) => is_string($chars)); // We'll first check for line comments. - $processedLineCommentRegex = sprintf(self::DANGLING_LINE_COMMENT_REGEX, implode('|', array_map(fn(string $char) => preg_quote($char, '/'), $l))); + $processedLineCommentRegex = sprintf(self::DANGLING_LINE_COMMENT_REGEX, implode('|', array_map(fn (string $char) => preg_quote($char, '/'), $l))); // If we find a match, we can set the cutoff point and skip checking for block comments. if (preg_match($processedLineCommentRegex, $trimmed, $lineCommentMatches, PREG_OFFSET_CAPTURE) === 1) { @@ -133,7 +135,7 @@ public function preprocess(string $code): string $processedBlockCommentRegex = sprintf( '/%s$/', - implode('|', array_map(fn(array $chars) => sprintf('(%s\s*%s)', preg_quote($chars[0], '/'), preg_quote($chars[1], '/')), $b)), + implode('|', array_map(fn (array $chars) => sprintf('(%s\s*%s)', preg_quote($chars[0], '/'), preg_quote($chars[1], '/')), $b)), ); // If we find a match, we can set the cutoff point. @@ -199,6 +201,9 @@ public function pre(Element $pre): Element } } + // Add CSS variables for theme colors + $this->addThemeColorVariables($pre); + return $pre; } @@ -214,4 +219,97 @@ public function line(Element $span, array $tokens, int $index): Element return $span; } + + public function gutter(Element $span, int $index): Element + { + if ($this->annotations === [] || ! isset($this->annotations[$index])) { + return $span; + } + + // Check if this line has diff annotations + foreach ($this->annotations[$index] as $annotation) { + if ($annotation->type === AnnotationType::Insert) { + // Replace the line number with '+' symbol + $span->children = [new Text(' +')]; + break; + } elseif ($annotation->type === AnnotationType::Remove) { + // Replace the line number with '-' symbol + $span->children = [new Text(' -')]; + break; + } + } + + return $span; + } + + /** + * Add CSS variables for theme colors to the pre element. + */ + protected function addThemeColorVariables(Element $pre): void + { + if (empty($this->themes)) { + return; + } + + $style = $pre->properties->get('style') ?? ''; + $cssVariables = []; + + // Collect all annotation types used + $usedTypes = []; + foreach ($this->annotations as $annotations) { + foreach ($annotations as $annotation) { + if (! in_array($annotation->type, $usedTypes, true)) { + $usedTypes[] = $annotation->type; + } + } + } + + // Process each theme + foreach ($this->themes as $themeName => $theme) { + $extractor = new ThemeColorExtractor($theme); + $prefix = count($this->themes) > 1 ? "--phiki-{$themeName}-" : '--phiki-'; + + // Add CSS variables for each annotation type used + foreach ($usedTypes as $type) { + switch ($type) { + case AnnotationType::Highlight: + $colors = $extractor->getColorForType('highlight'); + if ($colors && ! empty($colors['background'])) { + $cssVariables[] = "{$prefix}line-highlight: {$colors['background']}"; + } + break; + + case AnnotationType::Insert: + $colors = $extractor->getColorForType('insert'); + if ($colors) { + if (! empty($colors['background'])) { + $cssVariables[] = "{$prefix}diff-insert-bg: {$colors['background']}"; + } + if (! empty($colors['foreground'])) { + $cssVariables[] = "{$prefix}diff-insert-fg: {$colors['foreground']}"; + } + } + break; + + case AnnotationType::Remove: + $colors = $extractor->getColorForType('remove'); + if ($colors) { + if (! empty($colors['background'])) { + $cssVariables[] = "{$prefix}diff-remove-bg: {$colors['background']}"; + } + if (! empty($colors['foreground'])) { + $cssVariables[] = "{$prefix}diff-remove-fg: {$colors['foreground']}"; + } + } + break; + } + } + } + + if (! empty($cssVariables)) { + $newStyle = implode('; ', $cssVariables); + $style = $style ? "$style; $newStyle" : $newStyle; + $pre->properties->set('style', $style); + } + } } diff --git a/src/Contracts/RequiresThemesInterface.php b/src/Contracts/RequiresThemesInterface.php index ead17be..93e020f 100644 --- a/src/Contracts/RequiresThemesInterface.php +++ b/src/Contracts/RequiresThemesInterface.php @@ -8,8 +8,8 @@ interface RequiresThemesInterface { /** * Set the parsed themes for the transformer. - * - * @param array $themes + * + * @param array $themes */ public function withThemes(array $themes): void; } diff --git a/src/Phiki.php b/src/Phiki.php index 9347565..df61979 100644 --- a/src/Phiki.php +++ b/src/Phiki.php @@ -83,7 +83,7 @@ public function grammar(string $name, string|ParsedGrammar $pathOrGrammar): stat return $this; } - public function alias(string $alias, string | Grammar $for): static + public function alias(string $alias, string|Grammar $for): static { $this->environment->grammars->alias($alias, $for instanceof Grammar ? $for->value : $for); diff --git a/src/Theme/ThemeColorExtractor.php b/src/Theme/ThemeColorExtractor.php new file mode 100644 index 0000000..c8a9da0 --- /dev/null +++ b/src/Theme/ThemeColorExtractor.php @@ -0,0 +1,85 @@ +theme) { + return []; + } + + return [ + 'lineHighlight' => $this->theme->colors['editor.lineHighlightBackground'] ?? null, + 'findMatch' => $this->theme->colors['editor.findMatchBackground'] ?? null, + 'selection' => $this->theme->colors['editor.selectionBackground'] ?? null, + 'selectionHighlight' => $this->theme->colors['editor.selectionHighlightBackground'] ?? null, + ]; + } + + /** + * Get diff colors from markup token colors + */ + public function getDiffColors(): array + { + if (! $this->theme) { + return []; + } + + $insertedColor = $this->theme->match(['markup.inserted']); + $deletedColor = $this->theme->match(['markup.deleted']); + + return [ + 'inserted' => $insertedColor ? [ + 'background' => $insertedColor->background, + 'foreground' => $insertedColor->foreground, + ] : null, + 'deleted' => $deletedColor ? [ + 'background' => $deletedColor->background, + 'foreground' => $deletedColor->foreground, + ] : null, + ]; + } + + /** + * Get a specific color by type + */ + public function getColorForType(string $type): ?array + { + return match ($type) { + 'highlight' => [ + 'background' => $this->getEditorColors()['lineHighlight'], + 'foreground' => null, + ], + 'insert', 'add' => $this->getDiffColors()['inserted'], + 'remove', 'delete' => $this->getDiffColors()['deleted'], + default => null, + }; + } + + /** + * Convert color array to CSS style string + */ + public function colorsToStyle(array $colors): string + { + $styles = []; + + if (! empty($colors['background'])) { + $styles[] = "background-color: {$colors['background']}"; + } + + if (! empty($colors['foreground'])) { + $styles[] = "color: {$colors['foreground']}"; + } + + return implode('; ', $styles); + } +} diff --git a/src/Transformers/Concerns/RequiresThemes.php b/src/Transformers/Concerns/RequiresThemes.php index af6da36..35baaa7 100644 --- a/src/Transformers/Concerns/RequiresThemes.php +++ b/src/Transformers/Concerns/RequiresThemes.php @@ -10,7 +10,7 @@ trait RequiresThemes protected array $themes; /** - * @param array $themes + * @param array $themes */ public function withThemes(array $themes): void { diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_line.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_line.snap" deleted file mode 100644 index fc5abc0..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_line.snap" +++ /dev/null @@ -1,4 +0,0 @@ - diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset.snap" deleted file mode 100644 index 5b72174..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_range.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_range.snap" deleted file mode 100644 index 3c93644..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_range.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_with_total.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_with_total.snap" deleted file mode 100644 index 283bcdf..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_negative_offset_with_total.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_range_of_lines.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_range_of_lines.snap" deleted file mode 100644 index 4610542..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_a_range_of_lines.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_offset_with_total.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_offset_with_total.snap" deleted file mode 100644 index 8ab67e6..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_offset_with_total.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_open_ended_range.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_open_ended_range.snap" deleted file mode 100644 index b17d3cd..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_an_open_ended_range.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_multiple_lines.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_multiple_lines.snap" deleted file mode 100644 index 05bbd30..0000000 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_focus__\342\206\222_it_can_focus_multiple_lines.snap" +++ /dev/null @@ -1,5 +0,0 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set________________.snap" index 0298a33..8b24f71 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "This line is not focused!"; -echo "This line is focused."; -echo "This is also focused."; -echo "This line is not focused."; -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____highlight______highlight__.snap" index 0298a33..8b24f71 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____hl______hl__.snap" index 0298a33..8b24f71 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_negative_range_of_lines_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set________________.snap" index 7945c32..9912aa4 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "Hello, world!"; +echo "Hello, world!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____highlight______highlight__.snap" index 7945c32..9912aa4 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "Hello, world!"; +echo "Hello, world!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____hl______hl__.snap" index 7945c32..9912aa4 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_fixed_set_of_lines_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "Hello, world!"; +echo "Hello, world!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set________________.snap" index 5e032aa..4477ebd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "This line is highlighted!"; +echo "This line is highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____highlight______highlight__.snap" index 5e032aa..4477ebd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is highlighted!"; +echo "This line is highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____hl______hl__.snap" index 5e032aa..4477ebd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_negative_offset_with_total_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is highlighted!"; +echo "This line is highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set________________.snap" index 952ac71..1aed5a7 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____highlight______highlight__.snap" index 952ac71..1aed5a7 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____hl______hl__.snap" index 952ac71..1aed5a7 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_of_lines_in_the_middle_of_a_block_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set________________.snap" index 034ef03..5162fe8 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____highlight______highlight__.snap" index 034ef03..5162fe8 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____hl______hl__.snap" index 034ef03..5162fe8 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_range_with_negative_offset_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set________________.snap" index 1b76615..4d9bff9 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set________________.snap" @@ -1,2 +1,2 @@ -echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____highlight______highlight__.snap" index 1b76615..4d9bff9 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____highlight______highlight__.snap" @@ -1,2 +1,2 @@ -echo 'Hello, world!';echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____hl______hl__.snap" index 1b76615..4d9bff9 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_a_single_line_with_data_set____hl______hl__.snap" @@ -1,2 +1,2 @@ -echo 'Hello, world!';echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set________________.snap" index 988946d..3b77c83 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo 'Hello, world!';echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____highlight______highlight__.snap" index 988946d..3b77c83 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____hl______hl__.snap" index 988946d..3b77c83 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_an_offset_with_total_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set________________.snap" index 21eff85..6f96efd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set________________.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set________________.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____highlight______highlight__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____highlight______highlight__.snap" index 21eff85..6f96efd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____highlight______highlight__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____highlight______highlight__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____hl______hl__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____hl______hl__.snap" index 21eff85..6f96efd 100644 --- "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____hl______hl__.snap" +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_highlight__\342\206\222_it_can_highlight_with_an_open_ended_range_with_data_set____hl______hl__.snap" @@ -1,4 +1,4 @@ -echo "This line is not highlighted!"; +'); // Insert line shows + + + // Ensure diff lines have proper classes + expect($content)->toContain(''); + expect($content)->toContain(''); +}); diff --git a/tests/Adapters/CommonMark/Transformers/AnnotationsTransformerTest.php b/tests/Adapters/CommonMark/Transformers/AnnotationsTransformerTest.php index 405e188..c3c7a06 100644 --- a/tests/Adapters/CommonMark/Transformers/AnnotationsTransformerTest.php +++ b/tests/Adapters/CommonMark/Transformers/AnnotationsTransformerTest.php @@ -177,3 +177,173 @@ expect($output)->toMatchSnapshot(); }); })->with(AnnotationType::Focus->keywords()); + +describe('insert', function () { + it('can mark a single line as inserted', function (string $keyword) { + $output = markdown("echo 'Hello, world!'; // [code! {$keyword}]", Theme::GithubLight, Grammar::Php); + + expect($output)->toMatchSnapshot(); + }); + + it('can mark a fixed set of lines as inserted', function (string $keyword) { + $output = markdown(<<echo "This line is not highlighted!"; echo "This line is highlighted."; echo "This is also highlighted."; echo "This line is not highlighted."; diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..740a687 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..740a687 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..740a687 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..b083ece --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..b083ece --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..b083ece --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..d1dcd3a --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..d1dcd3a --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..d1dcd3a --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_negative_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..316156b --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..316156b --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..316156b --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..3af3b02 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..3af3b02 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..3af3b02 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_range_with_negative_offset_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..c99c5f6 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set________________.snap" @@ -0,0 +1,2 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..c99c5f6 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,2 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..c99c5f6 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_a_single_line_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,2 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..65196f9 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..65196f9 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..65196f9 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_an_offset_with_total_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set________________.snap" new file mode 100644 index 0000000..ff1029c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____add______add__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____add______add__.snap" new file mode 100644 index 0000000..ff1029c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____add______add__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____insert______insert__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____insert______insert__.snap" new file mode 100644 index 0000000..ff1029c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_insert__\342\206\222_it_can_mark_with_an_open_ended_range_as_inserted_with_data_set____insert______insert__.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..db51696 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not inserted!"; +echo "This line is inserted."; +echo "This is also inserted."; +echo "This line is not inserted."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..db51696 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..db51696 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..db51696 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_negative_range_of_lines_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..a511428 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..a511428 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..a511428 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..a511428 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_fixed_set_of_lines_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..d1e055c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "Hello, world!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..d1e055c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..d1e055c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..d1e055c --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_negative_offset_with_total_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..e73eab0 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..e73eab0 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..e73eab0 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..e73eab0 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_of_lines_in_the_middle_of_a_block_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..99dd23f --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..99dd23f --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..99dd23f --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..99dd23f --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_range_with_negative_offset_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..4dca10e --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set________________.snap" @@ -0,0 +1,2 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..4dca10e --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,2 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..4dca10e --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,2 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..4dca10e --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_a_single_line_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,2 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..91d7f45 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo 'Hello, world!'; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..91d7f45 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..91d7f45 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..91d7f45 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_an_offset_with_total_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set________________.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set________________.snap" new file mode 100644 index 0000000..4fea971 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set________________.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____del______del__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____del______del__.snap" new file mode 100644 index 0000000..4fea971 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____del______del__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____delete______delete__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____delete______delete__.snap" new file mode 100644 index 0000000..4fea971 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____delete______delete__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git "a/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____remove______remove__.snap" "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____remove______remove__.snap" new file mode 100644 index 0000000..4fea971 --- /dev/null +++ "b/tests/.pest/snapshots/Adapters/CommonMark/Transformers/AnnotationsTransformerTest/_remove__\342\206\222_it_can_mark_with_an_open_ended_range_as_removed_with_data_set____remove______remove__.snap" @@ -0,0 +1,5 @@ +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +diff --git a/tests/Adapters/CommonMark/PhikiExtensionTest.php b/tests/Adapters/CommonMark/PhikiExtensionTest.php index b4aed43..082b6de 100644 --- a/tests/Adapters/CommonMark/PhikiExtensionTest.php +++ b/tests/Adapters/CommonMark/PhikiExtensionTest.php @@ -83,3 +83,37 @@ class A {} expect($generated)->toMatchSnapshot(); }); + +it('shows diff symbols in gutter for insert and remove annotations', function () { + $environment = new Environment; + + $environment + ->addExtension(new CommonMarkCoreExtension) + ->addExtension(new PhikiExtension(Theme::GithubLight, withGutter: true)); + + $markdown = new MarkdownConverter($environment); + + $generated = $markdown->convert(<<<'MD' + ```php + echo 'Normal line'; + echo 'Remove line'; // [code! remove] + echo 'Insert line'; // [code! insert] + echo 'Another normal line'; + ``` + MD); + + $content = $generated->getContent(); + + // Check that normal lines show numbers + expect($content)->toContain('toContain('> 1'); // First line shows number + expect($content)->toContain('> 4'); // Last line shows number + + // Check that diff lines show symbols + expect($content)->toContain('> -'); // Remove line shows - + expect($content)->toContain('> +echo "This line is not removed!"; +echo "This line is removed."; +echo "This is also removed."; +echo "This line is not removed."; +toMatchSnapshot(); + }); + + it('can mark a fixed negative range of lines as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a range of lines in the middle of a block as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a range with negative offset as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark with an open ended range as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark an offset with total as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a negative offset with total as inserted', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); +})->with(AnnotationType::Insert->keywords()); + +describe('remove', function () { + it('can mark a single line as removed', function (string $keyword) { + $output = markdown("echo 'Hello, world!'; // [code! {$keyword}]", Theme::GithubLight, Grammar::Php); + + expect($output)->toMatchSnapshot(); + }); + + it('can mark a fixed set of lines as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a fixed negative range of lines as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a range of lines in the middle of a block as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a range with negative offset as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark with an open ended range as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark an offset with total as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); + + it('can mark a negative offset with total as removed', function (string $keyword) { + $output = markdown(<< toMatchSnapshot(); + }); +})->with(AnnotationType::Remove->keywords());