Skip to content

Commit

Permalink
commiting, tagging test, pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrett Berg authored and Garrett Berg committed Nov 6, 2013
1 parent 201a62e commit 915f318
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
24 changes: 12 additions & 12 deletions extra/richtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,18 @@ def get_position(html_list, true_position = None, html_position = None,
cur_html_pos += len(textrp.html_text)
cur_true_pos += len(textrp.true_text)
cur_vis_pos += len(textrp.visible_text)
if true_position != None and cur_true_pos> true_position:
if true_position != None and cur_true_pos > true_position:
break
elif html_position != None and cur_html_pos > html_position:
break
elif visible_position != None and cur_vis_pos > visible_position:
break
prev_hpos, prev_tpos, prev_vpos = (cur_html_pos, cur_true_pos,
cur_vis_pos)
else:
raise ValueError("Position is outside of text length " +
str((true_position, html_position, visible_position)))

# going to take a bit more work -- for visual I need to ALSO figure out
# if it is inside of a visual section!!!
if true_position != None:
out_true_pos = true_position
relative_pos = true_position - prev_tpos
Expand Down Expand Up @@ -512,17 +513,16 @@ def html_process_paragraph(bs_paragraph, keepif, keep_plain):
front, back = fback; del fback
style = bs_paragraph.attrs['style']
style_attrs = get_style_attributes(style)
no_newline = False
try:
# Apparently there is such a thing as an "empty paragraph" that
# doesn't trigger a line ending! What an annoying "feature"
if style_attrs['-qt-paragraph-type'] == 'empty':
no_newline = True
except KeyError:
pass
no_newline = False
# try:
# # Apparently there is such a thing as an "empty paragraph" that
# # doesn't trigger a line ending! What an annoying "feature"
# if style_attrs['-qt-paragraph-type'] == 'empty':
# no_newline = True
# except KeyError:
# pass
front = HtmlPart(front, '', '')


# -qt-paragraph-type:empty
if no_newline:
back = HtmlPart(back, '', '')
Expand Down
10 changes: 8 additions & 2 deletions publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

# commiting a change from spyder
PYTHON_VERSION = 2
CLOUD_TB_VERSION = None

'''Add your file types to list below -- comma separated'''
FILE_TYPES = '.c, .h, .cpp, .hpp, .txt, .py'

Expand Down Expand Up @@ -72,8 +74,6 @@

import textools



def update_license(path):
'''updates the license information and the first line of the file
for the file on the path'''
Expand Down Expand Up @@ -124,6 +124,12 @@ def update_license(path):
with open(path, 'w') as f:
f.write(text)

def update_cloudtb(cloud_tb_version):
# see http://stackoverflow.com/questions/791959/how-to-use-git-to-download-a-particular-tag
git_archive = ('git archive --format=zip '
'--remote=[{hostname}]:[{repo_path}][{tag_name}] '
'> {out_file_path}')

'''
Publish
Expand Down

0 comments on commit 915f318

Please sign in to comment.