Comments (12)
Could this be caused by the change to rdiscount?
On Fri, Jul 15, 2011 at 13:15, msavy <
[email protected]>wrote:
Duplicate ID attributes generated when same heading text used multiple
times. This causes invalid HTML to be generated.Example:
## BoxGrinder Build ### 0.10.0 (end of June 2011) .... ## BoxGrinder Build ![BoxGrinder Build][bgbuild_medium] BoxGirinder Build source code is spread across three repositories.
Produces two:
BoxGrinder Build
Possible solutions:
- change to class, but you lose anchor links
- in the case of ambiguity change the ID to something else
boxgrinder_build_h2_1, boxgrinder_build_h2_2.- or it is an error to have the same title maybe?
Example as of now:
https://gist.github.com/1085333Reply to this email directly or view it on GitHub:
https://github.com/bobmcwhirter/awestruct/issues/19
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp
Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling
PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
from awestruct.
Hm. Maybe it has changed because of rdiscount.
But TBH. How should this work at all? If you have two headers like that ...and even if you resolve the ambiguity so you have non-clashing id's ...what is the link supposed to point at?
from awestruct.
IMO this is a non-issue. Please speak if you disagree. Otherwise I will close this soon.
from awestruct.
I don't understand what you mean when you say "what is the link supposed to point at". For boxgrinder.org we frequently use the anchor links when cross referencing content, or for tables of contents.
It seems valid to me for it to be possible to have more than one title (e.g. a subtitle) without causing an ID clash.
For instance wiki handles it properly.
h1. wibble
h2. introduction
h1. wobble
h2. introduction
Unless I am completely mistaken the above would cause problems, and I think it is valid.
from awestruct.
So you want to refer to a certain anchor. From your example:
## BoxGrinder Build
![BoxGrinder Build][bgbuild_medium]
Now this points to "BoxGrinder Build". All good.
Now you are saying you want:
## BoxGrinder Build
![BoxGrinder Build][bgbuild_medium]
## BoxGrinder Build
![BoxGrinder Build][bgbuild_medium]
How do you want to distinguish between the two?
from awestruct.
I think they should be numbered anchors to disambiguate. This is how the likes of wikimedia does it.
I mocked up an example in wikimedia and this is what was produced:
For the TOC (ignoring the actual sections for brevity and showing the resultant anchor links)
1 test -> #test
1.1 wibble -> #wibble
1.1.1 test -> #test_2
2 test -> #test_3
2.1 wobble -> #wobble
2.1.1 test -> #test_4
from awestruct.
Please show the markdown you want to use this with.
from awestruct.
Sure, here's the example:
https://gist.github.com/b3686c7321f58827fce9
So for this I think something such as #boxgrinder_build_2 would be fine. That'd be good for TOC/cross linking purposes.
from awestruct.
So you have
## BoxGrinder Build
twice. So to what is
![BoxGrinder Build][bgbuild_medium]
supposed to link to?
Not sure how ambiguity is supposed to be resolvable.
from awestruct.
That is an image not a link, but I see your point.
Unless we extend the syntax to explicitly state which link (hierarchically could be one way), otherwise it assumes it is the nearest match by using scoping.
Possibly not worth the effort?
from awestruct.
IMO it's not worth it.
from awestruct.
closing since we seem to agree that it is not worth doing
from awestruct.
Related Issues (20)
- Minify causes page generation to hang HOT 11
- fix home page get started instructions HOT 4
- Rake Preview HOT 1
- Error on awestruct --init HOT 3
- no styles in a new bootstrap based project HOT 2
- How to set the deploy username? HOT 2
- compiling bootstrap js HOT 2
- sassc gem breaks pipeline HOT 1
- awestruct quietly exits when there are ERB errors in site.yml HOT 2
- Update my account HOT 1
- Sitemap plugin: unable to ignore .htaccess in subdirectories (for example "/foo/.htaccess") generally
- http://awestruct.org/ is dead HOT 2
- Post date doesn't correctly support 2020+ dates HOT 3
- An error occurred: no implicit conversion of nil into String
- awestruct --init without parameter creates an error HOT 2
- asciidocotor dependecy fix to 1.5.x, what is with 2.x support? HOT 4
- engine.site.pages_by_output_path is nil in lib/awestruct/rack/generate.rb HOT 2
- http://awestruct.org/ leads to casino website HOT 8
- [Chore] gemspec enhancement
- Rename master branch to main? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awestruct.