fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b978e0
)
local changes from ve
author
Jan Szejko
<j-sz@o2.pl>
Thu, 3 Mar 2016 12:40:26 +0000
(13:40 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Thu, 3 Mar 2016 12:40:26 +0000
(13:40 +0100)
librarian/pyhtml.py
patch
|
blob
|
history
librarian/pypdf.py
patch
|
blob
|
history
diff --git
a/librarian/pyhtml.py
b/librarian/pyhtml.py
index
9264c15
..
1043f4f
100644
(file)
--- a/
librarian/pyhtml.py
+++ b/
librarian/pyhtml.py
@@
-231,7
+231,10
@@
u"""%(wskazowki)s
# let's pull definiens from another document
if self.options['slowniczek_xml'] is not None and (nxt is None or nxt.tag != 'definiens'):
sxml = self.options['slowniczek_xml']
# let's pull definiens from another document
if self.options['slowniczek_xml'] is not None and (nxt is None or nxt.tag != 'definiens'):
sxml = self.options['slowniczek_xml']
- defloc = sxml.xpath("//definiendum[text()='%s']" % element.text)
+ if "'" in (element.text or ''):
+ defloc = sxml.xpath("//definiendum[text()=\"%s\"]" % (element.text or '').strip())
+ else:
+ defloc = sxml.xpath("//definiendum[text()='%s']" % (element.text or '').strip())
if defloc:
definiens = defloc[0].getnext()
if definiens.tag == 'definiens':
if defloc:
definiens = defloc[0].getnext()
if definiens.tag == 'definiens':
diff --git
a/librarian/pypdf.py
b/librarian/pypdf.py
index
759e1f3
..
b99f6ad
100644
(file)
--- a/
librarian/pypdf.py
+++ b/
librarian/pypdf.py
@@
-350,7
+350,10
@@
class EduModule(Xmill):
if self.options['slowniczek_xml'] is not None and (nxt is None or nxt.tag != 'definiens'):
sxml = self.options['slowniczek_xml']
assert element.text != ''
if self.options['slowniczek_xml'] is not None and (nxt is None or nxt.tag != 'definiens'):
sxml = self.options['slowniczek_xml']
assert element.text != ''
- defloc = sxml.xpath("//definiendum[text()='%s']" % element.text)
+ if "'" in (element.text or ''):
+ defloc = sxml.xpath("//definiendum[text()=\"%s\"]" % (element.text or '').strip())
+ else:
+ defloc = sxml.xpath("//definiendum[text()='%s']" % (element.text or '').strip())
if defloc:
definiens = defloc[0].getnext()
if definiens.tag == 'definiens':
if defloc:
definiens = defloc[0].getnext()
if definiens.tag == 'definiens':