mirror of
https://github.com/alvierahman90/otfmacros.git
synced 2025-10-13 16:04:30 +00:00
Add support for space as a delimiter for macros
This commit is contained in:
@@ -119,7 +119,7 @@ def get_macros(input):
|
||||
"""
|
||||
|
||||
# turn input into unvalidated list of macros
|
||||
macros = [x.split('\t') for x in input.split('\n')]
|
||||
macros = [re.split('[ \t]', x) for x in input.split('\n')]
|
||||
|
||||
# validate macros
|
||||
for index, macro in enumerate(macros):
|
||||
|
4
pymacro/test.sh
Executable file
4
pymacro/test.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#/usr/bin/env sh
|
||||
./pymacro -sm tests/test_macros_plural -m tests/test_macros_biology tests/test_input tests/test_actual_output
|
||||
diff tests/test_actual_output tests/test_expected_output
|
||||
|
@@ -1,5 +0,0 @@
|
||||
.hc hydrocarbon
|
||||
.h hydrogen
|
||||
.c carbon
|
||||
.o oxygen
|
||||
:wink: 😉
|
Reference in New Issue
Block a user