fix(v2): fix code block title parsing, support multiple metastring attributes (#4541)

* feat: lazy match classic theme code block title

* feat: allow single quotes for classic theme code block title

* refactor(v2): extract parseCodeBlockTitle function

extract `parseCodeBlockTitle` function to add tests for title parsing

* test(v2): add tests for parseCodeBlockTitle

* move code block title parser to theme-common

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
duanwilliam 2021-04-14 01:24:52 -07:00 committed by GitHub
parent 8119de105a
commit 1abadbaeca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 9 deletions

View file

@ -20,6 +20,8 @@ export {createStorageSlot, listStorageKeys} from './utils/storageUtils';
export {useAlternatePageUtils} from './utils/useAlternatePageUtils';
export {parseCodeBlockTitle} from './utils/codeBlockUtils';
export {docVersionSearchTag, DEFAULT_SEARCH_TAG} from './utils/searchUtils';
export {isDocsPluginEnabled} from './utils/docsUtils';