-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix task list rendering (Fix #749) #757
Conversation
- Add “task-list” class to task list `<ul>` elms - Add “task-list-item” class to task list `<li>` elms - Hide list bullets on unordered task lists `<li>` elms - Display list numbers on ordered task lists `<li>` elms - Render accessible task list items by wrapping checkbox and text in `<label>` elm
@QingWei-Li — I suspect this is a general Travis issue and not an actual docsofy build issue. Can we rerun CI to clear this PR for a merge? |
Excellent! Thanks, @QingWei-Li. |
Let's create a follow up PR to provide some tests for this feature. |
@timaschew -- agreed on the need for automated tests, but since docsify has no test framework in place I think testing is a larger conversation to be handled separately. Let's move the discussion to #386 and decide how to move forward. |
Actually, I've created it: #760 |
Awesome! Didn't see that PR. Thanks for the follow-up, @timaschew! |
ping @jhildenbiddle |
Whats up, @timaschew? |
Do you see my comments regarding the |
Weird. I'm not seeing any comments by following the link or manually navigating to the "Files Changed" tab. Maybe they aren't showing because the PR has already been merged? Since I can't see the comment I don't know what the concern is, but if it has to do with the argument name I thought I'd mention that I'm using the same argument names listed on marked.js.org (see "Block level renderer methods" > "list(string body, boolean ordered, number start)"). |
Weird indeed. Attached is a full-page screenshot from my view: Anyway, the start argument allows an ordered list to begin with a number other than 1. A sample block of markdown you can use to test is as follows: 1. One
2. Two
Text
3. Three Docsify should render the following HTML: <ol>
<li>One</li>
<li>Two</li>
</ol>
<p>Text</p>
<ol start="3">
<li>Three</li>
</ol> Notice the |
Ah, got it, thanks for clarification! |
Excellent. Thanks for taking on the testing task, @timaschew. Hopefully we can get others to follow suit. |
This PR restores the task list presentation removed in 4.8: - Add “task-list-item” class to task list `<li>` elms - Hide list bullets on unordered task lists `<li>` elms It also provides several improvements on the pre-4.8 presentation: - Add “task-list” class to task list `<ul>` elms - Display list numbers on ordered task lists `<li>` elms - Render accessible task list items by wrapping checkbox and text in `<label>` elm - Allow task lists to be nested within standard ordered/unordered lists Please makes sure these boxes are checked before submitting your PR, thank you! * [x] Make sure you are merging your commits to `master` branch. * [x] Add some descriptions and refer relative issues for you PR. * [x] DO NOT include files inside `lib` directory.
This PR restores the task list presentation removed in 4.8:
<li>
elms<li>
elmsIt also provides several improvements on the pre-4.8 presentation:
<ul>
elms<li>
elms<label>
elmPlease makes sure these boxes are checked before submitting your PR, thank you!
master
branch.lib
directory.