[packages/dokuwiki-plugin-titlesanchorlink] fix anchor links appearing in site header
glen
glen at pld-linux.org
Mon Sep 28 15:47:20 CEST 2015
commit f60638d4aaff7fa06412a263e37a5510f53ee8af
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Sep 28 16:38:53 2015 +0300
fix anchor links appearing in site header
https://github.com/Dric/dokuwiki-titlesanchorlink/issues/1
dokuwiki-plugin-titlesanchorlink.spec | 4 +++-
heading-link.patch | 13 +++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/dokuwiki-plugin-titlesanchorlink.spec b/dokuwiki-plugin-titlesanchorlink.spec
index ade7b9d..562fe7b 100644
--- a/dokuwiki-plugin-titlesanchorlink.spec
+++ b/dokuwiki-plugin-titlesanchorlink.spec
@@ -6,11 +6,12 @@
Summary: DokuWiki TitlesAnchorLink Plugin
Name: dokuwiki-plugin-%{plugin}
Version: %{ver}
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/WWW
Source0: https://github.com/Dric/dokuwiki-titlesanchorlink/archive/3ca9927/%{plugin}-%{subver}.tar.gz
# Source0-md5: 2ac066f5186ca085fc3e9e3193211398
+Patch0: heading-link.patch
URL: https://www.dokuwiki.org/plugin:titlesanchorlink
BuildRequires: rpm-php-pearprov >= 4.4.2-11
BuildRequires: rpmbuild(macros) >= 1.553
@@ -30,6 +31,7 @@ similar way to Github.
%prep
%setup -qc
mv *-%{plugin}-*/* .
+%patch0 -p1
%build
version=$(awk '/^date/{print $2}' plugin.info.txt)
diff --git a/heading-link.patch b/heading-link.patch
new file mode 100644
index 0000000..7e4d8e9
--- /dev/null
+++ b/heading-link.patch
@@ -0,0 +1,13 @@
+--- titlesanchorlink/script.js~ 2013-03-05 12:27:46.000000000 +0200
++++ titlesanchorlink/script.js 2015-09-28 16:36:26.690647453 +0300
+@@ -1,6 +1,10 @@
+ jQuery(function () {
+ jQuery(':header').each(function(){
+ var id = jQuery(this).attr('id');
++ if (!id) {
++ // https://github.com/Dric/dokuwiki-titlesanchorlink/issues/1
++ return;
++ }
+ var name = jQuery(this).text();
+ jQuery(this).append('<a title="Link to '+name+'" id="anchor__'+id+'" class="__anchor" href="#'+id+'"><img src="'+DOKU_BASE+'lib/plugins/titlesanchorlink/images/anchor.png" class="__anchor_icon" /></a>');
+ });
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dokuwiki-plugin-titlesanchorlink.git/commitdiff/f60638d4aaff7fa06412a263e37a5510f53ee8af
More information about the pld-cvs-commit
mailing list