Help.obsidian.md Wrong functions example

Once you’ve done the above, delete everything above this line.

Steps to reproduce

open Functions - Obsidian Help

goto Functions / replace

read this:

  • Example: ""a:b:c:d".replace(/:/, "-") returns "a-b,c,d", where as "a:b:c:d".replace(/:/g, "-") returns "a-b-c-d".

Did you follow the troubleshooting guide? [Y/N]

not needed

Expected result

  • Example: "a:b:c:d".replace(/:/, "-") returns "a-b:c:d", where as "a:b:c:d".replace(/:/g, "-") returns "a-b-c-d".

Actual result

  • Example: ""a:b:c:d".replace(/:/, "-") returns "a-b,c,d", where as "a:b:c:d".replace(/:/g, "-") returns "a-b-c-d".

Environment

./.

Additional information

This has been reported on GitHub already :blush:

And there’s a open pull request fixing it…

But still wrong …

image

Well, the pull request fixing the example hasn’t been merged yet :blush:
So yes, at the moment, the erroneous example is still there :innocent:

That is true :slight_smile: What are we waiting for. Should I review?

I don’t think that’s necessary :thinking:.
The Obsidian’s team will probably take care of it at some point :innocent:.

Yes. I am not allowed to do. :man_shrugging: