Skip to content

Commit

Permalink
[#1119] Text preview was made for XML and Json. Increase their precen…
Browse files Browse the repository at this point in the history
…dence. Also typos.
  • Loading branch information
domoritz committed Jul 19, 2013
1 parent f91e7e6 commit 3df0637
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/datapreview.py
Expand Up @@ -21,7 +21,7 @@


def direct():
''' Directly embedable formats.'''
''' Directly embeddable formats.'''
direct_embed = config.get('ckan.preview.direct', '').split()
return direct_embed or DEFAULT_DIRECT_EMBED

Expand All @@ -33,14 +33,14 @@ def loadable():


def res_format(resource):
''' The assummed resource format in lower case. '''
''' The assumed resource format in lower case. '''
if not resource['url']:
return None
return (resource['format'] or resource['url'].split('.')[-1]).lower()


def compare_domains(urls):
''' Return True if the domains of the provided are the same.
''' Return True if the domains of the provided urls are the same.
'''
first_domain = None
for url in urls:
Expand Down
3 changes: 3 additions & 0 deletions ckanext/textpreview/plugin.py
Expand Up @@ -22,6 +22,9 @@
'text/plain': 2,
'txt': 2,
'plain': 2,
'xml' : 2,
'json': 2,
'jsonp': 2
}


Expand Down

0 comments on commit 3df0637

Please sign in to comment.