Closed marmotz closed 11 years ago
Yes, same title generates the same identifier. That may change when the option for automatic titles numerotation will be developed.
An other solution should be to modify title markup:
source:
=title
=title=
=title=anchor
generate:
<h1 id="title">title</h1> <!--- Automatic generation based on title text -->
<h1 id="title">title</h1> <!--- Automatic generation based on title text -->
<h1 id="anchor">title</h1> <!--- "Manual" generation based on anchor text -->
What do you think about ?
To be honest, I don't know. As I wrote, lightweight markup languages should stay lightweight.
MediaWiki and Markdown has automatic headers identifiers, and workarounds based on pure HTML code. But your proposal is interresting. I have to think about it.
SkrivMarkup have also an automatic anchor generation based on title name. But no duplication check. And I think it's a good thing because only the user should change the anchor and only if he wants.
In my opinion, SkrivMarkup should generate a warning when it detect duplicate title anchor, but nothing else. And with a way to specify anchor, user could solve this problem (he sees thanks to warning)
Yes, but with your proposal, it becomes impossible to write that:
= One bath = 3 showers
Because it will generates:
<h1 id="3-showers">One bath</h1>
Instead of:
<h1>One bath = 3 showers</h1>
So, the idea is great, but maybe we should find another syntax.
links are like that:
[[name|http://url]]
So, if you want "name1|name2" it's "impossible" to write:
[[[name1|name2|http://url]]]
Fortunately, you have introduce escaping method (http://markup.skriv.org/language/syntax#escaping):
[[[name1\|name2|http://url]]]
So you should use:
= One bath \= 3 showers
Yep, why not. OK, I'll do it.
Cool :) \o/
Any news about this modification ?
I have a lot of work... I'll try to do it (and syntax highlight, and titles auto-numbering) this week.
Do you want I try to work on this part ?
If you want. I've never refused one of your pull requests ;-)
done :)
source code
generate
Id subtitle1 and subtitle2 exist 2 times.
So a link to #subtitle1 go to first h2.subtitle1 and second h2.subtitle1 will be never callable.