Code Monkey home page Code Monkey logo

Comments (12)

LightGuard avatar LightGuard commented on May 25, 2024

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/1085333

Reply 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.

tcurdt avatar tcurdt commented on May 25, 2024

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.

tcurdt avatar tcurdt commented on May 25, 2024

IMO this is a non-issue. Please speak if you disagree. Otherwise I will close this soon.

from awestruct.

msavy avatar msavy commented on May 25, 2024

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.

tcurdt avatar tcurdt commented on May 25, 2024

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.

msavy avatar msavy commented on May 25, 2024

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.

tcurdt avatar tcurdt commented on May 25, 2024

Please show the markdown you want to use this with.

from awestruct.

msavy avatar msavy commented on May 25, 2024

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.

tcurdt avatar tcurdt commented on May 25, 2024

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.

msavy avatar msavy commented on May 25, 2024

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.

tcurdt avatar tcurdt commented on May 25, 2024

IMO it's not worth it.

from awestruct.

tcurdt avatar tcurdt commented on May 25, 2024

closing since we seem to agree that it is not worth doing

from awestruct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.