mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
@@ -54,6 +54,10 @@ your global navigation uses more than one level, things will likely be broken.
|
||||
[Bootswatch 4.1]: https://getbootstrap.com/docs/4.1/getting-started/introduction/
|
||||
[dropdowns]: https://getbootstrap.com/docs/4.1/components/navs/#pills-with-dropdowns
|
||||
|
||||
### Other Changes and Additions to Version 1.1
|
||||
|
||||
* Bugfix: Do not normalize URL fragments (#1655).
|
||||
|
||||
## Version 1.0.4 (2018-09-07)
|
||||
|
||||
* Bugfix: Ignore absolute links in Markdown (#1621).
|
||||
|
||||
@@ -104,6 +104,11 @@ class UtilsTests(unittest.TestCase):
|
||||
'style.css?v=20180308c',
|
||||
'style.css?v=20180308c',
|
||||
'../style.css?v=20180308c'
|
||||
],
|
||||
'#some_id': [
|
||||
'#some_id',
|
||||
'#some_id',
|
||||
'#some_id'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -160,6 +165,11 @@ class UtilsTests(unittest.TestCase):
|
||||
'style.css?v=20180308c',
|
||||
'../style.css?v=20180308c',
|
||||
'../../style.css?v=20180308c'
|
||||
],
|
||||
'#some_id': [
|
||||
'#some_id',
|
||||
'#some_id',
|
||||
'#some_id'
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ def normalize_url(path, page=None, base=''):
|
||||
path = path_to_url(path or '.')
|
||||
# Allow links to be fully qualified URL's
|
||||
parsed = urlparse(path)
|
||||
if parsed.scheme or parsed.netloc or path.startswith('/'):
|
||||
if parsed.scheme or parsed.netloc or path.startswith(('/', '#')):
|
||||
return path
|
||||
|
||||
# We must be looking at a local path.
|
||||
|
||||
Reference in New Issue
Block a user