Skip to content
New issue

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

a case where "mailto" match fails #11

Open
dubiouscript opened this issue Aug 10, 2019 · 0 comments
Open

a case where "mailto" match fails #11

dubiouscript opened this issue Aug 10, 2019 · 0 comments

Comments

@dubiouscript
Copy link

it appears that when trying to parse mdsh.md some thing ...

s/<(.*@.*\..*)>/<a href=\"mailto:\1\">\1<\/a>/g # automatic email address links

is not working correctly ..

eg

wget https://github.com/bashup/mdsh/blob/master/mdsh.md
markdown.sh ./mdsh.md

...

### @require

`@require` *module cmd [args...]* will run *cmd args...* if it is the first call to `@require` for the named *module*.  The *cmd* should usually be `mdsh-source` or `mdsh-embed`, to include markdown modules or shell script modules, respectively, but it can be any command or function.  During execution of *cmd*, `MDSH_MODULE` will be set to *modulename*, allowing the running code to know it's being used as a module, potentially compiling itself differently.  (Normally, `MDSH_MODULE` is empty.)

becomes

<h3>@require</h3>

<p>
`@require<code> <a href="mailto:em>module cmd [args...]</em> will run <em>cmd args...</em> if it is the first call to </code>@require<code> for the named <em>module</em>.  The <em>cmd</em> should usually be </code>mdsh-source<code> or </code>mdsh-embed<code>, to include markdown modules or shell script modules, respectively, but it can be any command or function.  During execution of <em>cmd</em>, </code>MDSH<em>MODULE<code> will be set to <em>modulename</em>, allowing the running code to know it's being used as a module, potentially compiling itself differently.  (Normally, </code>MDSH</em">em>module cmd [args...]</em> will run <em>cmd args...</em> if it is the first call to <code>@require</code> for the named <em>module</em>.  The <em>cmd</em> should usually be <code>mdsh-source</code> or <code>mdsh-embed</code>, to include markdown modules or shell script modules, respectively, but it can be any command or function.  During execution of <em>cmd</em>, <code>MDSH<em>MODULE</code> will be set to <em>modulename</em>, allowing the running code to know it's being used as a module, potentially compiling itself differently.  (Normally, <code>MDSH</em</a>MODULE</code> is empty.)
</p>

=s

ftr this:mdown.awk works for this case

https://github.com/wernsey/d.awk

.. using this method
https://github.com/wernsey/d.awk/blob/853e3a6940f193a72c7b67840bcbf822f1f476c1/mdown.awk#L384

match(tg, "^[[:graph:]]+@[[:graph:]]+$")

so long
and thanks for all the scripts
📜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant