~ubuntu-branches/ubuntu/vivid/kate/vivid-proposed

« back to all changes in this revision

Viewing changes to addons/kate/pate/src/plugins/expand/text_css.expand

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
# kate: space-indent on; hl python;
3
 
 
4
 
class BadFormatError(Exception):
5
 
    pass
6
 
 
7
 
def heading(s):
8
 
    try:
9
 
        text, number = s.rsplit(',', 1)
10
 
        number = number.strip()
11
 
        int(number)
12
 
    except ValueError:
13
 
        raise BadFormatError('Usage: heading(text, cols), i.e. heading(Footer Stuff, 80)')
14
 
    return '/*%s*/' % (' %s ' % text).center(int(number) - 4, '*')
15