1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-27 15:53:14 +00:00
TiddlyWiki5/plugins/tiddlywiki
RJ Skerry-Ryan 8d9dc0cd29
Markdown: Don't emit paragraph tags when a paragraph is "tight". (#5848)
* markdown: Don't emit paragraph tags when a paragraph is "tight".

Motivation: Since the upgrade to remarkable.js (#3876), lists are rendered as
HTML like this:

```
<ul>
  <li><p>One</p></li>
  <li><p>Two</p></li>
  <li><p>Three</p></li>
</ul>
```

The paragraph nodes insert blocks that break the visual flow of the list and are
unexpected e.g. compared to WikiText markup's rendering of a bulleted list.

Solution: remarkable.js annotates certain paragraph nodes as "tight", and in the
bulleted list case, the paragraph nodes wrapping the text of each list item are
marked tight.

remarkable uses the tight property to [elide paragraph tags in its
renderer](58b6945f20/lib/rules.js (L136-L142)).

This change implements the equivalent logic in TiddlyWiki's markdown rendering:
If a paragraph is marked tight, then we elide the `<p>` tag wrapping its children.

* Use ES5 Array.concat instead of ES6 spread operator.
2021-07-06 11:33:12 +01:00
..
async Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
aws AWS Plugin: Add aws-encodeuricomponent filter that also encodes single quotes 2020-09-23 17:32:38 +01:00
bibtex BibTeX Plugin: Force fieldnames to be lowercase 2021-04-07 17:43:41 +01:00
blog Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
browser-sniff Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
browser-storage Browser-storage: Fix startup constraints 2020-08-11 12:32:39 +01:00
cecily Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
classictools Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
codemirror Pass reference to widget to CodeMirror (#5790) 2021-06-14 16:46:39 +01:00
codemirror-autocomplete Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closebrackets Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closetag Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-fullscreen-editing Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-emacs Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-sublime-text Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-vim Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-css Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlembedded Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlmixed Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-javascript Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-markdown Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-x-tiddlywiki Introduce "parent-plugin" field to control how plugins are displayed in the chooser 2019-09-25 16:16:28 +01:00
codemirror-mode-xml Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-search-replace Update CodeMirror to 5.58.3 - fix vim-mode cursor invisible (#5172) 2020-12-01 18:11:40 +00:00
comments Replace various &nbsp; with tc-small-gap classes (#4926) 2020-10-28 13:13:55 +00:00
consent-banner Consent widget 2020-07-13 11:49:21 +01:00
d3 Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
dynannotate Dynannotate: Fix off-by-one error for end of annotation text 2020-12-09 19:14:43 +00:00
dynaview Dynaview: Fix transclude-when-visible macro 2020-09-23 17:33:00 +01:00
evernote Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
external-attachments Fix external-attachments plugin relative path bug 2020-10-26 18:36:46 +00:00
filesystem Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
freelinks Freelinks: Add a filter for which tiddlers can be the targets of freelinks 2021-02-13 12:03:35 +00:00
github-fork-ribbon Merge branch 'tiddlywiki-com' 2020-04-15 16:03:38 +01:00
googleanalytics Add new "Consent Banner" plugin, and update Google Analytics plugin to use it 2020-06-22 11:31:54 +01:00
hammerjs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
help Fix broken filters introduced in b179a6011 2020-02-29 15:56:22 +00:00
highlight Add default "tiddlywiki" styles to CodeMirror and Highlight.js (#5128) 2020-11-28 14:07:12 +00:00
innerwiki Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
internals Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
jasmine Fix browser testing (#5254) 2020-12-11 10:12:01 +00:00
jszip JSZip plugin: Fix example formatting 2020-10-19 09:44:55 +01:00
katex Update to KaTeX v0.12.0 2021-01-31 15:11:12 +00:00
markdown Markdown: Don't emit paragraph tags when a paragraph is "tight". (#5848) 2021-07-06 11:33:12 +01:00
menubar Menubar plugin: Add optional dropdown-position 2021-03-08 17:47:04 +00:00
mobiledragdrop Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
nodewebkitsaver Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
pluginlibrary Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
powered-by-tiddlywiki Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
qrcode Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
railroad Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
savetrail Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
sax Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
share Share Plugin: Fix problem with sharing double quoted tiddler titles 2020-09-28 11:31:58 +01:00
stacked-view Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
tahoelafs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
text-slicer Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
tiddlyweb Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
translators Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
tw2parser Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
tw5.com-docs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
twitter Twitter Plugin: Add warning if the wiki needs to be saved and reloaded 2020-04-21 21:22:13 +01:00
upgrade Disable autosave in the upgrade wizard 2020-10-26 17:28:57 +00:00
xlsx-utils Xlsx-utils: Fix crash when using deserializer 2021-01-16 15:37:50 +00:00
xmldom Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00