diff options
author | nicholas-leonard <nick@nikopia.org> | 2015-08-11 03:27:37 +0300 |
---|---|---|
committer | nicholas-leonard <nick@nikopia.org> | 2015-08-11 04:36:06 +0300 |
commit | 8aed9c75eb55faccba1c6f28adb6bd6f50142f2d (patch) | |
tree | 92d0c86a46e81001f116e3d7ada88dd296f2f996 /inline.lua | |
parent | e8d58d9e852c729e010cb8b8192f2f7abb0d169a (diff) |
works with xhtml anchors
Diffstat (limited to 'inline.lua')
-rw-r--r-- | inline.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -248,7 +248,8 @@ function dok.html2funcs(html, package) local canchor local lines = {} for line in html:gmatch('[^\n\r]+') do - local anchor = line:match('<a.-name="(.-)"/>') + local anchor = line:match('<a.-name=["\'](.-)["\']/>') + or line:match('<a.-name=["\'](.-)["\']>.-</a>') local level, name = line:match('<h(%d)>(.*)</h%d>') if anchor then canchor = anchor |