|
626 | 626 | { |
627 | 627 | "data": { |
628 | 628 | "text/markdown": [ |
| 629 | + "<div class=\"prose\">\n", |
| 630 | + "\n", |
629 | 631 | "```python\n", |
630 | 632 | "print(create_output('text', 'text/plain'))\n", |
631 | | - "```" |
| 633 | + "```\n", |
| 634 | + "\n", |
| 635 | + "</div>" |
632 | 636 | ], |
633 | 637 | "text/plain": [ |
634 | | - "<IPython.core.display.Markdown object>" |
| 638 | + "Markdown(```python\n", |
| 639 | + "print(create_output('text', 'text/plain'))\n", |
| 640 | + "```)" |
635 | 641 | ] |
636 | 642 | }, |
637 | | - "execution_count": null, |
| 643 | + "execution_count": 34, |
638 | 644 | "metadata": {}, |
639 | 645 | "output_type": "execute_result" |
640 | 646 | } |
|
683 | 689 | "source": [ |
684 | 690 | "#| export\n", |
685 | 691 | "_re_version = re.compile(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]+)[\\'\"]', re.MULTILINE)\n", |
686 | | - "_re_proj = re.compile(r'^name\\s*=\\s*\".*$', re.MULTILINE)\n", |
| 692 | + "_re_proj = re.compile(r'(\\[project\\](?:\\n(?!\\[).*)*?\\n)name\\s*=\\s*\"[^\"]*\"')\n", |
687 | 693 | "_re_reqpy = re.compile(r'^requires-python\\s*=\\s*\".*$', re.MULTILINE)\n", |
688 | 694 | "_init = '__init__.py'\n", |
689 | 695 | "_pyproj = 'pyproject.toml'" |
|
800 | 806 | " fname = path/_pyproj\n", |
801 | 807 | " if not fname.exists(): fname.write_text(pyproj_tmpl)\n", |
802 | 808 | " txt = fname.read_text()\n", |
803 | | - " txt = _re_proj.sub(f'name = \"{get_config().lib_name}\"', txt)\n", |
| 809 | + " txt = _re_proj.sub(rf'\\1name = \"{get_config().lib_name}\"', txt)\n", |
804 | 810 | " txt = _re_reqpy.sub(f'requires-python = \">={get_config().min_python}\"', txt)\n", |
805 | 811 | " fname.write_text(txt)" |
806 | 812 | ] |
|
941 | 947 | ] |
942 | 948 | } |
943 | 949 | ], |
944 | | - "metadata": {}, |
| 950 | + "metadata": { |
| 951 | + "solveit_dialog_mode": "learning", |
| 952 | + "solveit_ver": 2 |
| 953 | + }, |
945 | 954 | "nbformat": 4, |
946 | 955 | "nbformat_minor": 5 |
947 | 956 | } |
0 commit comments