How the markdown plugin writes comments

I’ve been using the markdown plugin $:/plugins/tiddlywiki/markdown recently for some markdown content, but I’ve noticed that it’s not possible to write comments. I.e. I don’t need to render them out. I also checked the upstream github repository and there are no instructions or hints in there either. And the usual way of commenting in js doesn’t work either.

00000000<!-- some comments but displayed -->

huh odd. I know I’m just another users, but I’ve been using markdown a little (and plan to more) and I’m seeing comments correctly not show up:

My TW is node, v5.3.6 and with this markdown plugin:

**Markdown**: Markdown parser based on markdown-it
$:/plugins/tiddlywiki/markdown
STABLE *5.3.7-prerelease*

afaicr, I’ve not adjusted any of the settings on the plugin, and playing with the settings, I was unable to get the comments to display.

Can you show a screenshot of how it’s behaving on your system?

I did test with v5.3.7 using https://tiddlywiki.com/plugins/tiddlywiki/markdown/ and it works as expected.

incidentally, I just updated to 5.3.7 …and the normal ‘drag and drop’ refused to accept the import because 5.3.7 isn’t newer than 5.3.7-prerelease apparently (I thought I took a screenshot, but there wasn’t one when I checked). Delete the old plugin and import from scratch got it updated, but seems a bug in sorting somewhere?

https://markdown-it.github.io/

It’s a pain in the arse again. I also tested it on the markdown site and it won’t show up on the site. But it will show up locally for me. And I tested it in the upstream library URL and found that it does show up, as shown in the image.

My plugin version is 5.3.6, but the TiddlyWiki version is 5.3.7, is this the source of the problem?

To be able to parse comments in markdown-it.github.io, you should check the html checkbox above, which is enabled in the markdown plugin.

yes,you are right, if check the html checkbox ,it work. but why in plugins it does’n work?

The demo page works, if you do enable HTML encoding with the checkbox

I did test it with: https://tiddlywiki.com/plugins/tiddlywiki/markdown/ and it works there.

I reduplicated it on v5.3.6. It should happen when Enable WikiText is enabled, while Enabled parser rules doesn’t have commentinline and commentblock.

It seems this issue is reproducible. Strangely, however, it’s not reproducible on the plugin’s website. I’ve updated the plugin, but it still hasn’t resolved the problem. Here is my TiddlyWiki information. I suspect some plugins might be interfering, but I haven’t been able to pinpoint them yet.

Wiki Information

