diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 033f4b6..081ec12 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.22 +current_version = 0.0.23 [bumpversion:file:mkdocs_mdpo_plugin/__init__.py] diff --git a/docs/locale/es/useful-recipes.md.po b/docs/locale/es/useful-recipes.md.po index c210876..c798c77 100644 --- a/docs/locale/es/useful-recipes.md.po +++ b/docs/locale/es/useful-recipes.md.po @@ -84,10 +84,11 @@ msgid "" "use them directly [as a command line interface][mdpo-cli] or through is " "[pre-commit hooks][mdpo-pre-commit]." msgstr "" -"[mdpo] es el núcleo de **mkdocs-mdpo-plugin**. El paquete contiene un conjunto" -" de programas para traducir archivos Markdown usando [archivos PO][po-files]," -" así que puedes usarlos directamente como una [interfaz de línea de comandos][mdpo-cli]" -" o mediante sus [hooks pre-commit][mdpo-pre-commit]." +"[mdpo] es el núcleo de **mkdocs-mdpo-plugin**. El paquete contiene un " +"conjunto de programas para traducir archivos Markdown usando [archivos " +"PO][po-files], así que puedes usarlos directamente como una [interfaz de " +"línea de comandos][mdpo-cli] o mediante sus [hooks pre-commit][mdpo-pre-" +"commit]." msgid "" "[po-files]: https://www.gnu.org/software/gettext/manual/gettext.html#PO-" @@ -95,3 +96,26 @@ msgid "" msgstr "" "[po-files]: https://www.gnu.org/software/gettext/manual/gettext.html#PO-" "Files" + +msgid "" +"```\n" +"locale\n" +"├── es\n" +"│   ├── README.md\n" +"│   └── README.md.po\n" +"└── fr\n" +" ├── README.md\n" +" └── README.md.po\n" +"README.md <-- only existing file before execution\n" +"```\n" +msgstr "" +"```\n" +"locale\n" +"├── es\n" +"│   ├── README.md\n" +"│   └── README.md.po\n" +"└── fr\n" +" ├── README.md\n" +" └── README.md.po\n" +"README.md <-- único archivo existente antes de la ejecución\n" +"```\n" diff --git a/docs/src/assets/javascripts/extensions-support.js b/docs/src/assets/javascripts/extensions-support.js index 250fb2e..a2622bd 100644 --- a/docs/src/assets/javascripts/extensions-support.js +++ b/docs/src/assets/javascripts/extensions-support.js @@ -6,8 +6,15 @@ var removePyMdownxSnippetsMarkdownDemoEscapeChar = function() { var pyMdownSnippetsSection = document.getElementById('pymdownxsnippets'); if (pyMdownSnippetsSection) { - var markdownCodeBlock = pyMdownSnippetsSection.nextElementSibling.children[5].children[0].children[0].children[1]; - markdownCodeBlock.innerHTML = markdownCodeBlock.innerHTML.replace('\\', ''); + console.log(pyMdownSnippetsSection) + var markdownCode = pyMdownSnippetsSection.nextElementSibling.children[5].children[0].children[0]; + for (let i=0; i === "Directories tree" ``` @@ -72,9 +72,11 @@ use them directly [as a command line interface][mdpo-cli] or through is └── fr ├── README.md └── README.md.po - README.md <-- only existing file before execute it + README.md <-- only existing file before execution ``` + + ## Relative mkdocs-material's language selector If you are using the [mkdocs-material theme][mkdocs-material], you can install diff --git a/mkdocs_mdpo_plugin/__init__.py b/mkdocs_mdpo_plugin/__init__.py index ccaad5f..7fc69ea 100644 --- a/mkdocs_mdpo_plugin/__init__.py +++ b/mkdocs_mdpo_plugin/__init__.py @@ -1,3 +1,3 @@ """mkdocs-mdpo-plugin package""" -__version__ = '0.0.22' +__version__ = '0.0.23' diff --git a/mkdocs_mdpo_plugin/mdpo_utils.py b/mkdocs_mdpo_plugin/mdpo_utils.py index d2fe387..8fad94d 100644 --- a/mkdocs_mdpo_plugin/mdpo_utils.py +++ b/mkdocs_mdpo_plugin/mdpo_utils.py @@ -5,10 +5,6 @@ from mdpo.command import COMMAND_SEARCH_REGEX -COMMAND_SEARCH_REGEX_AT_LINE_START = re.compile( - r'^(\s{2,})?[^\\]' + COMMAND_SEARCH_REGEX + r'\n?', - re.M, -) COMMAND_SEARCH_REGEX_ESCAPER = re.compile( ( r'\\(' + COMMAND_SEARCH_REGEX[:20] + ')(' @@ -20,19 +16,18 @@ def remove_mdpo_commands_preserving_escaped(text): - return re.sub( - # restore escaped commands - '