gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

Support whitespace in <!--more--> #10708

Open willfaught opened 1 year ago

willfaught commented 1 year ago

<!-- more --> should work too. Also

<!--
more
-->

See https://discourse.gohugo.io/t/support-whitespace-in-more/42797.

bep commented 1 year ago

Any proposal needs to have a compelling arguments as to the "why". What does it solve, improve?

Note that this comes at a cost. Searching for the exact string <!-- more --> is extremely fast and simple.

willfaught commented 1 year ago

Any proposal needs to have a compelling arguments as to the "why". What does it solve, improve?

See https://discourse.gohugo.io/t/support-whitespace-in-more/42797:

For the record, I’ve made the mistake myself a couple of times.

As did I. If

<!--
more
-->

is a lot more work, then at least support <!-- more -->.

agrrh commented 1 year ago

I would like to vote for this proposal.

Most IDEs annotate comments with whitespaces. So, in my case, composing <!--more--> tag looks like this:

Last two steps are not friendly.

It would be great to make parse rules more tolerant to let user just write more and use a hotkeys to comment it.

jmooring commented 4 months ago

First, I suggest you don't do that. Second, your comment is not related to this issue.