yohannes / Thoughtless

An iOS app that lets user quickly jot down thoughts with Markdown support
MIT License
27 stars 6 forks source link

Add task list markdown to parser #116

Closed yohannes closed 7 years ago

yohannes commented 7 years ago

example:

<div class="markdown-example" id="example-extras" style="display:none">
<pre class="source">
GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey @kneath — love your sweater!

But I have to admit, tasks lists are my favorite:

- [x] This is a complete item
- [ ] This is an incomplete item

When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too!

And, of course emoji! :<span></span>sparkles: :<span></span>camel: :<span></span>boom:
</pre>
<div class="rendered">
  <p>GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey <a href="https://github.com/kneath" class="user-mention">@kneath</a> — love your sweater!</p>

  <p>But I have to admit, tasks lists are my favorite:</p>

  <ul class="task-list">
  <li class="task-list-item">
  <input type="checkbox" class="task-list-item-checkbox" checked disabled> This is a complete item</li>
  <li class="task-list-item">
  <input type="checkbox" class="task-list-item-checkbox" disabled> This is an incomplete item</li>
  </ul>
  <p>When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too!</p>
  <p>And, of course emoji! <img class="emoji" title=":sparkles:" alt=":sparkles:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2728.png" height="20" width="20" align="absmiddle"> <img class="emoji" title=":camel:" alt=":camel:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f42b.png" height="20" width="20" align="absmiddle"> <img class="emoji" title=":boom:" alt=":boom:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4a5.png" height="20" width="20" align="absmiddle"></p>

</div>
</div>
yohannes commented 7 years ago

solution: https://github.com/yoha/Thoughtless/commit/2684ef632a093a1856340d62cbc8c6852468ec15