Comments (9)
It would be easy to add a compile time option (I don't want to add a runtime option because I'm creeping up on the limits of what I can add to a 32 bit flag word) for reverting to id= (I'm not sure why the W3C decided to depreciate name= and force namespace collisions; perhaps they're planning on depreciating #styles?)
I replaced the +
character in anchors because it's not a legal character for xhtml id=
(and probably not for xhtml name=); If I changed that, it would most certainly have to be a compile-time option.
from discount.
I think name
is deprecated because:
- It's not unique.
- It appears only in anchor elements, and you should be able to link to anything.
I guess I'm okay with compile-time options; I'd just have to keep a couple of different versions around. Might be nice at some point, though, to allow more common command-line options, at least, so that instead of markdown -F 0x1000
I could do something like markdown --this --that --the-other
(I don't remember what 0x1000 is, and have to read the source to find out, IIRC). I dunno, as a hacker (but not a C hacker), I don't see why there should be any such limitation.
Anyway, I do prefer id=
and would like to be able to update older stuff without links changing.
Cheers,
David
from discount.
Thanks for responding, and taking my request under consideration. Greatly appreciated.
from discount.
The markdown program has supported named options for quite some time now. markdown -ftoc
is the same as markdown -F0x1000
.
But take a look at the commits I've just pushed out; they may do the job for you.
from discount.
Thanks. Somehow I missed -ftoc. Is there a --help
option equivalent? I don't know where that's documented.
Your commit does look like exactly what I was hoping for, thanks! Just tried it, though, and got:
> markdown -ftoc --with-id-anchor meta/spec.txt
markdown: illegal option -- -
usage: markdown [-dTV] [-b url-base] [-F bitmap] [-f {+-}flags] [-o ofile] [-s text] [-t text] [file]
How does one specify such options?
Thanks,
David
from discount.
Oh, it's a configure.sh
option. Duh, sorry, trying agin.
from discount.
--with-id-anchor
works great, thanks! Rebuilding to try --with-anchor-default=+
now…
Side note: Looks like make distclean
leaves behind librarian.sh
.
Looks good, although I see now that there have been other changes that change the anchors. Ah well, I guess I'll just rewrote the code I wrote that parses it to parse the new format using .
.
Much appreciated change, BTW. --with-id-anchor
is a huge help.
—David
from discount.
I'm going to end up reverting the --with-anchor-default code, because it's difficult to test properly (I have to jump through hoops to get the constant into a form that can be stuffed into a version string so I can detect it later.) The attempts to properly xhtmlify the code is what made the format of the anchor title change, sorry!
from discount.
No problem. I've decided not to use it because so much else has changed anyway (i.e., replacing all non-alphanumeric characters with the separator).
One thing you might consider changing about the ID generation, however, is ignoring sub-elements. For example, I have Markdown like this:
### `ok( boolean, description )` ###
The ID created for that is L.code.ok..boolean..description....code.
. Kind of awful that the <code>
sub-element is included. I think that ok..boolean..description..
would make a lot more sense. Thoughts?
Thanks again!
David
from discount.
Related Issues (20)
- Call to ldconfig in librarian.sh cannot be disabled HOT 3
- make fails with link error HOT 2
- New release soon? HOT 4
- Flag for copying img alt text to title. HOT 5
- About the latest release HOT 7
- Mishandling Activity Pub addresses? HOT 1
- Mishandling of two footnotes one after another HOT 4
- [Feature suggestion] Relaxed parsing for <?theme action?> HOT 1
- [Feature suggestion] Allow class-blocks with multiple classes HOT 2
- RFE: is it possible to start making github releases?🤔 HOT 2
- [crash] When using -x -E, the program attempts to free a string in argv HOT 3
- [crash] When using -T and provide a lot of '#', a heap-buffer-overflow is occured HOT 2
- [crash] Null pointer dereference occurs when using -d HOT 2
- [crash] Out-of-bounds read occurs when using -F 0x03000000 HOT 2
- [crash] Heap buffer overflow occurs when generating a TOC for a header with a lot of spaces as suffix HOT 1
- [crash] heap-use-after-free occurs when using -b and -E HOT 3
- 2.2.7d: is not gcc 14.x ready HOT 3
- # inside <Code> HOT 3
- Fence code block issue HOT 10
- Intentional fallthroughs? HOT 4
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 discount.