mirror of
https://github.com/alvierahman90/otfmacros.git
synced 2024-12-15 12:01:59 +00:00
Add support for space as a delimiter for macros
This commit is contained in:
parent
7c93978ad9
commit
7a7d631a15
@ -1,5 +1,5 @@
|
|||||||
.hc hydrocarbon
|
.hc hydrocarbon
|
||||||
.h hydrogen
|
.h hydrogen
|
||||||
.c carbon
|
.c carbon
|
||||||
.o oxygen
|
.o oxygen
|
||||||
:wink: 😉
|
:wink: 😉
|
||||||
|
@ -119,7 +119,7 @@ def get_macros(input):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# turn input into unvalidated list of macros
|
# 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
|
# validate macros
|
||||||
for index, macro in enumerate(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: 😉
|
|
Loading…
Reference in New Issue
Block a user