TiddlyWiki Version: 5.3.7
Current palette: $:/palettes/LetItSnow
Current theme: $:/themes/linonetwo/itonnote
Current layout: 
Browser language setting: zh-CN
Default type for missing tiddlers: 
Auto save setting: yes
Code wrapping setting: pre-wrap
Sticky titles setting: yes
Sidebar layout setting: fluid-fixed
Auto focus field setting for new tiddlers: title
Current storyview setting: pop
Toolbar text setting: no
Toolbar icon setting: yes
Button class setting: tc-btn-invisible
Navigation address bar setting: permaview
Tiddler opening behaviour setting for navigations from outside the story river: bottom
Tiddler opening behaviour setting for navigations from within the story river: bottom
CamelCase linking setting: disable
Keyboard shortcuts that have been customised: 
Disabled plugins: $:/plugins/linonetwo/super-tag,$:/plugins/mabuqian/time-for-task
Plugins: 
  $:/core - 5.3.7
  $:/languages/zh-Hans - 5.3.7
  $:/plugins/benwebber/motion - 0.3.0
  $:/plugins/chanilino/viz - 1.0.1
  $:/plugins/EvidentlyCube/AdvancedPerformance - 1.1.4
  $:/plugins/flibbles/relink - 2.5.1
  $:/plugins/flibbles/relink-fieldnames - 2.5.0
  $:/plugins/flibbles/relink-markdown - 2.5.1
  $:/plugins/flibbles/relink-titles - 2.4.0
  $:/plugins/Gk0Wk/CPL-Repo - 2025.03.29
  $:/plugins/Gk0Wk/echarts - 0.2.13
  $:/plugins/Gk0Wk/focused-tiddler - 0.0.3
  $:/plugins/Gk0Wk/page-toc - 0.0.5
  $:/plugins/Gk0Wk/sidebar-resizer - 0.0.6
  $:/plugins/inmysocks/IconMenus - 0.0.4
  $:/plugins/kookma/commander - 2.1.14
  $:/plugins/kookma/hsl - 1.2.1
  $:/plugins/kookma/kara - 0.9.7
  $:/plugins/kookma/refnotes - 1.9.0
  $:/plugins/kookma/section - 1.2.2
  $:/plugins/kookma/shiraz - 2.9.7
  $:/plugins/kookma/shiraz-callout - 0.8.0
  $:/plugins/kookma/tamasha - 0.6.1
  $:/plugins/kookma/utility - 3.2.3
  $:/plugins/linonetwo/autocomplete - 0.5.0
  $:/plugins/linonetwo/commandpalette - 2.1.1
  $:/plugins/linonetwo/github-external-image - 0.1.0
  $:/plugins/linonetwo/in-tagtree-of - 0.2.0
  $:/plugins/linonetwo/itonnote - 3.4.4
  $:/plugins/linonetwo/open-in-external-app - 0.2.0
  $:/plugins/linonetwo/opened-tiddlers-bar - 1.0.0
  $:/plugins/linonetwo/source-control-management - 0.3.0
  $:/plugins/linonetwo/tag-tree-picker-macro - 0.0.1
  $:/plugins/linonetwo/tidgi-external-attachments - 1.5.2
  $:/plugins/linonetwo/tidgi-ipc-syncadaptor - 1.0.0
  $:/plugins/linonetwo/tidgi-ipc-syncadaptor-ui - 1.0.0
  $:/plugins/linonetwo/tw-mobile-sync - 0.9.0
  $:/plugins/linonetwo/tw-react - 1.0.0
  $:/plugins/mabuqian/gumo-customisation - 0.5.1
  $:/plugins/mabuqian/PopControlPanel - 0.1.2
  $:/plugins/mabuqian/xnote - 0.3.3
  $:/plugins/mat/field-value-selector - 0.0.1
  $:/plugins/nico/notebook-mobile - 1.0.0
  $:/plugins/oeyoews/echarts-addons - 0.0.4
  $:/plugins/oeyoews/neotw-play-sound - 0.3.0
  $:/plugins/oeyoews/tiddlywiki-codemirror-6 - 3.8.0
  $:/plugins/telmiger/HarveyBalls - 0.0.6
  $:/plugins/telmiger/PluginSize - 1.0.1
  $:/plugins/telmiger/rpn - 0.7.3
  $:/plugins/tiddlywiki/browser-sniff - 5.3.7
  $:/plugins/tiddlywiki/dynannotate - 5.3.7
  $:/plugins/tiddlywiki/dynaview - 5.3.7
  $:/plugins/tiddlywiki/filesystem - 5.3.7
  $:/plugins/tiddlywiki/highlight - 5.3.7
  $:/plugins/tiddlywiki/jszip - 5.3.7
  $:/plugins/tiddlywiki/markdown - 5.3.7
  $:/plugins/tiddlywiki/qrcode - 5.3.7
  $:/plugins/tiddlywiki/tiddlyweb - 5.3.7
  $:/plugins/tobibeer/setvars - 0.6.0
  $:/plugins/wikilabs/edit-tabs - 3.0.2
  $:/plugins/xp/aggregation - 0.5.7
  $:/plugins/xp/splashscreen - 0.2.2
  $:/plugins/yaisog/choose-random-filter - 0.9.0
  $:/plugins/yaisog/taggingtree-filter - 0.9.0
  $:/plugins/yaisog/tagstree-filter - 0.9.0
  $:/temp/info-plugin - 
  $:/themes/linonetwo/itonnote - 1.3.4
  $:/themes/tiddlywiki/vanilla - 5.3.7

Open the plugin tiddler, then go to the settings tab. You can compare it to the plugin settings on https://mws.tiddlywiki.com/ (where comments seem to be working)

The version should not be an issue unless the plugin itself had changes in the last version (which is unlikely in this case).

1 Like

I know what happened. It’s because my markdown configuration tiddler $:/config/markdown/renderWikiTextPragma was modified by another plugin. Normally it contains the following, and I don’t have that much.

This is plugin provide.

\rules only html entity syslink prettylink image prettyextlink wikilink commentblock commentinline macrocallblock macrocallinline transcludeblock transcludeinline filteredtranscludeblock filteredtranscludeinline

but this is mine.

\rules only html image macrocallinline syslink transcludeinline wikilink prettylink filteredtranscludeblock macrocallblock transcludeblock 

I can fix it myself.