mirror of
https://github.com/kastdeur/dotfiles.git
synced 2025-06-18 05:06:38 +02:00
Added vim plugin + autoindent\n use vi if vim is typed and not available
This commit is contained in:
parent
ef8bf8ac54
commit
061f80b9b9
144 changed files with 30057 additions and 0 deletions
25
vim/vim-latex/doc/db2vim/domutils.py
Executable file
25
vim/vim-latex/doc/db2vim/domutils.py
Executable file
|
@ -0,0 +1,25 @@
|
|||
def GetTextFromElementNode(element, childNamePattern):
|
||||
children = element.getElementsByTagName(childNamePattern)
|
||||
texts = []
|
||||
for child in children:
|
||||
texts.append(GetText(child.childNodes))
|
||||
|
||||
return texts
|
||||
|
||||
def GetText(nodelist):
|
||||
rc = ""
|
||||
for node in nodelist:
|
||||
if node.nodeType == node.TEXT_NODE:
|
||||
rc = rc + node.data
|
||||
return rc
|
||||
|
||||
def GetTextFromElement(element):
|
||||
text = ""
|
||||
child = element.firstChild
|
||||
while not child.nextSibling is None:
|
||||
child = child.nextSibling
|
||||
print child
|
||||
if child.nodeType == child.TEXT_NODE:
|
||||
text = text + child.data
|
||||
|
||||
return text
|
Loading…
Add table
Add a link
Reference in a new issue