Skip to content

Commit

Permalink
Adding checking of last inline against next block token.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdewinter committed Sep 10, 2020
1 parent 512fb5a commit 0d7be85
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 44 deletions.
2 changes: 1 addition & 1 deletion publish/test-results.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pymarkdown/link_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ def __create_link_token(
column_number,
)
token_to_append = EndMarkdownToken(
MarkdownToken.token_inline_link, "", "", None, False
MarkdownToken.token_inline_link, "", "", inline_blocks[ind], False
)
else:
assert start_text == LinkHelper.image_start_sequence
Expand Down
21 changes: 17 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- determine which errors to print and which to log

## Bugs - General
## Bugs - General - Nice To Have

- make better use of `index_indent`
- merge leading_spaces code from both container tokens
Expand All @@ -17,15 +17,29 @@
- where is `elif starting_whitespace:` used? why? better way to do it?
- image token handling confusing and non-standard
- fenced code block handling of line/col could be better
- HTML and Fenced Blocks and better handling of capturing newlines to avoid counting token height
- verifying vs validating?
- verify which inlines cannot contain newlines and verify with line/col
- autolinks
- raw_html
- track down uses of rehydrate_index in consistency checks and make to have cases to verify that each is updating properly, including multi
- all types of end-inlines and inlines at end i.e. 50

## Bugs - General - Solve

- links, 518b
- fenced, 99 with more blanks
- html block skipped

## Bugs - General - Uncategorized

- why is space after atx in text?
- why does hard break not have \n?
- hard break followed by 3 spaces, then emphasis
- variations of 52e with extra spaces after, etc.
- variation with start of 52e, then hard break, then something like start of 52e again i.e. make /x02 splitter come into affect
- hard break followed by each inline type
- hard break at start of text?
- HTML and Fenced Blocks and better handling of capturing newlines to avoid counting token height
- verifying vs validating?
- 634a in bq and in list
- raw html, 500
- links, 518b
Expand All @@ -42,7 +56,6 @@
- different image link types, with variations on their values
- 525 with text and other inlines before and after
- need "full" example of image
- track down uses of rehydrate_index in consistency checks and make to have cases to verify that each is updating properly, including multi

## Bugs - Character Entities

Expand Down
3 changes: 2 additions & 1 deletion test/test_markdown_inline_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ def test_inline_links_518a():
assert_token_consistency(source_markdown, actual_tokens)


@pytest.mark.skip
@pytest.mark.gfm
def test_inline_links_518b():
"""
Expand All @@ -1177,7 +1178,7 @@ def test_inline_links_518b():
'[link(2,1):inline:/uri:title::::link:False:":\n:\n:\n]',
"[text(2,2):link:]",
"[end-link:::False]",
"[text(2,23):\ndef::\n]",
"[text(6,3):\ndef::\n]",
"[end-para:::True]",
]
expected_gfm = """<p>abc\n<a href="/uri" title="title">link</a>\ndef</p>"""
Expand Down
2 changes: 1 addition & 1 deletion test/test_markdown_setext_headings.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_setext_headings_052a():
c</h1>"""

# Act
actual_tokens = tokenizer.transform(source_markdown, show_debug=True)
actual_tokens = tokenizer.transform(source_markdown)
actual_gfm = transformer.transform(actual_tokens)

# Assert
Expand Down
Loading

0 comments on commit 0d7be85

Please sign in to comment.