We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tokenize
I ran into this issue when the functx:lines function didn't seem to work for me, giving me an extra blank line after each line.
functx:lines
But I can find a simple reproducer using an example from: https://www.altova.com/xpath-xquery-reference/fn-tokenize which says:
For example: fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")
fn:tokenize("abracadabra", "(ab)|(a)")
("", "r", "c", "d", "r", "")
But with fontoxpath:
var fontoxpath = require("fontoxpath") console.log(fontoxpath.evaluateXPathToStrings( 'fn:tokenize("abracadabra", "(ab)|(a)")', null, undefined, undefined, {language: fontoxpath.evaluateXPath.XQUERY_3_1_LANGUAGE}))
Output:
[ '', 'ab', 'undefined', 'r', 'undefined', 'a', 'c', 'undefined', 'a', 'd', 'ab', 'undefined', 'r', 'undefined', 'a', '' ]
Looks like the captures are being incorrectly returned as part of the results of tokenize.
The text was updated successfully, but these errors were encountered:
FunctX: add a workaround to functx:lines for a fontoxpath bug
4de590f
See FontoXML/fontoxpath#635
Hey Reuben,
Sorry for the long wait! Many changes: I'm no longer with Fonto, but I'm still involved in development!
Got it: we use regular JS regexes here, which indeed output capture groups... I made a fix, which I'll PR shortly!
Kind regards,
Martin
Sorry, something went wrong.
Many thanks @DrRataplan!
Successfully merging a pull request may close this issue.
I ran into this issue when the
functx:lines
function didn't seem to work for me, giving me an extra blank line after each line.But I can find a simple reproducer using an example from: https://www.altova.com/xpath-xquery-reference/fn-tokenize which says:
But with fontoxpath:
Output:
Looks like the captures are being incorrectly returned as part of the results of
tokenize
.The text was updated successfully, but these errors were encountered: