Skip to content

Fix refactor to processDynamicResources - #1092

Merged
yamgent merged 1 commit into
MarkBind:masterfrom
ang-zeyu:fix-dynamic-resources-refactor
Mar 8, 2020
Merged

Fix refactor to processDynamicResources#1092
yamgent merged 1 commit into
MarkBind:masterfrom
ang-zeyu:fix-dynamic-resources-refactor

Conversation

@ang-zeyu

@ang-zeyuang-zeyu commented Mar 7, 2020

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [x] Bug fix

Apologies, missed this out while reviewing #1075.
See #1075 (comment) for original code

CI passes on travis because ensurePosix only runs if path.sep !== / ( non-unix ).
Otherwise undefined is passed to it which causes tests to fail. This is one such case #1040 could be really useful

What changes did you make? (Give an overview)
Reintroduced a undefined check for the the element's src before passing it to utils.ensurePosix to prevent said error.

Proposed commit message: (wrap lines at 72 characters)
Fix refactor to processDynamicResources

@ang-zeyuang-zeyu added the p.Urgent To be done by next release, but follow normal release date label Mar 7, 2020

@openorcloseopenorclose left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for missing this out too!

Comment threadsrc/lib/markbind/src/parser.js Outdated

$('img, pic, thumbnail').each(function () {
const elem = $(this);
if (elem[0].name === 'thumbnail' && elem.attr('src') === undefined) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(elem[0].name==='thumbnail'&&elem.attr('src')===undefined){
if(elem.attr('src')===undefined){

Should we do this then?

Even though pics and imgs must have the src attribute, the author could still forget to include them.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@ang-zeyu
ang-zeyuforce-pushed the fix-dynamic-resources-refactor branch from ea7a176 to 5013906CompareMarch 7, 2020 15:57
@ang-zeyuang-zeyu changed the title Revert refactor to processDynamicResourcesFix refactor to processDynamicResourcesMar 7, 2020
@ang-zeyu
ang-zeyu requested a review from yamgentMarch 8, 2020 09:40
@yamgentyamgent added this to the v2.12.0 milestone Mar 8, 2020
@yamgent
yamgent merged commit 940127a into MarkBind:masterMar 8, 2020
Tejas2805 added a commit to Tejas2805/markbind that referenced this pull request Mar 9, 2020
* 'master' of https://github.com/MarkBind/markbind:
2.12.0
Update outdated test files
Update vue-strap version to v2.0.1-markbind.37
Fix refactor to processDynamicResources (MarkBind#1092)
Implement lazy page building for markbind serve (MarkBind#1038)
Add warnings for conflicting/deprecated component attribs (MarkBind#1057)
Allow changing parameter properties (MarkBind#1075)
Custom timezone for built-in timestamp (MarkBind#1073)
Fix reload inconsistency when updating frontmatter (MarkBind#1068)
Implement an api to ignore content in certain tags (MarkBind#1047)
Enable AppVeyor CI (MarkBind#1040)
Add heading and line highlighting to code blocks (MarkBind#1034)
Add dividers and fix bug in siteNav (MarkBind#1063)
Fixed navbar no longer covers modals (MarkBind#1070)
Add copy code-block plugin (MarkBind#1043)
Render plugins on dynamic resources (MarkBind#1051)
Documentation for Implement no-* attributes for <box> (MarkBind#1042)
Migrate to bootstrap-vue popovers (MarkBind#1033)
Refactor preprocess and url processing functions (MarkBind#1026)
Add pageNav to Using Plugins Page (MarkBind#1062)
marvinchin pushed a commit that referenced this pull request Apr 10, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p.UrgentTo be done by next release, but follow normal release date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ang-zeyu@yamgent@openorclose