-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract each bullet point in Markdown nested bullet lists into its own string #131
Comments
This will address github's issue #131.
Ah, I see. Thanks for the follow-up, I've added a testcase for this. |
@toddy15 AFAICT the test case you added demonstrates that the current code indeed has the bug this ticket is about, i.e. "Nested item 1" and "Nested item 2" are not extracted into their own string. So I'm not surprised it passes. While the test case I've proposed instead fails, in order demonstrate that the code does not behave as it should. So I believe that "This will address github's issue #131" is incorrect: commit 5658ace does not address this issue, it merely confirms it in its own way. Are we on the same page? |
Yes, we are on the same page. The commit message is a bit misleading, I admit. What I meant was that this will address the issue, not that it solved the issue. However, adding a test case that fails would render the Travis CI useless, so I didn't do it. It might be better to create a test case with the expected output but disable the specific test for now. |
It might be better to create a test case with the expected output but disable the specific test for now.
Agreed :)
|
The test is now failing as expected, but the testsuite still passes because it's marked as TODO. Quite a nice feature of Test::More. |
I've recently fixed a similar bug in Asciidoc, #149, that is still pending PR. I wonder if a similar patch would work for markdown. |
This seems to be solved in 0.57 at least. I'm seeing these metadata entries in the .po files:
|
Hi,
Hans-Christoph Steiner (2020-03-20):
This seems to be solved in 0.57 at least. I'm seeing these metadata entries in the .po files:
* `#. type: Bullet: ' - '`
* `#. type: Bullet: ' * '`
* `#. type: Bullet: ' * '`
* `#. type: Bullet: '* '`
Interesting!
Unfortunately my results differ:
- With 0.57, I still don't see nested bullet lists extracted separately.
- On current Git master, if I enable the `MarkDownNestedLists` test
in `t/20-text.t`, I still see it fail as expected.
Are you sure the success you're seeing is with _nested_ bullet lists?
|
Here is another regex-based parser of Markdown. We may find some interesting bits in there: https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/markdown.tmLanguage.base.yaml |
A few months ago I've mentioned "(vague) plans for other improvements in Markdown bullet list handling" I've mentioned a few months ago on #7 (comment). The design discussion there was resolved and #7 was rightfully closed so it's time to follow-up with this.
Single-level Markdown bullet lists are handled properly but as soon as one adds a second, nested level, string extraction starts to get suboptimal. Our translators at Tails have complained about the additional work it causes for them e.g. when strings become fuzzy.
I've pushed a test case to https://github.com/intrigeri/po4a/tree/mdwn-nested-bullet-lists that demonstrates the problem.
The text was updated successfully, but these errors were encountered: