typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Support for multiline comments

Open josh-hernandez-exe opened this issue 7 years ago • 13 comments

The following does not render in the HTML when in Typora:

<!-- my comment -->

In normal html (and also in github flavoured markdown) this would normally result in a multi line comment:

<!-- 
my
multi
line
comment
-->

screenshot from 2018-03-08 17-22-04 screenshot from 2018-03-08 17-22-09

So if I have the following markdown file: screenshot from 2018-03-08 17-14-53 I get the following HTML: screenshot from 2018-03-08 17-16-58

If there is already support for multi-line comments, sorry for the post (but please tell me!).

If there is not support, I would like there to be support of some kind.

josh-hernandez-exe avatar Mar 08 '18 23:03 josh-hernandez-exe

relates #1484

abnerlee avatar May 20 '18 14:05 abnerlee

Fixed in new release

abnerlee avatar Aug 19 '18 01:08 abnerlee

I know this is an OLD problem that was resolved, but I have exactly the same symptoms with the newly installed typora 0.9.79 beta on Linux : any multi-line comments are not seen as comments but regular text. Should I open a new issue?

leberger avatar Nov 19 '19 12:11 leberger

the same issue in mac Version 0.9.9.30.1 (3794)

fastfading avatar Dec 18 '19 07:12 fastfading

@leberger @fastfading could you provide sample files since I'm not able to reproduce this.

abnerlee avatar Dec 26 '19 16:12 abnerlee

Have added a screenshot. I guess you can reproduce the problem by just opening the file, but if not you can have a look at the screenshot.

The version 0.9.79 beta (and 0.9.83 beta) , on Linux neon (kde), I have slightly edited the main theme (css only) to make the comment a little smaller and grey

It seems that if there is no title, paragraph or anything fancy, the multiline works. But when it requires some sort of markdown elements, (even paragraphs), multiline comments does not work.

sample2.txt

Screenshot_20200106_133002

leberger avatar Jan 06 '20 12:01 leberger

Have you been able to replicate the issue? Do you require any further information?

leberger avatar Jan 30 '20 11:01 leberger

Same on macOS Typora v0.9.9.35 (4693). Glad to see it should work in theory 😃

nheeren avatar Aug 30 '20 13:08 nheeren

0.9.98 (beta) in linux also not working 2021-02-28_17-39 2021-02-28_17-39_1

sanjacob avatar Feb 28 '21 17:02 sanjacob

This is still open. Do you have any plan to fix this?

yinjilong avatar Jun 05 '21 10:06 yinjilong

I still meet the same problem on Windows_0.10.11-beta when the multiline comments block contains serial line breaks , like this:

<!--
a

b
c
-->

img1

But cases that not contain serial line breaks work well , like this:

<!--
a
b
c
-->

img2

yuanbug avatar Jul 06 '21 10:07 yuanbug

It's common for me to have multiline comments within my Markdown documentation for one reason or another and this still appears to be an issue as of July 25th, 2023, using version 1.6.7 of Typora on macOS. As noted in comments for this issue, other editors including GitHub and VS Code Preview don't seem to have this problem. As @yuanbug points out, it is caused by line breaks within the comment block, while shift-return (which creates a <br>) renders the entire comment correctly. Shouldn't Typora simply treat everything as a comment when <!-- is encountered until a closing --> is found?

wchisenski avatar Jul 25 '23 22:07 wchisenski

This is still an issue as of Oct. 21, 2024.

CorgiDev avatar Oct 21 '24 16:10 CorgiDev

This is still an issue on Feb 26, 2025.

<!-- omit in toc
# 1. 一级标题
## 1.1. 二级标题 -->

<!-- This is a comment
spanning multiple lines
and it won’t show in the preview -->

## 1.2. 一级标题
## 1.3. 一级标题
## 1.4. 一级标题
## 1.5. 一级标题
## 1.6. 一级标题
## 1.7. 一级标题

Image

kongdd avatar Feb 26 '25 04:02 kongdd