Skip to content

Commit cbaff5f

Browse files
committed
Add hard_break_escape test suite.
1 parent 67de36c commit cbaff5f

23 files changed

+324
-29
lines changed

apps/markdown/include/markdown_debug_types.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<5dfe1184677fa8b2df412792a1cdff14>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%%-----------------------------------------------------------------------------
44
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
55
%%% Copyright (c) WhatsApp LLC

apps/markdown/include/markdown_event.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<443ad3aacfcbd218931667178549b4bf>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%%-----------------------------------------------------------------------------
44
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
55
%%% Copyright (c) WhatsApp LLC

apps/markdown/include/markdown_resolve.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<f3c34f460fc33134b76f71b572dc5dd5>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%%-----------------------------------------------------------------------------
44
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
55
%%% Copyright (c) WhatsApp LLC

apps/markdown/include/markdown_state.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<d47b91f960b582a199d7c8e9bd377e58>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%%-----------------------------------------------------------------------------
44
%%% Copyright (c) Meta Platforms, Inc. and affiliates.
55
%%% Copyright (c) WhatsApp LLC

apps/markdown/src/construct/markdown_construct_gfm_table.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,9 +1151,9 @@ resolve_loop(Tokenizer1 = #markdown_tokenizer{events = Events}, State1 = #resolv
11511151
resolve_loop(Tokenizer1 = #markdown_tokenizer{}, State1 = #resolve{}) ->
11521152
{Tokenizer1, State1}.
11531153

1154-
-spec cell_to_string(cell()) -> dynamic().
1155-
cell_to_string(#cell{exit = Exit, enter = Enter, data_enter = DataEnter, data_exit = DataExit}) ->
1156-
markdown_debug:rust_debug_string({Exit, Enter, DataEnter, DataExit}).
1154+
% -spec cell_to_string(cell()) -> dynamic().
1155+
% cell_to_string(#cell{exit = Exit, enter = Enter, data_enter = DataEnter, data_exit = DataExit}) ->
1156+
% markdown_debug:rust_debug_string({Exit, Enter, DataEnter, DataExit}).
11571157

11581158
%% @private
11591159
-spec resolve__enter_data(Tokenizer, State, Event) -> {Tokenizer, State} when

apps/markdown/src/construct/markdown_construct_text.erl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ resolve(
340340
}
341341
}
342342
) ->
343-
io:format("\n\n[~w] BEFORE text:resolve\n\n~ts\n\n", [
344-
markdown:counter_get(), markdown_debug:rust_debug_string(Tokenizer1)
345-
]),
343+
% io:format("\n\n[~w] BEFORE text:resolve\n\n~ts\n\n", [
344+
% markdown:counter_get(), markdown_debug:rust_debug_string(Tokenizer1)
345+
% ]),
346346
Tokenizer2 = markdown_construct_partial_whitespace:resolve_whitespace(Tokenizer1, HardBreakTrailing, true),
347347
Tokenizer3 =
348348
case GfmAutolinkLiteral of
@@ -354,7 +354,7 @@ resolve(
354354
#markdown_tokenizer{events = Events3, map = EditMap3} = Tokenizer3,
355355
{EditMap4, Events4} = markdown_edit_map:consume(EditMap3, Events3),
356356
Tokenizer4 = Tokenizer3#markdown_tokenizer{events = Events4, map = EditMap4},
357-
io:format("\n\n[~w] AFTER text:resolve\n\n~ts\n\n", [
358-
markdown:counter_get(), markdown_debug:rust_debug_string(Tokenizer4)
359-
]),
357+
% io:format("\n\n[~w] AFTER text:resolve\n\n~ts\n\n", [
358+
% markdown:counter_get(), markdown_debug:rust_debug_string(Tokenizer4)
359+
% ]),
360360
{Tokenizer4, {ok, none}}.

apps/markdown/src/markdown.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ counter_reset() ->
9191

9292
-spec doc() -> binary().
9393
doc() ->
94-
<<"| a |\n| - |\n| b |"/utf8>>.
94+
<<"a\\\nb."/utf8>>.
9595
% <<"[foo [bar](/uri)](/uri)\n"/utf8>>.
9696
% <<"*foo __bar *baz bim__ bam*"/utf8>>.
9797
% <<"[bar](/foo)">>.
@@ -400,6 +400,7 @@ println!("{:?}", tree);
400400
to_mdast(MarkdownInput, ParseOptions = #markdown_parse_options{}) when is_binary(MarkdownInput) ->
401401
case markdown_parser:parse(MarkdownInput, ParseOptions) of
402402
{ok, {Events, ParseState}} ->
403+
io:format("~ts\n", [markdown_debug:rust_debug_string(Events)]),
403404
Bytes = markdown_parse_state:bytes(ParseState),
404405
markdown_mdast:compile(Events, Bytes);
405406
Error = {error, _Message} ->

apps/markdown/src/markdown_debug_types.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<4917bacc2f6237f415fd2c0bcd0068e9>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%% % @format
44
%%%-----------------------------------------------------------------------------
55
%%% Copyright (c) Meta Platforms, Inc. and affiliates.

apps/markdown/src/markdown_event.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<5ac81054a0d69c056c9bd24a051e198a>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%% % @format
44
%%%-----------------------------------------------------------------------------
55
%%% Copyright (c) Meta Platforms, Inc. and affiliates.

apps/markdown/src/markdown_resolve.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%% % DO NOT EDIT: this file was generated by 'just codegen'
2-
%%% % @generated SignedSource<<cc3d043dff4a4ba4cdff18026da3b361>>
2+
%%% % @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
33
%%% % @format
44
%%%-----------------------------------------------------------------------------
55
%%% Copyright (c) Meta Platforms, Inc. and affiliates.

0 commit comments

Comments
 (0)