Skip to content

Commit

Permalink
Allow multiple whitespace before [if] and [in]
Browse files Browse the repository at this point in the history
  • Loading branch information
ticoneva committed Sep 16, 2022
1 parent 0d73395 commit 41379a0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pystata-kernel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.2.2'
__version__ = '0.2.3'

from .kernel import PyStataKernel
4 changes: 2 additions & 2 deletions pystata-kernel/kernel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'''
pystata-kernel
Version: 0.2.2
Version: 0.2.3
A simple Jupyter kernel based on pystata.
Requires Stata 17 and stata_setup.
'''
Expand All @@ -13,7 +13,7 @@

class PyStataKernel(IPythonKernel):
implementation = 'pystata-kernel'
implementation_version = '0.2.2'
implementation_version = '0.2.3'
language = 'stata'
language_version = '17'
language_info = {
Expand Down
3 changes: 1 addition & 2 deletions pystata-kernel/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ class StataMagics():
html_help = urllib.parse.urljoin(html_base, "help.cgi?{}")

magic_regex = re.compile(
#r'\A(%|\*%)(?P<magic>.+?)(?P<code>\s+.*)?\Z', flags=re.DOTALL + re.MULTILINE)
r'\A(%|\*%)(?P<magic>.+?)(?P<code>\s+(?!if\s)(?!in\s).+?)?(?P<if>\sif\s+.+?)?(?P<in>\s+in\s+.+?)?\Z', flags=re.DOTALL + re.MULTILINE)
r'\A(%|\*%)(?P<magic>.+?)(?P<code>\s+(?!if\s)(?!\sif)(?!in\s)(?!\sin).+?)?(?P<if>\s+if\s+.+?)?(?P<in>\s+in\s+.+?)?\Z', flags=re.DOTALL + re.MULTILINE)

# Format: magic_name: help_content
available_magics = {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='pystata-kernel',
version='0.2.2',
version='0.2.3',
packages=['pystata-kernel'],
package_data={'pystata-kernel': ['logo-64x64.png']},
description='A simple Jupyter kernel for Stata based on pystata',
Expand Down

0 comments on commit 41379a0

Please sign in to comment.