Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heading anchoring #38

Open
bouncepaw opened this issue Jan 29, 2022 · 4 comments
Open

Heading anchoring #38

bouncepaw opened this issue Jan 29, 2022 · 4 comments

Comments

@bouncepaw
Copy link

bouncepaw commented Jan 29, 2022

As of https://anagora.org/flancia-meet-2022-01-29, we agreed that we need common anchoring rules.

Let's define them here

@bouncepaw
Copy link
Author

@codegod100
Copy link
Contributor

codegod100 commented Jan 29, 2022

example from MediaWiki https://www.mediawiki.org/wiki/Help:Links#Internal_links

[[Help:Editing pages#Preview|previewing]]

My logic on this (and most things) is let's not get caught by [[not invented here]] syndrome

If existing paradigms exists, it seems somewhat hostile to not reuse them

@codegod100
Copy link
Contributor

It looks like DokuWiki uses same syntax https://forum.dokuwiki.org/d/38-internal-links-syntax/4

@bouncepaw
Copy link
Author

bouncepaw commented Feb 1, 2022

Seems like MediaWiki simply replaces whitespace with _ and uses it as an id for headings, it even saves punctuation marks.

So, a heading with the text Special:Not so special would render with id Special:Not_so_special.

That makes sense.

I propose dropping all octothorps from the heading as well. Issue #1 -> Issue_1. Some bugs related to URL parsing will be avoided this way.

What do we do with markup in headings? I guess we only take their content. So, a Mycomarkup like this:

= A heading with a [[link]]

Would result with a heading with this id: A heading with a link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants